Why Hashes Will Be Faster in Ruby 2.0
The upcoming Ruby 2.0 release contains an interesting performance optimization you may not have heard of before: small Hashes are actually implemented as Arrays!
In this micro talk, I'll:
- review the basic theory behind hash functions and hash tables,
- show you the new internal data structures that Ruby 2.0 uses to save keys and values, and
- present some performance data that proves this optimization exists and how much time it will actually save you.
Do you really need to know how Ruby works internally to be a Ruby devloper? Probably not. But looking "under the hood" is a lot of fun, and someday might help you use the language more competently.