summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--benchmark/bm_so_binary_trees.rb9
-rw-r--r--benchmark/gc/binary_trees.rb1
3 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0868a8e436..cfa2aa0d96 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Jun 20 16:28:33 2013 Koichi Sasada <ko1@atdot.net>
+
+ * benchmark/bm_so_binary_trees.rb: disable `puts' method
+ and change iteration parameter to increase execution time.
+
+ * benchmark/gc/binarytree.rb: added.
+
Thu Jun 20 16:06:37 2013 Koichi Sasada <ko1@atdot.net>
* benchmark/gc/pentomino.rb: added.
diff --git a/benchmark/bm_so_binary_trees.rb b/benchmark/bm_so_binary_trees.rb
index 6a26465578..b1693e4109 100644
--- a/benchmark/bm_so_binary_trees.rb
+++ b/benchmark/bm_so_binary_trees.rb
@@ -4,7 +4,9 @@
# contributed by Jesse Millikan
# disable output
-def STDOUT.write_ *args
+alias puts_orig puts
+def puts str
+ # disable puts
end
def item_check(tree)
@@ -25,7 +27,7 @@ def bottom_up_tree(item, depth)
end
end
-max_depth = 12 # 16 # ARGV[0].to_i
+max_depth = 16 # ARGV[0].to_i
min_depth = 4
max_depth = min_depth + 2 if min_depth + 2 > max_depth
@@ -55,3 +57,6 @@ min_depth.step(max_depth + 1, 2) do |depth|
end
puts "long lived tree of depth #{max_depth}\t check: #{item_check(long_lived_tree)}"
+
+undef puts
+alias puts puts_orig
diff --git a/benchmark/gc/binary_trees.rb b/benchmark/gc/binary_trees.rb
new file mode 100644
index 0000000000..ce1a2d9826
--- /dev/null
+++ b/benchmark/gc/binary_trees.rb
@@ -0,0 +1 @@
+require_relative '../bm_so_binary_trees.rb'