-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Rewrite Integer#times in Ruby #8388
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
Conversation
74e1bd7
to
78bb8b6
Compare
78bb8b6
to
a2bee28
Compare
I wouldn't expect
|
This is pretty cool. Can you run it on rubykon, mail, nbody, optcarrot and lee to make sure there's no degradation? I expect it will perform well, but it would be nice to have a bit more benchmark data. |
Benoit thinks rewriting
Sure Interpreter
YJITrubykon also seems to be sped up reliably.
|
This reverts commit 5b5ae3d.
This reverts commit 684cf0f3bcdbac32c3457fee7fcedc76e0cfa329.
railsbench
I benchmarked this with railsbench, which does call
Integer#times
a little (Shopify/yjit-bench#168).Interpreter
It doesn't seem to have a significant impact on the interpreter.
YJIT
It decreases
interp_return
, increasesavg_len_in_yjit
, and speeds up the benchmark a little.microbenchmark
Interpreter
It slows down the interpreter a little, but it doesn't seem too significant. In fact, railsbench did not slow down.
YJIT
Ruby outperforms C.