Skip to content

Instantly share code, notes, and snippets.

@verus
Created February 6, 2012 06:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save verus/1750241 to your computer and use it in GitHub Desktop.
Save verus/1750241 to your computer and use it in GitHub Desktop.
arya = (1..100000).map{ rand(1000) }
aryb = (1..100000).map{ rand(1000) }
stra = arya.map{|e| e.to_s }
strb = aryb.map{|e| e.to_s }
syma = stra.map{|e| e.to_sym}
symb = strb.map{|e| e.to_sym}
start = Time.now
puts syma == symb
puts Time.now - start
start = Time.now
puts stra == strb
puts Time.now - start
start = Time.now
puts stra == strb
puts Time.now - start
start = Time.now
puts syma == symb
puts Time.now - start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment