News for hackers. Stuff that matters.
Re:Yet Another Language Speed Test – Counting Primes by headius on Saturday July 04, 2015 @01:31PM (#9830842)
I assume you only measured JRuby at low n, where the startup and warmup time would overshadow overall performance. JRuby is usually significantly faster than C Ruby. In this case, it's nearly twice as fast:

  [] ~/projects/jruby $ time jruby primes.rb
  Number of primes in the interval [0,67108864]: 3957809
  
  real	6m26.536s
  user	6m43.472s
  sys	0m4.967s
  
  [] ~/projects/jruby $ time rvm ruby-2.2 do ruby primes.rb
  Number of primes in the interval [0,67108864]: 3957809
  
  real	11m17.610s
  user	11m16.564s
  sys	0m0.738s

There are no comments on this comment yet.