[MacRuby-devel] Speed
Uliano Guerrini
uliano.guerrini at gmail.com
Sun Nov 22 23:30:26 PST 2009
Thank you all
I didn't realize that JIT in macruby is compiling on the fly the code piece a piece (I thought that a source file was the compilation unit) and so JIT time to compile the block was inside my time metrics
I re-run the test looping many times and the results are speaking for themselfs:
uliano$ macruby fib.rb
sum of even Fibonacci less than 4000000 = 4613732
time = 0.637182
uliano$ /usr/bin/ruby fib.rb
sum of even Fibonacci less than 4000000 = 4613732
time = 4.710929
uliano$ ruby fib.rb # this is Ruby 1.9.1 from macports
sum of even Fibonacci less than 4000000 = 4613732
time = 0.660384
uliano$ macrubyc -o fib fib.rb
uliano$ ./fib
sum of even Fibonacci less than 4000000 = 4613732
time = 0.61873
More information about the MacRuby-devel
mailing list