Broken benchmark scripts? #3424
Harris-Miller
started this conversation in
General
Replies: 1 comment
-
Looks like the benchmarking library we are using is 11 years old? Probably due for an update.. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A few recent MRs have touched on the performance for some Ramda functions
#3417
#3370
I ran
npm run bench
on my local, a 2023 MacbookPro, M2 Max, 64Gig. Running on Node 18.18.2Full Results
Slowdowns when calling functions curried (eg
either(gt10)(even)(8)
versuseither(gt10, even, 8)
) is expected, I was generally surprised at the stark difference between the native functions and ramda's. I decided to narrow down the benchmark.js script so it just ran one test,find.bench.js
Group run
Solo run
I'm not sure why, but while the native find comes out to be about the same between the 2 runs, the ramda functions are massively different!
find(isZero, nums)
is faster thannums.find(isZero)
here, not surprising given the imperative backing code using awhile
loopThrowing the same code into jsperf but simplified to the core function yields even a greater magnitude of speed difference
https://jsperf.app/nadupe
Is it worth it to try and fix these?
Beta Was this translation helpful? Give feedback.
All reactions