1
0
mirror of https://github.com/fumiama/go-base16384.git synced 2026-06-05 00:32:52 +08:00

6 Commits

Author SHA1 Message Date
源文雨
2e6fe912c2 speed up encoder & decoder
name           old time/op    new time/op    delta
Encoder/16-8      136ns ± 2%     102ns ± 1%  -25.00%  (p=0.008 n=5+5)
Encoder/256-8     490ns ± 1%     410ns ± 0%  -16.24%  (p=0.008 n=5+5)
Encoder/4K-8     4.47µs ± 1%    3.52µs ± 1%  -21.10%  (p=0.008 n=5+5)
Encoder/32K-8    38.9µs ± 0%    33.6µs ± 1%  -13.72%  (p=0.008 n=5+5)
Decoder/16-8      269ns ± 1%     253ns ± 1%   -5.95%  (p=0.008 n=5+5)
Decoder/256-8     421ns ± 1%     404ns ± 2%   -4.22%  (p=0.008 n=5+5)
Decoder/4K-8     1.68µs ± 1%    1.66µs ± 3%     ~     (p=0.190 n=5+5)
Decoder/32K-8    12.9µs ± 1%    12.5µs ± 1%   -2.68%  (p=0.008 n=5+5)

name           old speed      new speed      delta
Encoder/16-8    118MB/s ± 2%   157MB/s ± 1%  +33.34%  (p=0.008 n=5+5)
Encoder/256-8   523MB/s ± 1%   624MB/s ± 0%  +19.38%  (p=0.008 n=5+5)
Encoder/4K-8    917MB/s ± 1%  1162MB/s ± 1%  +26.73%  (p=0.008 n=5+5)
Encoder/32K-8   841MB/s ± 0%   975MB/s ± 1%  +15.90%  (p=0.008 n=5+5)
Decoder/16-8   59.5MB/s ± 1%  63.2MB/s ± 1%   +6.34%  (p=0.008 n=5+5)
Decoder/256-8   607MB/s ± 1%   634MB/s ± 2%   +4.42%  (p=0.008 n=5+5)
Decoder/4K-8   2.44GB/s ± 1%  2.46GB/s ± 3%     ~     (p=0.222 n=5+5)
Decoder/32K-8  2.54GB/s ± 1%  2.61GB/s ± 1%   +2.76%  (p=0.008 n=5+5)

name           old alloc/op   new alloc/op   delta
Encoder/16-8      40.0B ± 0%     24.0B ± 0%  -40.00%  (p=0.008 n=5+5)
Encoder/256-8      696B ± 0%      472B ± 0%  -32.18%  (p=0.008 n=5+5)
Encoder/4K-8     4.12kB ± 0%    0.02kB ± 0%  -99.42%  (p=0.008 n=5+5)
Encoder/32K-8    69.7kB ± 0%    41.0kB ± 0%  -41.16%  (p=0.000 n=5+4)
Decoder/16-8       752B ± 0%      752B ± 0%     ~     (all equal)
Decoder/256-8    1.39kB ± 0%    1.39kB ± 0%     ~     (all equal)
Decoder/4K-8     4.98kB ± 0%    4.98kB ± 0%     ~     (all equal)
Decoder/32K-8    41.1kB ± 0%    41.1kB ± 0%     ~     (all equal)

name           old allocs/op  new allocs/op  delta
Encoder/16-8       2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
Encoder/256-8      3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
Encoder/4K-8       2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
Encoder/32K-8      3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
Decoder/16-8       3.00 ± 0%      3.00 ± 0%     ~     (all equal)
Decoder/256-8      3.00 ± 0%      3.00 ± 0%     ~     (all equal)
Decoder/4K-8       3.00 ± 0%      3.00 ± 0%     ~     (all equal)
Decoder/32K-8      3.00 ± 0%      3.00 ± 0%     ~     (all equal)
2022-04-22 21:05:19 +08:00
源文雨
87b51ceb35 add amd64 asm
name            old time/op    new time/op    delta
EncodeTo/16-8     45.5ns ± 1%    35.9ns ± 1%   -21.01%  (p=0.008 n=5+5)
EncodeTo/256-8     241ns ± 1%     170ns ± 1%   -29.64%  (p=0.008 n=5+5)
EncodeTo/4K-8     2.90µs ± 0%    1.70µs ± 0%   -41.60%  (p=0.008 n=5+5)
EncodeTo/32K-8    23.5µs ± 2%    13.6µs ± 2%   -42.20%  (p=0.008 n=5+5)
DecodeTo/16-8     20.2ns ± 0%    10.3ns ± 2%   -48.92%  (p=0.008 n=5+5)
DecodeTo/256-8     141ns ± 1%      71ns ± 0%   -49.55%  (p=0.008 n=5+5)
DecodeTo/4K-8     2.03µs ± 1%    0.94µs ± 0%   -53.82%  (p=0.008 n=5+5)
DecodeTo/32K-8    16.1µs ± 0%     7.5µs ± 0%   -53.22%  (p=0.008 n=5+5)

name            old speed      new speed      delta
EncodeTo/16-8    352MB/s ± 1%   445MB/s ± 1%   +26.59%  (p=0.008 n=5+5)
EncodeTo/256-8  1.06GB/s ± 1%  1.51GB/s ± 1%   +42.13%  (p=0.008 n=5+5)
EncodeTo/4K-8   1.41GB/s ± 0%  2.42GB/s ± 0%   +71.24%  (p=0.008 n=5+5)
EncodeTo/32K-8  1.40GB/s ± 2%  2.42GB/s ± 2%   +73.01%  (p=0.008 n=5+5)
DecodeTo/16-8   1.09GB/s ± 0%  2.14GB/s ± 2%   +95.84%  (p=0.008 n=5+5)
DecodeTo/256-8  2.10GB/s ± 1%  4.16GB/s ± 0%   +98.21%  (p=0.008 n=5+5)
DecodeTo/4K-8   2.30GB/s ± 1%  4.99GB/s ± 0%  +116.55%  (p=0.008 n=5+5)
DecodeTo/32K-8  2.33GB/s ± 0%  4.98GB/s ± 0%  +113.78%  (p=0.008 n=5+5)
2022-04-22 17:24:49 +08:00
源文雨
851f9f8666 new api 2022-03-19 19:34:32 +08:00
fumiama
d84411a4ef 适配所有架构 2022-02-10 13:58:39 +08:00
fumiama
b764251f95 放弃 cgo 2021-10-28 14:02:36 +08:00
fumiama
c4a5495cbd 完成 2021-08-08 03:43:51 +08:00