about summary refs log tree commit homepage
path: root/lib/rainbows/rev.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-02-11 22:15:29 -0800
committerEric Wong <normalperson@yhbt.net>2010-02-11 22:23:40 -0800
commitde6b5dd5ffff6e21064f78f24c30c59e391ff370 (patch)
treedbb55da2b6b18f176aac3296e4327cc0fefad5ec /lib/rainbows/rev.rb
parent71b8fff3d8d171c9770bb8c69767341c10d9c962 (diff)
downloadrainbows-de6b5dd5ffff6e21064f78f24c30c59e391ff370.tar.gz
When available (Ruby 1.9), we can use Hash#compare_by_identity
to improve performance.
Diffstat (limited to 'lib/rainbows/rev.rb')
-rw-r--r--lib/rainbows/rev.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/rainbows/rev.rb b/lib/rainbows/rev.rb
index 197d138..6650c2b 100644
--- a/lib/rainbows/rev.rb
+++ b/lib/rainbows/rev.rb
@@ -31,6 +31,11 @@ module Rainbows
     # all connected clients
     CONN = {}
 
+    if {}.respond_to?(:compare_by_identity)
+      CONN.compare_by_identity
+      KATO.compare_by_identity
+    end
+
     include Core
   end
 end