1
0
mirror of https://github.com/fumiama/go-base16384.git synced 2026-06-05 00:32:52 +08:00
Files
go-base16384/go.mod
源文雨 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

9 lines
123 B
Modula-2

module github.com/fumiama/go-base16384
go 1.16
require (
github.com/stretchr/testify v1.7.1
golang.org/x/text v0.3.7
)