summaryrefslogtreecommitdiff
path: root/benchmark/bm_vm1_float_simple.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-14 18:53:01 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-14 18:53:01 +0000
commitfd3b0dec4a4aa0e56bf56bb058688e0dea91c090 (patch)
tree835dbbb454a3d7eeac23d68f7d57d8824f9770a5 /benchmark/bm_vm1_float_simple.rb
parent7f052a7213e21c800fa4bd80f61e7903804bcf4f (diff)
* benchmark/bm_vm1_attr_ivar(_set).rb: added (for method dispatch speed).
* benchmark/bm_vm1_float_simple.rb: added (for flonum/float). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark/bm_vm1_float_simple.rb')
-rw-r--r--benchmark/bm_vm1_float_simple.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/benchmark/bm_vm1_float_simple.rb b/benchmark/bm_vm1_float_simple.rb
new file mode 100644
index 0000000..46e3f2a
--- /dev/null
+++ b/benchmark/bm_vm1_float_simple.rb
@@ -0,0 +1,7 @@
+i= 0.0; f = 0.0
+while i<30_000_000
+ i+= 1
+ f += 0.1; f -= 0.1
+ f += 0.1; f -= 0.1
+ f += 0.1; f -= 0.1
+end