bincode-org / bincode

A binary encoder / decoder implementation in Rust.
MIT License
2.65k stars 265 forks source link

Added unty dependency and added type checks #667

Closed VictorKoenders closed 11 months ago

codecov[bot] commented 11 months ago

Codecov Report

Patch coverage: 69.23% and project coverage change: +0.43% :tada:

Comparison is base (2f08107) 56.33% compared to head (fcf6224) 56.77%. Report is 2 commits behind head on trunk.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## trunk #667 +/- ## ========================================== + Coverage 56.33% 56.77% +0.43% ========================================== Files 51 51 Lines 4317 4312 -5 ========================================== + Hits 2432 2448 +16 + Misses 1885 1864 -21 ``` | [Files Changed](https://app.codecov.io/gh/bincode-org/bincode/pull/667?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bincode-org) | Coverage Δ | | |---|---|---| | [src/enc/impls.rs](https://app.codecov.io/gh/bincode-org/bincode/pull/667?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bincode-org#diff-c3JjL2VuYy9pbXBscy5ycw==) | `87.50% <62.50%> (-1.28%)` | :arrow_down: | | [src/features/impl\_alloc.rs](https://app.codecov.io/gh/bincode-org/bincode/pull/667?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bincode-org#diff-c3JjL2ZlYXR1cmVzL2ltcGxfYWxsb2MucnM=) | `61.92% <64.86%> (-0.99%)` | :arrow_down: | | [src/de/impls.rs](https://app.codecov.io/gh/bincode-org/bincode/pull/667?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bincode-org#diff-c3JjL2RlL2ltcGxzLnJz) | `64.85% <100.00%> (+2.35%)` | :arrow_up: | | [tests/std.rs](https://app.codecov.io/gh/bincode-org/bincode/pull/667?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bincode-org#diff-dGVzdHMvc3RkLnJz) | `97.67% <100.00%> (+0.14%)` | :arrow_up: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/bincode-org/bincode/pull/667/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bincode-org)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

VictorKoenders commented 11 months ago

trunk:

bench v1                time:   [32.759 µs 32.773 µs 32.789 µs]
Found 4 outliers among 100 measurements (4.00%)
  1 (1.00%) high mild
  3 (3.00%) high severe

bench v2 (standard)     time:   [37.312 µs 37.329 µs 37.344 µs]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high severe

bench v2 (legacy)       time:   [31.839 µs 31.847 µs 31.855 µs]
Found 13 outliers among 100 measurements (13.00%)
  9 (9.00%) high mild
  4 (4.00%) high severe

bench v1 decode         time:   [197.19 µs 197.24 µs 197.28 µs]
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high severe

Benchmarking bench v2 decode (legacy): Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 5.7s, enable flat sampling, or reduce sample count to 60.
bench v2 decode (legacy)
                        time:   [1.1283 ms 1.1285 ms 1.1287 ms]
Found 11 outliers among 100 measurements (11.00%)
  1 (1.00%) low mild
  2 (2.00%) high mild
  8 (8.00%) high severe

this PR:

bench v1                time:   [33.078 µs 33.084 µs 33.091 µs]
                        change: [+0.7552% +0.8417% +0.9214%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high severe

bench v2 (standard)     time:   [37.329 µs 37.336 µs 37.344 µs]
                        change: [+0.0325% +0.1377% +0.2356%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 7 outliers among 100 measurements (7.00%)
  1 (1.00%) low mild
  2 (2.00%) high mild
  4 (4.00%) high severe

bench v2 (legacy)       time:   [32.700 µs 32.704 µs 32.708 µs]
                        change: [+2.5681% +2.6751% +2.7748%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 5 outliers among 100 measurements (5.00%)
  2 (2.00%) high mild
  3 (3.00%) high severe

bench v1 decode         time:   [190.66 µs 190.70 µs 190.74 µs]
                        change: [-3.3484% -3.2612% -3.1718%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
  1 (1.00%) low mild
  4 (4.00%) high mild
  2 (2.00%) high severe

bench v2 decode (legacy)
                        time:   [216.64 µs 216.67 µs 216.70 µs]
                        change: [-80.807% -80.793% -80.778%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 10 outliers among 100 measurements (10.00%)
  6 (6.00%) high mild
  4 (4.00%) high severe

or tldr

bincode 1 bincode 2
encode 33.084 µs 32.704 µs
decode 190.70 µs 216.67 µs