Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add profiling script

run this with ruby-prof
  • Loading branch information...
commit 11155ca2903b21fd2f15d8ece72af1e0745414f5 1 parent 1f6c0c5
Hiroshi Nakamura authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 bench/profile.rb
13 bench/profile.rb
View
@@ -0,0 +1,13 @@
+require File.expand_path('../lib/avl_tree', File.dirname(__FILE__))
+
+random = Random.new(0)
+
+TIMES = 200000
+key_size = 10
+
+h = AVLTree.new
+TIMES.times do
+ h[random.bytes(key_size)] = 1
+ h[random.bytes(key_size)]
+ h.delete(random.bytes(key_size))
+end
Please sign in to comment.
Something went wrong with that request. Please try again.