Skip to content
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

Add benchmark results to README #80

Open
chshersh opened this issue Jul 29, 2022 · 0 comments
Open

Add benchmark results to README #80

chshersh opened this issue Jul 29, 2022 · 0 comments

Comments

@chshersh
Copy link

Hi, thanks for writing this library! I was interested in using the fastest function to get monotonic time to measure performance and fund this wonderful library ✨

The library itself provides several functions to get the time and I was wondering which one is the fastest. I see that the library has benchmarks. Since benchmarks use criterion, I had to wait half an hour on my old laptop to compile them and run. So I propose to add some benchmark results to README so users can quickly compare different functions and select the best one 🤗

benchmarking getTime/Monotonic
time                 53.79 ns   (53.70 ns .. 53.95 ns)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 53.82 ns   (53.72 ns .. 54.13 ns)
std dev              551.6 ps   (210.6 ps .. 1.082 ns)

benchmarking getTime/Realtime
time                 53.44 ns   (53.24 ns .. 53.70 ns)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 53.32 ns   (53.25 ns .. 53.49 ns)
std dev              362.8 ps   (183.6 ps .. 634.4 ps)

benchmarking getTime/ProcessCPUTime
time                 581.8 ns   (575.6 ns .. 591.8 ns)
                     0.999 R²   (0.997 R² .. 1.000 R²)
mean                 578.0 ns   (575.9 ns .. 585.9 ns)
std dev              11.07 ns   (2.941 ns .. 24.00 ns)
variance introduced by outliers: 23% (moderately inflated)

benchmarking getTime/ThreadCPUTime
time                 563.6 ns   (563.3 ns .. 564.2 ns)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 564.3 ns   (564.0 ns .. 564.9 ns)
std dev              1.507 ns   (946.2 ps .. 2.239 ns)

benchmarking getTime/MonotonicRaw
time                 53.99 ns   (53.88 ns .. 54.22 ns)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 54.00 ns   (53.89 ns .. 54.35 ns)
std dev              595.9 ps   (122.4 ps .. 1.251 ns)
variance introduced by outliers: 11% (moderately inflated)

benchmarking getTime/Boottime
time                 53.32 ns   (53.23 ns .. 53.45 ns)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 53.27 ns   (53.23 ns .. 53.35 ns)
std dev              180.4 ps   (105.4 ps .. 283.9 ps)

benchmarking getTime/MonotonicCoarse
time                 52.07 ns   (48.18 ns .. 57.83 ns)
                     0.947 R²   (0.927 R² .. 0.975 R²)
mean                 55.50 ns   (52.11 ns .. 59.87 ns)
std dev              13.31 ns   (10.18 ns .. 19.63 ns)
variance introduced by outliers: 98% (severely inflated)

benchmarking getTime/RealtimeCoarse
time                 45.10 ns   (44.40 ns .. 46.09 ns)
                     0.973 R²   (0.950 R² .. 0.989 R²)
mean                 56.50 ns   (51.38 ns .. 64.96 ns)
std dev              23.29 ns   (17.33 ns .. 30.06 ns)
variance introduced by outliers: 100% (severely inflated)

benchmarking GHC.Clock.getMonotonicTimeNSec
time                 22.75 ns   (22.62 ns .. 22.92 ns)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 22.65 ns   (22.61 ns .. 22.74 ns)
std dev              197.3 ps   (102.5 ps .. 355.4 ps)
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

No branches or pull requests

1 participant