@alex_gaynor @wycats @evanphx I just benchmarked 10 million (with small hash): a.each_key{ |k| a[k] } => 3s, a.each_pair{ |k,v| v } => 10s
@conradirwin what about each_key with a hash lookup inside? @alex_gaynor @evanphx
-
-
@wycats@alex_gaynor@evanphx 3x faster (it's in the tweet), a.each{ |k,v| } is basically the same as each_pair -
@conradirwin@wycats@alex_gaynor@evanphx it is exactly the same. Both use rb_hash_each_pair (checked in 2.0) -
@apeiros@conradirwin@wycats@alex_gaynor ok, thought so. That’s sad.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.