summaryrefslogtreecommitdiff
path: root/ruby_1_9_3/benchmark/bm_vm1_swap.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ruby_1_9_3/benchmark/bm_vm1_swap.rb')
-rw-r--r--ruby_1_9_3/benchmark/bm_vm1_swap.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/ruby_1_9_3/benchmark/bm_vm1_swap.rb b/ruby_1_9_3/benchmark/bm_vm1_swap.rb
new file mode 100644
index 0000000000..611baf6b99
--- /dev/null
+++ b/ruby_1_9_3/benchmark/bm_vm1_swap.rb
@@ -0,0 +1,8 @@
+a = 1
+b = 2
+i=0
+while i<30_000_000 # while loop 1
+ i+=1
+ a, b = b, a
+end
+