Projects

Ticket #568 (new enhancement)

Opened 2 years ago

Last modified 2 years ago

MacRuby is a lot slower than 18, and in 19, in this benchmark.

Reported by: rob@… Owned by: lsansonetti@…
Priority: minor Milestone:
Component: MacRuby Keywords:
Cc:

Description

This isn't a bug or anything like that, but I just thought I'd report how much slower MacRuby can be when compared to MRI 18 or 19.

require 'benchmark'
Benchmark.bm do |r|
  r.report { (0..10_000_000).to_a.map(&:to_s) }
end

MRI 18 reported 8 seconds or there abouts, and MRI 19 reported 4 seconds.

The macruby interpreter reported 20-30 seconds, and the same is true for the binary made by macrubyc.

I understand this isn't a bug, and you probably want a stable macruby before you look at stuff like this but i just thought i'd throw it out there.

I should probably mention in other benchmarks I've tried, the macruby compiler came out on top.

Thanks.

Change History

Changed 2 years ago by conradwt@…

MacRuby is still in beta and currently in heavy development. Thus, it's not really fair to compare production ready Ruby (1.8.6/1.8.7/1.9.1) to MacRuby 0.5 Beta 2. However, the MacRuby core team are making sure that it's feature complete and performs well as development moves forward.

Changed 2 years ago by lsansonetti@…

Your benchmark allocates about 20 million objects in a loop. I don't think this reflects real world usage. I'm keeping the bug open because some changes are coming soon to the GC and builtin classes which might reduce the time of this test.

Note: See TracTickets for help on using tickets.