Skip to content

Conversation

@abemedia
Copy link
Owner

No description provided.

@github-actions
Copy link
Contributor

github-actions bot commented May 10, 2023

Benchmark Result

Benchmark diff with base branch
goos: linux
goarch: amd64
pkg: github.com/abemedia/go-don
cpu: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
          │ bench-master.txt │         bench-new.txt         │
          │      sec/op      │   sec/op     vs base          │
Handler-2        468.2n ± 2%   467.8n ± 2%  ~ (p=0.739 n=10)

          │ bench-master.txt │         bench-new.txt          │
          │       B/op       │    B/op     vs base            │
Handler-2         72.00 ± 0%   72.00 ± 0%  ~ (p=1.000 n=10) ¹
¹ all samples are equal

          │ bench-master.txt │         bench-new.txt          │
          │    allocs/op     │ allocs/op   vs base            │
Handler-2         2.000 ± 0%   2.000 ± 0%  ~ (p=1.000 n=10) ¹
¹ all samples are equal

pkg: github.com/abemedia/go-don/encoding/json
              │ bench-master.txt │            bench-new.txt            │
              │      sec/op      │   sec/op     vs base                │
JSON/Encode-2        174.1n ± 0%   162.6n ± 1%   -6.58% (p=0.001 n=10)
JSON/Decode-2        344.2n ± 2%   148.4n ± 1%  -56.89% (p=0.000 n=10)
geomean              244.8n        155.4n       -36.54%

              │ bench-master.txt │            bench-new.txt            │
              │       B/op       │    B/op     vs base                 │
JSON/Encode-2         16.00 ± 0%   32.00 ± 0%  +100.00% (p=0.000 n=10)
JSON/Decode-2        656.00 ± 0%   32.00 ± 0%   -95.12% (p=0.000 n=10)
geomean               102.4        32.00        -68.77%

              │ bench-master.txt │            bench-new.txt            │
              │    allocs/op     │ allocs/op   vs base                 │
JSON/Encode-2         1.000 ± 0%   2.000 ± 0%  +100.00% (p=0.000 n=10)
JSON/Decode-2         4.000 ± 0%   2.000 ± 0%   -50.00% (p=0.000 n=10)
geomean               2.000        2.000         +0.00%

pkg: github.com/abemedia/go-don/encoding/msgpack
                 │ bench-master.txt │            bench-new.txt            │
                 │      sec/op      │   sec/op     vs base                │
Msgpack/Encode-2        477.8n ± 1%   369.3n ± 5%  -22.72% (p=0.000 n=10)
Msgpack/Decode-2        444.6n ± 0%   421.6n ± 1%   -5.18% (p=0.000 n=10)
geomean                 460.9n        394.6n       -14.40%

                 │ bench-master.txt │           bench-new.txt            │
                 │       B/op       │    B/op     vs base                │
Msgpack/Encode-2         144.0 ± 0%   128.0 ± 0%  -11.11% (p=0.000 n=10)
Msgpack/Decode-2        227.00 ± 0%   67.00 ± 0%  -70.48% (p=0.000 n=10)
geomean                  180.8        92.61       -48.78%

                 │ bench-master.txt │           bench-new.txt            │
                 │    allocs/op     │ allocs/op   vs base                │
Msgpack/Encode-2         7.000 ± 0%   3.000 ± 0%  -57.14% (p=0.000 n=10)
Msgpack/Decode-2         4.000 ± 0%   3.000 ± 0%  -25.00% (p=0.000 n=10)
geomean                  5.292        3.000       -43.31%

pkg: github.com/abemedia/go-don/encoding/text
              │ bench-master.txt │           bench-new.txt            │
              │      sec/op      │   sec/op     vs base               │
Text/Encode-2        74.48n ± 1%   74.47n ± 2%       ~ (p=0.781 n=10)
Text/Decode-2        47.53n ± 0%   47.41n ± 0%       ~ (p=0.055 n=10)
geomean              59.50n        59.42n       -0.13%

              │ bench-master.txt │            bench-new.txt            │
              │       B/op       │    B/op     vs base                 │
Text/Encode-2         24.00 ± 0%   24.00 ± 0%       ~ (p=1.000 n=10) ¹
Text/Decode-2         16.00 ± 0%   16.00 ± 0%       ~ (p=1.000 n=10) ¹
geomean               19.60        19.60       +0.00%
¹ all samples are equal

              │ bench-master.txt │            bench-new.txt            │
              │    allocs/op     │ allocs/op   vs base                 │
Text/Encode-2         2.000 ± 0%   2.000 ± 0%       ~ (p=1.000 n=10) ¹
Text/Decode-2         1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=10) ¹
geomean               1.414        1.414       +0.00%
¹ all samples are equal

pkg: github.com/abemedia/go-don/encoding/xml
             │ bench-master.txt │           bench-new.txt            │
             │      sec/op      │   sec/op     vs base               │
XML/Encode-2        1.814µ ± 1%   1.751µ ± 1%  -3.50% (p=0.000 n=10)
XML/Decode-2        2.478µ ± 1%   2.432µ ± 0%  -1.84% (p=0.000 n=10)
geomean             2.120µ        2.063µ       -2.67%

             │ bench-master.txt │             bench-new.txt             │
             │       B/op       │     B/op      vs base                 │
XML/Encode-2       4.359Ki ± 0%   4.359Ki ± 0%       ~ (p=1.000 n=10) ¹
XML/Decode-2       1.086Ki ± 0%   1.086Ki ± 0%       ~ (p=1.000 n=10) ¹
geomean            2.176Ki        2.176Ki       +0.00%
¹ all samples are equal

             │ bench-master.txt │            bench-new.txt            │
             │    allocs/op     │ allocs/op   vs base                 │
XML/Encode-2         8.000 ± 0%   8.000 ± 0%       ~ (p=1.000 n=10) ¹
XML/Decode-2         23.00 ± 0%   23.00 ± 0%       ~ (p=1.000 n=10) ¹
geomean              13.56        13.56       +0.00%
¹ all samples are equal

pkg: github.com/abemedia/go-don/encoding/yaml
              │ bench-master.txt │           bench-new.txt            │
              │      sec/op      │   sec/op     vs base               │
YAML/Encode-2        3.702µ ± 1%   3.631µ ± 1%  -1.90% (p=0.000 n=10)
YAML/Decode-2        6.114µ ± 1%   5.935µ ± 1%  -2.92% (p=0.000 n=10)
geomean              4.757µ        4.642µ       -2.41%

              │ bench-master.txt │             bench-new.txt             │
              │       B/op       │     B/op      vs base                 │
YAML/Encode-2       6.555Ki ± 0%   6.555Ki ± 0%       ~ (p=1.000 n=10) ¹
YAML/Decode-2       6.602Ki ± 0%   6.602Ki ± 0%       ~ (p=1.000 n=10) ¹
geomean             6.578Ki        6.578Ki       +0.00%
¹ all samples are equal

              │ bench-master.txt │            bench-new.txt            │
              │    allocs/op     │ allocs/op   vs base                 │
YAML/Encode-2         19.00 ± 0%   19.00 ± 0%       ~ (p=1.000 n=10) ¹
YAML/Decode-2         42.00 ± 0%   42.00 ± 0%       ~ (p=1.000 n=10) ¹
geomean               28.25        28.25       +0.00%
¹ all samples are equal

@abemedia abemedia force-pushed the perf/encoding-improvements branch from bf980b7 to ce5ee12 Compare May 10, 2023 18:36
@abemedia abemedia force-pushed the perf/encoding-improvements branch from ce5ee12 to 6a447a8 Compare May 10, 2023 18:49
@codecov
Copy link

codecov bot commented May 10, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.08 ⚠️

Comparison is base (4cd799c) 93.11% compared to head (6a447a8) 93.04%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #113      +/-   ##
==========================================
- Coverage   93.11%   93.04%   -0.08%     
==========================================
  Files          19       19              
  Lines         770      762       -8     
==========================================
- Hits          717      709       -8     
  Misses         37       37              
  Partials       16       16              
Impacted Files Coverage Δ
encoding/form/form.go 72.72% <ø> (ø)
encoding/json/json.go 100.00% <100.00%> (ø)
encoding/msgpack/msgpack.go 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@abemedia abemedia merged commit a541544 into master May 10, 2023
@abemedia abemedia deleted the perf/encoding-improvements branch May 10, 2023 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants