-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
The method prime? is 20x slower then MRI.
But a method implemented by myself give the same time as MRI prime? in MRI and jruby.
I think the problem is in the library prime.
Try
require 'prime'
require 'benchmark'
n = 1090109110921093
Benchmark.bm do |r|
4.times do
r.report {puts n.prime?}
end
end
Tiziano Merzi
P.S.
jruby 9.0.5.0 on MAC
Reactions are currently unavailable