News for hackers. Stuff that matters.
Re:Storing hundreds of millions of simple key-value pairs in... by firefoxman1 on Tuesday November 01, 2011 @08:35PM (#3184828)
Wow I didn't realize that redis zipmap lookups aren't actually O(1). I found a document that describes zipmaps as "very memory efficient data structure to represent string to string maps, at the cost of being O(N) instead of O(1) for most operations. Since the constant times of this data structure are very small, and the zipmaps are converted into real hash tables once they are big enough, the amortized time of Redis hashes is still O(1), and in the practice small zipmaps are not slower than small hash tables because they are designed for good cache locality and fast access."

http://redis-docs.readthedocs.org/en/latest/Hashes.html

There are no comments on this comment yet.