8000 test(benchmarks): add `serialize` presets by zsilbi · Pull Request #124 · unjs/ohash · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

test(benchmarks): add serialize presets #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 27, 2025
Merged

Conversation

zsilbi
Copy link
Collaborator
@zsilbi zsilbi commented Feb 27, 2025

This PR adds proper benchmark for serialize() with presets.

  test/benchmarks.bench.ts > benchmarks > serialize 7423ms
     name                                                            hz     min     max    mean     p75     p99    p995    p999     rme  samples
   · count:1, size:small                                     477,263.18  0.0019  0.2646  0.0021  0.0020  0.0037  0.0039  0.0123  ±0.45%   238632   fastest
   · count:1, size:small, circular:true                      308,090.19  0.0029  0.2285  0.0032  0.0032  0.0044  0.0055  0.0169  ±0.24%   154046
   · count:1, size:large                                      43,778.31  0.0197  0.7381  0.0228  0.0217  0.0443  0.0572  0.5127  ±1.28%    21890
   · count:1, size:large, circular:true                       25,026.26  0.0350  3.1461  0.0400  0.0383  0.0760  0.0947  0.4402  ±1.59%    12514
   · count:1024, size:small, referenced:true                  19,491.34  0.0490  0.2771  0.0513  0.0499  0.0822  0.1474  0.2086  ±0.42%     9746
   · count:1024, size:small, circular:true, referenced:true   19,468.93  0.0487  0.3414  0.0514  0.0498  0.0834  0.1719  0.2608  ±0.53%     9735
   · count:512, size:large, referenced:true                   20,552.60  0.0434  0.6116  0.0487  0.0464  0.0834  0.1371  0.4935  ±1.11%    10277
   · count:512, size:large, circular:true, referenced:true    17,331.11  0.0512  1.1328  0.0577  0.0553  0.1037  0.2694  0.5161  ±1.09%     8666
   · count:256, size:small                                     3,726.48  0.2481  0.6942  0.2683  0.2575  0.5338  0.5686  0.6675  ±0.92%     1864
   · count:256, size:small, circular:true                      3,167.05  0.2863  2.1334  0.3158  0.2992  0.5691  0.6254  0.9258  ±1.24%     1584
   · count:128, size:large                                       895.99  1.0067  2.2416  1.1161  1.0742  1.8618  1.9411  2.2416  ±1.74%      448
   · count:128, size:large, circular:true                        866.93  1.0053  2.7256  1.1535  1.0940  2.0025  2.0748  2.7256  ±2.07%      434   slowest

Copy link
codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.11%. Comparing base (c5173ba) to head (71c4edc).
Report is 75 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #124       +/-   ##
===========================================
+ Coverage   80.31%   95.11%   +14.79%     
===========================================
  Files           8        8               
  Lines        1006      471      -535     
  Branches      111      118        +7     
===========================================
- Hits          808      448      -360     
+ Misses        198       21      -177     
- Partials        0        2        +2     

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

@pi0 pi0 merged commit 2303149 into unjs:main Feb 27, 2025
4 checks passed
@zsilbi zsilbi deleted the test/serialize-bench branch March 3, 2025 09:55
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
0