Skip to content
Browse files

* 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
  • Loading branch information...
1 parent 0fe6469 commit f44446c45d8875d5e5d6e556da8d1ff3d4452cab @kosaki kosaki committed Jul 1, 2011
Showing with 94 additions and 44 deletions.
  1. +50 −0 ChangeLog
  2. +1 −1 benchmark/bm_app_erb.rb
  3. +2 −2 benchmark/bm_app_factorial.rb
  4. +2 −2 benchmark/bm_app_mandelbrot.rb
  5. +1 −1 benchmark/bm_app_strconcat.rb
  6. +1 −1 benchmark/bm_io_file_create.rb
  7. +1 −1 benchmark/bm_io_file_read.rb
  8. +1 −1 benchmark/bm_io_file_write.rb
  9. +1 −1 benchmark/bm_so_concatenate.rb
  10. +1 −1 benchmark/bm_so_fannkuch.rb
  11. +1 −1 benchmark/bm_so_lists.rb
  12. +1 −1 benchmark/bm_so_matrix.rb
  13. +1 −1 benchmark/bm_so_random.rb
  14. +1 −1 benchmark/bm_so_sieve.rb
  15. +2 −2 benchmark/bm_vm1_block.rb
  16. +1 −1 benchmark/bm_vm1_const.rb
  17. +1 −1 benchmark/bm_vm1_ensure.rb
  18. +1 −1 benchmark/bm_vm1_ivar.rb
  19. +1 −1 benchmark/bm_vm1_length.rb
  20. +1 −1 benchmark/bm_vm1_neq.rb
  21. +1 −1 benchmark/bm_vm1_not.rb
  22. +1 −1 benchmark/bm_vm1_rescue.rb
  23. +1 −1 benchmark/bm_vm1_simplereturn.rb
  24. +1 −1 benchmark/bm_vm1_swap.rb
  25. +1 −1 benchmark/bm_vm2_array.rb
  26. +1 −1 benchmark/bm_vm2_case.rb
  27. +1 −1 benchmark/bm_vm2_defined_method.rb
  28. +1 −1 benchmark/bm_vm2_eval.rb
  29. +1 −1 benchmark/bm_vm2_method.rb
  30. +1 −1 benchmark/bm_vm2_mutex.rb
  31. +1 −1 benchmark/bm_vm2_poly_method.rb
  32. +1 −1 benchmark/bm_vm2_poly_method_ov.rb
  33. +1 −1 benchmark/bm_vm2_proc.rb
  34. +1 −1 benchmark/bm_vm2_regexp.rb
  35. +1 −1 benchmark/bm_vm2_send.rb
  36. +1 −1 benchmark/bm_vm2_super.rb
  37. +1 −1 benchmark/bm_vm2_unif1.rb
  38. +1 −1 benchmark/bm_vm2_zsuper.rb
  39. +1 −1 benchmark/bm_vm_thread_alive_check1.rb
  40. +1 −1 benchmark/bm_vm_thread_mutex1.rb
  41. +1 −1 benchmark/bm_vm_thread_mutex2.rb
  42. +1 −1 benchmark/bm_vm_thread_mutex3.rb
View
50 ChangeLog
@@ -1,3 +1,53 @@
+Fri Jul 1 18:52:31 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * 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 <ruby-core@marc-andre.ca>
* lib/matrix: Add LUP decomposition
View
2 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
View
4 benchmark/bm_app_factorial.rb
@@ -6,6 +6,6 @@ def fact(n)
end
end
-8.times{
+100.times {
fact(5000)
-}
+}
View
4 benchmark/bm_app_mandelbrot.rb
@@ -12,8 +12,8 @@ def mandelbrot? z
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)
View
2 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
View
2 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{
View
2 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
View
2 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')
View
2 benchmark/bm_so_concatenate.rb
@@ -9,7 +9,7 @@
while i<10
i+=1
hello = ''
- 400000.times do |e|
+ 4_000_000.times do |e|
hello << STUFF
end
end
View
2 benchmark/bm_so_fannkuch.rb
@@ -40,6 +40,6 @@ def fannkuch(n)
def puts *args
end
-N = 10 # (ARGV[0] || 1).to_i
+N = 9 # (ARGV[0] || 1).to_i
puts "Pfannkuchen(#{N}) = #{fannkuch(N)}"
View
2 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()
View
2 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
View
2 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<N
View
2 benchmark/bm_so_sieve.rb
@@ -1,5 +1,5 @@
# from http://www.bagley.org/~doug/shootout/bench/sieve/sieve.ruby
-num = 40
+num = 500
count = i = j = 0
flags0 = Array.new(8192,1)
k = 0
View
4 benchmark/bm_vm1_block.rb
@@ -3,8 +3,8 @@ def m
end
i=0
-while i<30000000 # while loop 1
+while i<30_000_000 # while loop 1
i+=1
m{
}
-end
+end
View
2 benchmark/bm_vm1_const.rb
@@ -1,7 +1,7 @@
Const = 1
i = 0
-while i<30000000 # while loop 1
+while i<30_000_000 # while loop 1
i+= 1
j = Const
k = Const
View
2 benchmark/bm_vm1_ensure.rb
@@ -1,5 +1,5 @@
i=0
-while i<30000000 # benchmark loop 1
+while i<30_000_000 # benchmark loop 1
i+=1
begin
begin
View
2 benchmark/bm_vm1_ivar.rb
@@ -1,7 +1,7 @@
@a = 1
i = 0
-while i<30000000 # while loop 1
+while i<30_000_000 # while loop 1
i+= 1
j = @a
k = @a
View
2 benchmark/bm_vm1_length.rb
@@ -1,7 +1,7 @@
a = 'abc'
b = [1, 2, 3]
i=0
-while i<30000000 # while loop 1
+while i<30_000_000 # while loop 1
i+=1
a.length
b.length
View
2 benchmark/bm_vm1_neq.rb
@@ -2,7 +2,7 @@
obj1 = Object.new
obj2 = Object.new
-while i<30000000 # while loop 1
+while i<30_000_000 # while loop 1
i+= 1
obj1 != obj2
end
View
2 benchmark/bm_vm1_not.rb
@@ -1,7 +1,7 @@
i = 0
obj = Object.new
-while i<30000000 # while loop 1
+while i<30_000_000 # while loop 1
i+= 1
!obj
end
View
2 benchmark/bm_vm1_rescue.rb
@@ -1,5 +1,5 @@
i=0
-while i<30000000 # while loop 1
+while i<30_000_000 # while loop 1
i+=1
begin
rescue
View
2 benchmark/bm_vm1_simplereturn.rb
@@ -2,7 +2,7 @@ def m
return 1
end
i=0
-while i<30000000 # while loop 1
+while i<30_000_000 # while loop 1
i+=1
m
end
View
2 benchmark/bm_vm1_swap.rb
@@ -1,7 +1,7 @@
a = 1
b = 2
i=0
-while i<30000000 # while loop 1
+while i<30_000_000 # while loop 1
i+=1
a, b = b, a
end
View
2 benchmark/bm_vm2_array.rb
@@ -1,5 +1,5 @@
i=0
-while i<6000000 # benchmark loop 2
+while i<6_000_000 # benchmark loop 2
i+=1
a = [1,2,3,4,5,6,7,8,9,10]
end
View
2 benchmark/bm_vm2_case.rb
@@ -1,5 +1,5 @@
i=0
-while i<6000000 # while loop 2
+while i<6_000_000 # while loop 2
case :foo
when :bar
raise
View
2 benchmark/bm_vm2_defined_method.rb
@@ -3,7 +3,7 @@ class Object
end
i=0
-while i<6000000 # benchmark loop 2
+while i<6_000_000 # benchmark loop 2
i+=1
m; m; m; m; m; m; m; m;
end
View
2 benchmark/bm_vm2_eval.rb
@@ -1,5 +1,5 @@
i=0
-while i<6000000 # benchmark loop 2
+while i<6_000_000 # benchmark loop 2
i+=1
eval("1")
end
View
2 benchmark/bm_vm2_method.rb
@@ -3,7 +3,7 @@ def m
end
i=0
-while i<6000000 # benchmark loop 2
+while i<6_000_000 # benchmark loop 2
i+=1
m; m; m; m; m; m; m; m;
end
View
2 benchmark/bm_vm2_mutex.rb
@@ -3,7 +3,7 @@
m = Mutex.new
i=0
-while i<6000000 # benchmark loop 2
+while i<6_000_000 # benchmark loop 2
i+=1
m.synchronize{}
end
View
2 benchmark/bm_vm2_poly_method.rb
@@ -13,7 +13,7 @@ def m
o2 = C2.new
i=0
-while i<6000000 # benchmark loop 2
+while i<6_000_000 # benchmark loop 2
o = (i % 2 == 0) ? o1 : o2
o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m
i+=1
View
2 benchmark/bm_vm2_poly_method_ov.rb
@@ -13,7 +13,7 @@ def m
o2 = C2.new
i=0
-while i<6000000 # benchmark loop 2
+while i<6_000_000 # benchmark loop 2
o = (i % 2 == 0) ? o1 : o2
# o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m
i+=1
View
2 benchmark/bm_vm2_proc.rb
@@ -7,7 +7,7 @@ def m &b
}
i=0
-while i<6000000 # benchmark loop 2
+while i<6_000_000 # benchmark loop 2
i+=1
pr.call
end
View
2 benchmark/bm_vm2_regexp.rb
@@ -1,6 +1,6 @@
i=0
str = 'xxxhogexxx'
-while i<6000000 # benchmark loop 2
+while i<6_000_000 # benchmark loop 2
/hoge/ =~ str
i+=1
end
View
2 benchmark/bm_vm2_send.rb
@@ -6,7 +6,7 @@ def m
o = C.new
i=0
-while i<6000000 # benchmark loop 2
+while i<6_000_000 # benchmark loop 2
i+=1
o.__send__ :m
end
View
2 benchmark/bm_vm2_super.rb
@@ -14,7 +14,7 @@ def m
obj = CC.new
i = 0
-while i<6000000 # benchmark loop 2
+while i<6_000_000 # benchmark loop 2
obj.m
i+=1
end
View
2 benchmark/bm_vm2_unif1.rb
@@ -2,7 +2,7 @@
def m a, b
end
-while i<6000000 # benchmark loop 2
+while i<6_000_000 # benchmark loop 2
i+=1
m 100, 200
end
View
2 benchmark/bm_vm2_zsuper.rb
@@ -14,7 +14,7 @@ def m a
obj = CC.new
-while i<6000000 # benchmark loop 2
+while i<6_000_000 # benchmark loop 2
obj.m 10
i+=1
end
View
2 benchmark/bm_vm_thread_alive_check1.rb
@@ -1,4 +1,4 @@
-5000.times{
+5_000.times{
t = Thread.new{}
while t.alive?
Thread.pass
View
2 benchmark/bm_vm_thread_mutex1.rb
@@ -3,7 +3,7 @@
require 'thread'
m = Mutex.new
r = 0
-max = 1000
+max = 2000
lmax = max * max
(1..1).map{
Thread.new{
View
2 benchmark/bm_vm_thread_mutex2.rb
@@ -3,7 +3,7 @@
require 'thread'
m = Mutex.new
r = 0
-max = 1000
+max = 2000
lmax = (max * max)/2
(1..2).map{
Thread.new{
View
2 benchmark/bm_vm_thread_mutex3.rb
@@ -3,7 +3,7 @@
require 'thread'
m = Mutex.new
r = 0
-max = 1000
+max = 2000
(1..max).map{
Thread.new{
i=0

0 comments on commit f44446c

Please sign in to comment.
Something went wrong with that request. Please try again.