I've run Tom's bench_strptime.rb benchmark:

jruby:

31.683223009109497
19.17426586151123
15.365097045898438
15.723044157028198
15.189801931381226
15.09797191619873
15.364525079727173
15.629280090332031
15.065291166305542
15.069799900054932

MRI is more than twice as fast here.

But:

require 'Date'

4.times{
   t = Time.now
   i=0
   while i<2000 # benchmark loop 2
DateTime.strptime("27/Nov/2007:15:01:43 -0800", "%d/%b/%Y:%H:%M:%S %z")
       i+=1
   end
   p Time.now - t
}


jruby:

15.02
4.785
4.199
3.705

MRI:

3.094
3.109
3.11
3.109



The other observation is that empty loop:
 puts(Benchmark.realtime() do
   for i in (1..10000000)
   end
 end

is slightly faster than MRI.

There is something wrong here (method size thresholds ?) I'll try to -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation once I understand the output a little more. Such cases might hurt rails performance since there's much more code so the profiler doesn't get more accurate path information (or just time to measure it). We need to find a way to help hotspot managing large amounts of code we have.

Marcin

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to