diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-10 19:19:36 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-10 19:19:36 +0000 |
commit | 90c7902834ed4e414831669e1bf1ae3af4a4a91f (patch) | |
tree | c4bfaeb462fc57b54f0d43d09a914bab27b76400 /benchmark | |
parent | 2b9a99c5fd341137077a24ad83ee295e36578b42 (diff) | |
download | ruby-90c7902834ed4e414831669e1bf1ae3af4a4a91f.tar.gz ruby-90c7902834ed4e414831669e1bf1ae3af4a4a91f.tar.xz ruby-90c7902834ed4e414831669e1bf1ae3af4a4a91f.zip |
* parse.y: optimize 'for' statement when one variable given.
* benchmark/bm_loop_for.rb: added.
* benchmark/bm_loop_times.rb: modified.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/bm_loop_for.rb | 3 | ||||
-rw-r--r-- | benchmark/bm_loop_times.rb | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/benchmark/bm_loop_for.rb b/benchmark/bm_loop_for.rb new file mode 100644 index 000000000..398f6ff61 --- /dev/null +++ b/benchmark/bm_loop_for.rb @@ -0,0 +1,3 @@ +for i in 1..30_000_000
+ #
+end
diff --git a/benchmark/bm_loop_times.rb b/benchmark/bm_loop_times.rb index c5317b822..521f72ad1 100644 --- a/benchmark/bm_loop_times.rb +++ b/benchmark/bm_loop_times.rb @@ -1 +1 @@ -30000000.times{|e|} +30_000_000.times{|e|} |