Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Big-O notation refers to asymptotic behavior. The zipmap encoding of hashes only matters for small values bounded by a constant, so hash lookups are still expected O(1) time in Redis.

</extreme-pedantry>



Your point would be valid if the memory gain observed was not directly dependent on the fact that hashes are zipmap-encoded. So the trade-off here is between the constant factor of time complexity and the constant factor of memory complexity.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: