Skip to content

Conversation

@abemedia
Copy link
Owner

@abemedia abemedia commented Apr 1, 2024

No description provided.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2024

Benchmark Results

.
goos: linux
goarch: amd64
pkg: github.com/abemedia/go-don
cpu: AMD EPYC 7763 64-Core Processor                
                         │   before    │                after                │
                         │   sec/op    │   sec/op     vs base                │
Handler/Request-4          295.8n ± 2%   236.7n ± 1%  -19.96% (p=0.000 n=10)
Handler/RequestPointer-4   308.5n ± 0%   235.2n ± 0%  -23.79% (p=0.000 n=10)
geomean                    302.1n        235.9n       -21.90%

                         │   before   │               after                │
                         │    B/op    │    B/op     vs base                │
Handler/Request-4          40.00 ± 0%   24.00 ± 0%  -40.00% (p=0.000 n=10)
Handler/RequestPointer-4   40.00 ± 0%   24.00 ± 0%  -40.00% (p=0.000 n=10)
geomean                    40.00        24.00       -40.00%

                         │   before   │               after                │
                         │ allocs/op  │ allocs/op   vs base                │
Handler/Request-4          2.000 ± 0%   1.000 ± 0%  -50.00% (p=0.000 n=10)
Handler/RequestPointer-4   2.000 ± 0%   1.000 ± 0%  -50.00% (p=0.000 n=10)
geomean                    2.000        1.000       -50.00%
encoding/json
goos: linux
goarch: amd64
pkg: github.com/abemedia/go-don/encoding/json
cpu: AMD EPYC 7763 64-Core Processor                
              │   before    │                after                │
              │   sec/op    │   sec/op     vs base                │
JSON/Decode-4   91.27n ± 1%   79.50n ± 0%  -12.89% (p=0.000 n=10)
JSON/Encode-4   110.9n ± 1%   126.7n ± 1%  +14.24% (p=0.000 n=10)
geomean         100.6n        100.4n        -0.24%

              │   before   │                after                 │
              │    B/op    │    B/op     vs base                  │
JSON/Decode-4   16.00 ± 0%   16.00 ± 0%        ~ (p=1.000 n=10) ¹
JSON/Encode-4   32.00 ± 0%   16.00 ± 0%  -50.00% (p=0.000 n=10)
geomean         22.63        16.00       -29.29%
¹ all samples are equal

              │   before   │                after                 │
              │ allocs/op  │ allocs/op   vs base                  │
JSON/Decode-4   1.000 ± 0%   1.000 ± 0%        ~ (p=1.000 n=10) ¹
JSON/Encode-4   2.000 ± 0%   1.000 ± 0%  -50.00% (p=0.000 n=10)
geomean         1.414        1.000       -29.29%
¹ all samples are equal
encoding/msgpack
goos: linux
goarch: amd64
pkg: github.com/abemedia/go-don/encoding/msgpack
cpu: AMD EPYC 7763 64-Core Processor                
                 │   before    │                after                │
                 │   sec/op    │   sec/op     vs base                │
Msgpack/Decode-4   236.9n ± 0%   210.6n ± 0%  -11.10% (p=0.000 n=10)
Msgpack/Encode-4   236.4n ± 0%   236.6n ± 1%        ~ (p=0.382 n=10)
geomean            236.6n        223.2n        -5.67%

                 │   before    │                after                 │
                 │    B/op     │    B/op     vs base                  │
Msgpack/Decode-4   51.000 ± 0%   3.000 ± 0%  -94.12% (p=0.000 n=10)
Msgpack/Encode-4    128.0 ± 0%   128.0 ± 0%        ~ (p=1.000 n=10) ¹
geomean             80.80        19.60       -75.75%
¹ all samples are equal

                 │   before   │                after                 │
                 │ allocs/op  │ allocs/op   vs base                  │
Msgpack/Decode-4   2.000 ± 0%   1.000 ± 0%  -50.00% (p=0.000 n=10)
Msgpack/Encode-4   3.000 ± 0%   3.000 ± 0%        ~ (p=1.000 n=10) ¹
geomean            2.449        1.732       -29.29%
¹ all samples are equal
encoding/protobuf
goos: linux
goarch: amd64
pkg: github.com/abemedia/go-don/encoding/protobuf
cpu: AMD EPYC 7763 64-Core Processor                
                  │   before    │               after                │
                  │   sec/op    │   sec/op     vs base               │
Protobuf/Decode-4   124.7n ± 1%   125.4n ± 0%  +0.60% (p=0.024 n=10)
Protobuf/Encode-4   103.9n ± 0%   107.0n ± 0%  +2.93% (p=0.000 n=10)
geomean             113.9n        115.9n       +1.76%

                  │   before   │                after                │
                  │    B/op    │    B/op     vs base                 │
Protobuf/Decode-4   3.000 ± 0%   3.000 ± 0%       ~ (p=1.000 n=10) ¹
Protobuf/Encode-4   5.000 ± 0%   5.000 ± 0%       ~ (p=1.000 n=10) ¹
geomean             3.873        3.873       +0.00%
¹ all samples are equal

                  │   before   │                after                │
                  │ allocs/op  │ allocs/op   vs base                 │
Protobuf/Decode-4   1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=10) ¹
Protobuf/Encode-4   1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=10) ¹
geomean             1.000        1.000       +0.00%
¹ all samples are equal
encoding/text
goos: linux
goarch: amd64
pkg: github.com/abemedia/go-don/encoding/text
cpu: AMD EPYC 7763 64-Core Processor                
              │   before    │                after                │
              │   sec/op    │   sec/op     vs base                │
Text/Decode-4   12.16n ± 1%   12.16n ± 0%        ~ (p=0.561 n=10)
Text/Encode-4   34.48n ± 0%   38.62n ± 0%  +12.04% (p=0.000 n=10)
geomean         20.47n        21.67n        +5.85%

              │    before    │                after                │
              │     B/op     │    B/op     vs base                 │
Text/Decode-4   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=10) ¹
Text/Encode-4   16.00 ± 0%     16.00 ± 0%       ~ (p=1.000 n=10) ¹
geomean                    ²               +0.00%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

              │    before    │                after                │
              │  allocs/op   │ allocs/op   vs base                 │
Text/Decode-4   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=10) ¹
Text/Encode-4   1.000 ± 0%     1.000 ± 0%       ~ (p=1.000 n=10) ¹
geomean                    ²               +0.00%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean
encoding/toml
goos: linux
goarch: amd64
pkg: github.com/abemedia/go-don/encoding/toml
cpu: AMD EPYC 7763 64-Core Processor                
              │   before    │               after                │
              │   sec/op    │   sec/op     vs base               │
TOML/Decode-4   3.919µ ± 2%   3.900µ ± 2%       ~ (p=0.591 n=10)
TOML/Encode-4   1.159µ ± 1%   1.199µ ± 1%  +3.45% (p=0.000 n=10)
geomean         2.131µ        2.162µ       +1.46%

              │    before    │                 after                 │
              │     B/op     │     B/op      vs base                 │
TOML/Decode-4   12.21Ki ± 0%   12.16Ki ± 0%  -0.38% (p=0.000 n=10)
TOML/Encode-4     720.0 ± 0%     720.0 ± 0%       ~ (p=1.000 n=10) ¹
geomean         2.930Ki        2.925Ki       -0.19%
¹ all samples are equal

              │   before   │                after                │
              │ allocs/op  │ allocs/op   vs base                 │
TOML/Decode-4   35.00 ± 0%   34.00 ± 0%  -2.86% (p=0.000 n=10)
TOML/Encode-4   14.00 ± 0%   14.00 ± 0%       ~ (p=1.000 n=10) ¹
geomean         22.14        21.82       -1.44%
¹ all samples are equal
encoding/xml
goos: linux
goarch: amd64
pkg: github.com/abemedia/go-don/encoding/xml
cpu: AMD EPYC 7763 64-Core Processor                
             │   before    │                after                │
             │   sec/op    │   sec/op     vs base                │
XML/Decode-4   1.689µ ± 4%   2.426µ ± 1%  +43.64% (p=0.000 n=10)
XML/Encode-4   1.335µ ± 1%   1.365µ ± 1%   +2.25% (p=0.000 n=10)
geomean        1.502µ        1.820µ       +21.19%

             │    before    │                 after                  │
             │     B/op     │     B/op      vs base                  │
XML/Decode-4   1.070Ki ± 0%   1.297Ki ± 0%  +21.17% (p=0.000 n=10)
XML/Encode-4   4.375Ki ± 0%   4.375Ki ± 0%        ~ (p=1.000 n=10) ¹
geomean        2.164Ki        2.382Ki       +10.08%
¹ all samples are equal

             │   before   │                after                 │
             │ allocs/op  │ allocs/op   vs base                  │
XML/Decode-4   22.00 ± 0%   28.00 ± 0%  +27.27% (p=0.000 n=10)
XML/Encode-4   8.000 ± 0%   8.000 ± 0%        ~ (p=1.000 n=10) ¹
geomean        13.27        14.97       +12.82%
¹ all samples are equal
encoding/yaml
goos: linux
goarch: amd64
pkg: github.com/abemedia/go-don/encoding/yaml
cpu: AMD EPYC 7763 64-Core Processor                
              │   before    │               after                │
              │   sec/op    │   sec/op     vs base               │
YAML/Decode-4   4.527µ ± 2%   4.442µ ± 1%  -1.88% (p=0.003 n=10)
YAML/Encode-4   2.507µ ± 0%   2.510µ ± 0%       ~ (p=0.137 n=10)
geomean         3.368µ        3.339µ       -0.86%

              │    before    │                 after                 │
              │     B/op     │     B/op      vs base                 │
YAML/Decode-4   6.773Ki ± 0%   6.773Ki ± 0%       ~ (p=1.000 n=10) ¹
YAML/Encode-4   6.556Ki ± 0%   6.556Ki ± 0%       ~ (p=1.000 n=10) ¹
geomean         6.664Ki        6.664Ki       +0.00%
¹ all samples are equal

              │   before   │                after                │
              │ allocs/op  │ allocs/op   vs base                 │
YAML/Decode-4   41.00 ± 0%   41.00 ± 0%       ~ (p=1.000 n=10) ¹
YAML/Encode-4   19.00 ± 0%   19.00 ± 0%       ~ (p=1.000 n=10) ¹
geomean         27.91        27.91       +0.00%
¹ all samples are equal

@codecov
Copy link

codecov bot commented Apr 1, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.39%. Comparing base (e91b533) to head (5eb4dc5).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #214      +/-   ##
==========================================
+ Coverage   98.35%   98.39%   +0.03%     
==========================================
  Files          24       24              
  Lines         852      871      +19     
==========================================
+ Hits          838      857      +19     
  Misses          9        9              
  Partials        5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@abemedia abemedia force-pushed the feat/encoding-simplify branch 4 times, most recently from 35a023f to 48b4280 Compare April 4, 2024 20:19
@abemedia abemedia force-pushed the feat/encoding-simplify branch from 48b4280 to 8fc70f7 Compare October 11, 2025 12:25
@abemedia abemedia force-pushed the feat/encoding-simplify branch from 8fc70f7 to 5eb4dc5 Compare October 11, 2025 12:29
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