Skip to content
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

enable Integer#sqrt #5367

Merged
merged 1 commit into from Oct 14, 2018

Conversation

Projects
None yet
2 participants
@ahorek
Copy link
Contributor

ahorek commented Oct 13, 2018

require 'benchmark/ips'

def sqrt
  1000.times do |num|
    Integer.sqrt(num)
  end
end

Benchmark.ips do |x|
  x.report('sqrt') { sqrt }
end

master

 sqrt      9.153k (±20.4%) i/s -     42.000k in   5.027226s

patch

 sqrt     16.244k (±14.2%) i/s -     79.422k in   5.063626s
pavel
@kares

This comment has been minimized.

Copy link
Member

kares commented Oct 14, 2018

najs, esp. since there seem to be no test broken despite the FIXME :)

@kares kares merged commit d2bc2bc into jruby:master Oct 14, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@kares kares added this to the JRuby 9.2.1.0 milestone Oct 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.