Plurrrr

Thu 01 Jul 2021

Hash maps that don’t hate you

The map data-structure is incredibly useful when programming. The first time I used Perl the thing that most impressed me was how easy it was to use hashes, as they call them. I used them for everything! Map is a central feature in Go too — it’s one of the built-in object types with syntax support and generics. I think most people who program in Python have a similar experience. They call them dictionaries, and they are everywhere. In JavaScript, too, every object is a sort of a hash map. When I worked on V8 we had to go to huge lengths to hide the performance consequences of that decision, but I’m still a fan of easy-to-use hash maps in languages.

Source: Hash maps that don’t hate you, an article by Erik Corry.

Compressing JSON: gzip vs zstd

Compressing files adds an overhead. It takes time to compress the file, and it takes time again to uncompress it. However, it may be many times faster to send over the network a file that is many times smaller. The benefits of compression go down as the network bandwidth increases. Given the large gains we have experienced in the last decade, compression is maybe less important today. Having fast decompression is important.

Source: Compressing JSON: gzip vs zstd, an article by Daniel Lemire.