-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
Unusually slow performance on "sig" benchmarks #2860
Comments
A few observations after a casual glance:
The first two we will eventually be able to eliminate in post 9k work since we plan on converting define_method procs to actual methods. This will also allow us to make the unresolved super resolved. The kwargs overhead I have no doubt we will be improving a bit early in 9k cycle. |
I updated the referenced issue with results from running the benchmark directly. The original results were run via a Rakefile, so the block-based IPS bench never jitted. Our performance is orders of magnitude better than what is in the README if JIT runs with indy enabled. Our performance on the sig and contracts part of the bench now is closer to where it should be, but not where I'd like to see it:
The sig library uses prepend, so there's no way to compare with JRuby 1.7. |
I realized that the type-checking wrapper sig generates uses define_method, and so it will never JIT in the normal situation (yet). Results with -Xjit.threshold=0 are better:
All numbers are comfortably ahead of MRI here. The numbers for rbx are very confusing, though. They show a significant drop in perf for contracts but nearly identical performance between the pure and sig benchmarks. That doesn't seem possible; there's a lot of overhead in the type checking logic. |
This is no longer an issue; with proper configs/flags we are easily the fastest at these benchmarks. The rbx numbers turned out to be bogus because they have a JIT bug preventing sig's typechecking from running in the jitted version of those methods. @janlelis If you want to get accurate JRuby results, try running with |
The "sig" library provides type-checking for Ruby. The benchmarks reported in their README don't reflect the performance we'd expect to see on JRuby 9000.
I've filed janlelis/sig#1 to hopefully get to the bottom of it.
The text was updated successfully, but these errors were encountered: