-
Notifications
You must be signed in to change notification settings - Fork 2
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
Improve performance #103
Improve performance #103
Conversation
Nice! How big is the performance boost? |
@curiousleo Pretty significant ~x20. Problem is when a function is recursive, then it cannot be inlined, which can hurt the performance really bad when that function is being called many many times. Haven't tried the internal benchmarks, but running with criterion difference in performance was obvious. |
@curiousleo Applied the same fix of removing recursion to Integer generation, got quite a bit of performance boost as well ;) Benchmarks for ranges are available in the same place: https://github.com/lehins/haskell-benchmarks/tree/new-random/new-random-benchmarks |
4055a8e
to
bb7b99a
Compare
Fixed a semantic merge conflict: 068aa36#diff-5b60458897b8b814de6d596bdc71e75cL210-R210 |
According to the new benchmarks, this is an improvement for some types (e.g.
Full comparison in compare.txt. improve-performance-bb7b99a.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amongst performance improvements, this also contains performance regressions: #103 (comment)
Ping @lehins - I've cherry-picked most performance improvements from here onto #116, which is now merged. I've played around with the optimisation you made to |
I am closing this, since most of improvements were cherry picked |
This PR fixes:
uniformR
function was inconsistent with other range functions.