From f44446c45d8875d5e5d6e556da8d1ff3d4452cab Mon Sep 17 00:00:00 2001 From: kosaki Date: Fri, 1 Jul 2011 10:39:12 +0000 Subject: [PATCH] * benchmark/bm_app_erb.rb: increase loop count. too short mesurement time makes less accuracy. * benchmark/bm_app_factorial.rb: ditto. * benchmark/bm_app_mandelbrot.rb: ditto. * benchmark/bm_app_strconcat.rb: ditto. * benchmark/bm_io_file_create.rb: ditto. * benchmark/bm_io_file_read.rb: ditto. * benchmark/bm_io_file_write.rb: ditto. * benchmark/bm_so_concatenate.rb: ditto. * benchmark/bm_so_lists.rb: ditto. * benchmark/bm_so_matrix.rb: ditto. * benchmark/bm_so_random.rb: ditto. * benchmark/bm_so_sieve.rb: ditto. * benchmark/bm_vm_thread_mutex1.rb: ditto. * benchmark/bm_vm_thread_mutex2.rb: ditto. * benchmark/bm_vm_thread_mutex3.rb: ditto. * benchmark/bm_vm1_block.rb: cleanup. * benchmark/bm_vm1_const.rb: cleanup. * benchmark/bm_vm1_ensure.rb: cleanup. * benchmark/bm_vm1_ivar.rb: cleanup. * benchmark/bm_vm1_length.rb: cleanup. * benchmark/bm_vm1_neq.rb: cleanup. * benchmark/bm_vm1_not.rb: cleanup. * benchmark/bm_vm1_rescue.rb: cleanup. * benchmark/bm_vm1_simplereturn.rb: cleanup. * benchmark/bm_vm1_swap.rb: cleanup. * benchmark/bm_vm2_array.rb: cleanup. * benchmark/bm_vm2_case.rb: cleanup. * benchmark/bm_vm2_defined_method.rb: cleanup. * benchmark/bm_vm2_eval.rb: cleanup. * benchmark/bm_vm2_method.rb: cleanup. * benchmark/bm_vm2_mutex.rb: cleanup. * benchmark/bm_vm2_poly_method.rb: cleanup. * benchmark/bm_vm2_poly_method_ov.rb: cleanup. * benchmark/bm_vm2_proc.rb: cleanup. * benchmark/bm_vm2_regexp.rb: cleanup. * benchmark/bm_vm2_send.rb: cleanup. * benchmark/bm_vm2_super.rb: cleanup. * benchmark/bm_vm2_unif1.rb: cleanup. * benchmark/bm_vm2_zsuper.rb: cleanup. * benchmark/bm_vm_thread_alive_check1.rb: cleanup. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 50 ++++++++++++++++++++++++++ benchmark/bm_app_erb.rb | 2 +- benchmark/bm_app_factorial.rb | 4 +-- benchmark/bm_app_mandelbrot.rb | 4 +-- benchmark/bm_app_strconcat.rb | 2 +- benchmark/bm_io_file_create.rb | 2 +- benchmark/bm_io_file_read.rb | 2 +- benchmark/bm_io_file_write.rb | 2 +- benchmark/bm_so_concatenate.rb | 2 +- benchmark/bm_so_fannkuch.rb | 2 +- benchmark/bm_so_lists.rb | 2 +- benchmark/bm_so_matrix.rb | 2 +- benchmark/bm_so_random.rb | 2 +- benchmark/bm_so_sieve.rb | 2 +- benchmark/bm_vm1_block.rb | 4 +-- benchmark/bm_vm1_const.rb | 2 +- benchmark/bm_vm1_ensure.rb | 2 +- benchmark/bm_vm1_ivar.rb | 2 +- benchmark/bm_vm1_length.rb | 2 +- benchmark/bm_vm1_neq.rb | 2 +- benchmark/bm_vm1_not.rb | 2 +- benchmark/bm_vm1_rescue.rb | 2 +- benchmark/bm_vm1_simplereturn.rb | 2 +- benchmark/bm_vm1_swap.rb | 2 +- benchmark/bm_vm2_array.rb | 2 +- benchmark/bm_vm2_case.rb | 2 +- benchmark/bm_vm2_defined_method.rb | 2 +- benchmark/bm_vm2_eval.rb | 2 +- benchmark/bm_vm2_method.rb | 2 +- benchmark/bm_vm2_mutex.rb | 2 +- benchmark/bm_vm2_poly_method.rb | 2 +- benchmark/bm_vm2_poly_method_ov.rb | 2 +- benchmark/bm_vm2_proc.rb | 2 +- benchmark/bm_vm2_regexp.rb | 2 +- benchmark/bm_vm2_send.rb | 2 +- benchmark/bm_vm2_super.rb | 2 +- benchmark/bm_vm2_unif1.rb | 2 +- benchmark/bm_vm2_zsuper.rb | 2 +- benchmark/bm_vm_thread_alive_check1.rb | 2 +- benchmark/bm_vm_thread_mutex1.rb | 2 +- benchmark/bm_vm_thread_mutex2.rb | 2 +- benchmark/bm_vm_thread_mutex3.rb | 2 +- 42 files changed, 94 insertions(+), 44 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4e556f3ced..c5d07d8628 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,53 @@ +Fri Jul 1 18:52:31 2011 KOSAKI Motohiro + + * benchmark/bm_app_erb.rb: increase loop count. too short + mesurement time makes less accuracy. + * benchmark/bm_app_factorial.rb: ditto. + * benchmark/bm_app_mandelbrot.rb: ditto. + * benchmark/bm_app_strconcat.rb: ditto. + + * benchmark/bm_io_file_create.rb: ditto. + * benchmark/bm_io_file_read.rb: ditto. + * benchmark/bm_io_file_write.rb: ditto. + + * benchmark/bm_so_concatenate.rb: ditto. + * benchmark/bm_so_lists.rb: ditto. + * benchmark/bm_so_matrix.rb: ditto. + * benchmark/bm_so_random.rb: ditto. + * benchmark/bm_so_sieve.rb: ditto. + + * benchmark/bm_vm_thread_mutex1.rb: ditto. + * benchmark/bm_vm_thread_mutex2.rb: ditto. + * benchmark/bm_vm_thread_mutex3.rb: ditto. + + * benchmark/bm_vm1_block.rb: cleanup. + * benchmark/bm_vm1_const.rb: cleanup. + * benchmark/bm_vm1_ensure.rb: cleanup. + * benchmark/bm_vm1_ivar.rb: cleanup. + * benchmark/bm_vm1_length.rb: cleanup. + * benchmark/bm_vm1_neq.rb: cleanup. + * benchmark/bm_vm1_not.rb: cleanup. + * benchmark/bm_vm1_rescue.rb: cleanup. + * benchmark/bm_vm1_simplereturn.rb: cleanup. + * benchmark/bm_vm1_swap.rb: cleanup. + + * benchmark/bm_vm2_array.rb: cleanup. + * benchmark/bm_vm2_case.rb: cleanup. + * benchmark/bm_vm2_defined_method.rb: cleanup. + * benchmark/bm_vm2_eval.rb: cleanup. + * benchmark/bm_vm2_method.rb: cleanup. + * benchmark/bm_vm2_mutex.rb: cleanup. + * benchmark/bm_vm2_poly_method.rb: cleanup. + * benchmark/bm_vm2_poly_method_ov.rb: cleanup. + * benchmark/bm_vm2_proc.rb: cleanup. + * benchmark/bm_vm2_regexp.rb: cleanup. + * benchmark/bm_vm2_send.rb: cleanup. + * benchmark/bm_vm2_super.rb: cleanup. + * benchmark/bm_vm2_unif1.rb: cleanup. + * benchmark/bm_vm2_zsuper.rb: cleanup. + + * benchmark/bm_vm_thread_alive_check1.rb: cleanup. + Fri Jul 1 15:23:00 2011 Marc-Andre Lafortune * lib/matrix: Add LUP decomposition diff --git a/benchmark/bm_app_erb.rb b/benchmark/bm_app_erb.rb index e58b7a34a1..77c66a7949 100644 --- a/benchmark/bm_app_erb.rb +++ b/benchmark/bm_app_erb.rb @@ -5,7 +5,7 @@ require 'erb' data = DATA.read -max = 5_000 +max = 15_000 title = "hello world!" content = "hello world!\n" * 10 diff --git a/benchmark/bm_app_factorial.rb b/benchmark/bm_app_factorial.rb index a5a5de0426..45f471dfdb 100644 --- a/benchmark/bm_app_factorial.rb +++ b/benchmark/bm_app_factorial.rb @@ -6,6 +6,6 @@ def fact(n) end end -8.times{ +100.times { fact(5000) -} \ No newline at end of file +} diff --git a/benchmark/bm_app_mandelbrot.rb b/benchmark/bm_app_mandelbrot.rb index a0dcf5e874..89069db7ab 100644 --- a/benchmark/bm_app_mandelbrot.rb +++ b/benchmark/bm_app_mandelbrot.rb @@ -12,8 +12,8 @@ end ary = [] -(0..100).each{|dx| - (0..100).each{|dy| +(0..1000).each{|dx| + (0..1000).each{|dy| x = dx / 50.0 y = dy / 50.0 c = Complex(x, y) diff --git a/benchmark/bm_app_strconcat.rb b/benchmark/bm_app_strconcat.rb index c6ef817263..7b2f2da5a7 100644 --- a/benchmark/bm_app_strconcat.rb +++ b/benchmark/bm_app_strconcat.rb @@ -1,5 +1,5 @@ i=0 -while i<500000 +while i<2_000_000 "#{1+1} #{1+1} #{1+1}" i+=1 end diff --git a/benchmark/bm_io_file_create.rb b/benchmark/bm_io_file_create.rb index 7adbe9ea5e..2f205c1333 100644 --- a/benchmark/bm_io_file_create.rb +++ b/benchmark/bm_io_file_create.rb @@ -2,7 +2,7 @@ # Create files # -max = 50_000 +max = 200_000 file = './tmpfile_of_bm_io_file_create' max.times{ diff --git a/benchmark/bm_io_file_read.rb b/benchmark/bm_io_file_read.rb index 2b4212db76..b9e796ed30 100644 --- a/benchmark/bm_io_file_read.rb +++ b/benchmark/bm_io_file_read.rb @@ -4,7 +4,7 @@ require 'tempfile' -max = 20_000 +max = 200_000 str = "Hello world! " * 1000 f = Tempfile.new('yarv-benchmark') f.write str diff --git a/benchmark/bm_io_file_write.rb b/benchmark/bm_io_file_write.rb index 3cec58c6ae..aa1be0e5fe 100644 --- a/benchmark/bm_io_file_write.rb +++ b/benchmark/bm_io_file_write.rb @@ -4,7 +4,7 @@ require 'tempfile' -max = 20_000 +max = 200_000 str = "Hello world! " * 1000 f = Tempfile.new('yarv-benchmark') diff --git a/benchmark/bm_so_concatenate.rb b/benchmark/bm_so_concatenate.rb index 82629688b7..56b9410632 100644 --- a/benchmark/bm_so_concatenate.rb +++ b/benchmark/bm_so_concatenate.rb @@ -9,7 +9,7 @@ i=0 while i<10 i+=1 hello = '' - 400000.times do |e| + 4_000_000.times do |e| hello << STUFF end end diff --git a/benchmark/bm_so_fannkuch.rb b/benchmark/bm_so_fannkuch.rb index a214f2e205..bac5ecd44c 100644 --- a/benchmark/bm_so_fannkuch.rb +++ b/benchmark/bm_so_fannkuch.rb @@ -40,6 +40,6 @@ end def puts *args end -N = 10 # (ARGV[0] || 1).to_i +N = 9 # (ARGV[0] || 1).to_i puts "Pfannkuchen(#{N}) = #{fannkuch(N)}" diff --git a/benchmark/bm_so_lists.rb b/benchmark/bm_so_lists.rb index 3652288881..f8d26797aa 100644 --- a/benchmark/bm_so_lists.rb +++ b/benchmark/bm_so_lists.rb @@ -1,6 +1,6 @@ #from http://www.bagley.org/~doug/shootout/bench/lists/lists.ruby -NUM = 100 +NUM = 300 SIZE = 10000 def test_lists() diff --git a/benchmark/bm_so_matrix.rb b/benchmark/bm_so_matrix.rb index 0f274ad06c..e2c5c8e559 100644 --- a/benchmark/bm_so_matrix.rb +++ b/benchmark/bm_so_matrix.rb @@ -5,7 +5,7 @@ n = 60 #Integer(ARGV.shift || 1) -size = 30 +size = 40 def mkmatrix(rows, cols) count = 1 diff --git a/benchmark/bm_so_random.rb b/benchmark/bm_so_random.rb index 83c0d6d380..57f700b863 100644 --- a/benchmark/bm_so_random.rb +++ b/benchmark/bm_so_random.rb @@ -10,7 +10,7 @@ def gen_random(max) (max * ($last = ($last * IA + IC) % IM)) / IM end -N = 1000000 +N = 3_000_000 i=0 while i