[macruby-changes] [4474] MacRuby/trunk/perf/perf_masgn.rb

source_changes at macosforge.org source_changes at macosforge.org
Fri Aug 27 12:59:55 PDT 2010


Revision: 4474
          http://trac.macosforge.org/projects/ruby/changeset/4474
Author:   lsansonetti at apple.com
Date:     2010-08-27 12:59:55 -0700 (Fri, 27 Aug 2010)
Log Message:
-----------
adding perf test covering symetric masgn

Added Paths:
-----------
    MacRuby/trunk/perf/perf_masgn.rb

Added: MacRuby/trunk/perf/perf_masgn.rb
===================================================================
--- MacRuby/trunk/perf/perf_masgn.rb	                        (rev 0)
+++ MacRuby/trunk/perf/perf_masgn.rb	2010-08-27 19:59:55 UTC (rev 4474)
@@ -0,0 +1,16 @@
+perf_test('symetric') do
+  i = 0
+  x = 1
+  y = 2
+  while i < 200000
+    x, y = y, x
+    y, x = x, y
+    x, y = y, x
+    y, x = x, y
+    x, y = y, x
+    y, x = x, y
+    x, y = y, x
+    y, x = x, y
+    i += 1
+  end
+end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100827/1d5ab6a5/attachment.html>


More information about the macruby-changes mailing list