Bignum#& is slow #2833

kwleland opened this Issue Dec 16, 2013 · 1 comment

2 participants


Bignum#& is 6 times slower in rubinius than in mri.

This counts for approximately 75 percent of the relative slowness in
bm_meteor_contest.rb which itself is 2.8 times slower in rubinius
than in mri.

test code:

a = 123456790123456789012345678901234567890

16_000_000.times do
b = a & 27


Rubinius 2.2.1:
real 0m10.306s
user 0m10.372s
sys 0m0.102s

Ruby 2.1.0-preview1
real 0m2.359s
user 0m2.328s
sys 0m0.012s

am working on semi-fancy benchmark/ips version for forthcoming pull request

Rubinius member

@kwleland Thank you for digging into this! It's great to shine a light on some of the slower parts of Rubinius. We can't make it better without measuring and reporting on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment