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 |
curiousleo
left a comment
There was a problem hiding this comment.
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:
uniformRfunction was inconsistent with other range functions.