Hacker News new | past | comments | ask | show | jobs | submit login

Of course.

I was just saying that a lot of the time hashmaps don't get very many entries.

There is serialization and deserialization where Cap'n Proto, Flatbuffers, and Protocol Buffers have a savings over JSON by not repeating key names of a list of maps.




I fail to see how is this relevant to the article. HashMap/dict can as well store a mapping from an integer to an integer. Or from a token to an integer, or whatever, and it has nothing to do with serialization, JSON inefficiency or lists of maps.


Use the structure that best fits the problem. The saving to which you refer applies only to serialisation, not to the use of the structure by an algorithm.




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

Search: