-
-
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
9.0.5.0 numerical computation regression #3626
Comments
Huh, the markup messed up the number. n = 40 x 10^9 |
Another example. Base System:
All times in seconds jruby-9.0.4.0 :027 > n=20000000000000003; GC.start; tm{n.primep5?} jruby-9.0.5.0 :037 > n=20000000000000003; GC.start; tm{n.primep5?} On 64-bit Linux distro as VB Guest OS. jruby-9.0.4.0 :036 > n=20000000000000003; GC.start; tm{n.primep5?} jruby-9.0.5.0 :040 > n=20000000000000003; GC.start; tm{n.primep5?} |
Interesting. May still be JIT taking too long to kick in but I'll play with it. |
I think this is mostly a side effect of the new interpreter being slower and the JIT being no faster to kick in. Here's my numbers with CRuby and then JRuby with different flags. CRuby:
JRuby with no flags
JRuby with more memory:
JRuby with more memory and immediate JIT:
So when the JIT gets going, we look fine. That's one issue. This also uses a lot of memory. I went digging into Largely this comes down to getting JIT to trigger sooner. |
Why is so much memory used for this? Only 8 numbers are created each loop, so are old values being kept around until the routine ends? But even still, 9.0.4.0 performed so much better what else had to change to cause such a big difference? Are the architectures between the versions that much different? I'm just grasping at straws here. |
I believe I've found a regression. cc @enebo @subbuss When I run this with JIT logging under 9.0.4.0, I can see some block bodies from the primes-util library getting jitted:
Under 9.1 I do not see any blocks jitting. Something seems to have broken how we decide to JIT blocks. |
Success! It appears that changes I made to ensure we only build blocks that were ready to be built actually caused NONE of them to build. I was checking to see if they had full call protocol before they had completed a full/JIT set of compiler passes...including the pass that sets up call protocol. I have a fix coming. @enebo this is a good reason we need to start monitoring a set of CI benchmarks. |
@headius yowch :) |
9.0.5.0 has seriously regressed from 9.0.4.0 on this numerical computation extensive rubygem
rubygem : primes-utils (2.7.0)
9.0.4.0
n = 40_10_*9; GC.start; tm{n.primescnt}
7.692
9.0.5.0
n = 40_10_*9; GC.start; tm{n.primescnt}
38.456
This behavior is consistent across different 32/64-bit OSs, as Host and VB guests.
The text was updated successfully, but these errors were encountered: