From 90c7902834ed4e414831669e1bf1ae3af4a4a91f Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 10 Oct 2008 19:19:36 +0000 Subject: * 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 --- benchmark/bm_loop_for.rb | 3 +++ benchmark/bm_loop_times.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 benchmark/bm_loop_for.rb (limited to 'benchmark') 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|} -- cgit