-
Notifications
You must be signed in to change notification settings - Fork 52
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
Switch from gauge to tasty-bench #100
Conversation
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.
PR looks good. Benchmark results however look very concerning.
@Bodigrim I'll merge it tomorrow, just in case you think of last minute changes.
@Bodigrim great work finding this before it's too late (I hope it's not too late). |
@Bodigrim great (and scary) find. It also means that optimizations aren't very robust |
There is something weird going on. I'll be off for several days, so just dump my observations here. If I run If I scrap everything else except main :: IO ()
main = do
let !sz = 100000
defaultMain
[ bgroup "pure"
[ bgroup "uniformR"
[ bgroup "full"
[ pureUniformRFullBench (Proxy :: Proxy CUShort) sz
]
]
]
] and look at generated Core, there is no random number generation at all. The main routine looks like
which is just an empty loop. |
@Bodigrim Yep, really good catch. All those benchmarks turned out to be bogus. ghc was "smart enough" to get rid of "unneeded" computation and all those benchmarks were checking was the performance of the loop. I'll have a fix for the suite later on today. |
Fix for benchmarks and the major regression: #101 |
gauge
still cannot be compiled with GHC 9.0 because ofbasement
, and further it will be broken once again by sized primitives in GHC 9.2. Switching totasty-bench
allows running benchmarks against GHC 9.0 and 9.2, which reveals pretty gruesome picture.It seems that inlining has significantly changed in GHC 9.0 (e. g.,
{-# INLINE unbiasedWordMult32RM #-}
fixes couple of regressions). I intend to relay this data to GHC team, once the branch is merged.