[macruby-changes] [1229] MacRuby/branches/experimental/bench.rb
source_changes at macosforge.org
source_changes at macosforge.org
Fri Mar 27 17:59:32 PDT 2009
Revision: 1229
http://trac.macosforge.org/projects/ruby/changeset/1229
Author: lsansonetti at apple.com
Date: 2009-03-27 17:59:31 -0700 (Fri, 27 Mar 2009)
Log Message:
-----------
nicer output + disabled ackermann test for 1.8
Modified Paths:
--------------
MacRuby/branches/experimental/bench.rb
Modified: MacRuby/branches/experimental/bench.rb
===================================================================
--- MacRuby/branches/experimental/bench.rb 2009-03-28 00:57:36 UTC (rev 1228)
+++ MacRuby/branches/experimental/bench.rb 2009-03-28 00:59:31 UTC (rev 1229)
@@ -82,7 +82,10 @@
end
bm.report('tak') { tak(18,9,0) }
bm.report('tarai') { tarai(12,6,0) }
- bm.report('ackermann') { ack(3,9) }
+ if RUBY_VERSION.to_f > 1.8
+ # Ruby 1.8 is too weak for this benchmark.
+ bm.report('ackermann') { ack(3,9) }
+ end
# Loops.
bm.report('10000000 times loop') do
@@ -99,19 +102,19 @@
end
# Messages.
- bm.report('30000000 0 arg msg') do
+ bm.report('30000000 msg w/ 0 arg') do
o = Class1.new
i=0; while i<10000000; o.method1; o.method1; o.method1; i+=1; end
end
- bm.report('30000000 1 arg msg') do
+ bm.report('30000000 msg w/ 1 arg') do
o = Class1.new
i=0; while i<10000000; o.method2(i); o.method2(i); o.method2(i); i+=1; end
end
- bm.report('10000000 0 arg super msg') do
+ bm.report('10000000 super w/ 0 arg') do
o = Class2.new
i=0; while i<10000000; o.method1; i+=1; end
end
- bm.report('10000000 1 arg super msg') do
+ bm.report('10000000 super w/ 1 arg') do
o = Class2.new
i=0; while i<10000000; o.method2(i); i+=1; end
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090327/12d2135a/attachment.html>
More information about the macruby-changes
mailing list