Skip to content

expand #succ for bignums#5970

Merged
enebo merged 1 commit intojruby:masterfrom
ahorek:bigsucc
Nov 13, 2019
Merged

expand #succ for bignums#5970
enebo merged 1 commit intojruby:masterfrom
ahorek:bigsucc

Conversation

@ahorek
Copy link
Contributor

@ahorek ahorek commented Nov 13, 2019

just do the same as mri https://github.com/ruby/ruby/blob/e7ea6e078fecb70fbc91b04878b69f696749afac/numeric.c#L3320

after
                 big      6.596M (? 7.8%) i/s -     32.708M in   4.995933s
before
                 big      4.264M (? 5.7%) i/s -     21.237M in   4.994988s

+indy

after
                 big      8.865M (? 2.6%) i/s -     44.215M in   4.991349s
before
                 big      4.704M (? 4.4%) i/s -     23.487M in   5.004868s
require 'benchmark/ips'

Benchmark.ips do |x|
  x.report('fix') { 5.succ }
  x.report('big') { 500000000000000000000000000000000000000000000000000000000000000000000000004.succ }
end

@enebo enebo added this to the JRuby 9.2.10.0 milestone Nov 13, 2019
@enebo enebo merged commit 19b2522 into jruby:master Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants