Plurrrr

Sun 09 Jan 2022

Saving a Third of Our Memory by Re-ordering Go Struct Fields

We had application at one of my previous companies that typically ran with ~2GB in memory at any given time, but simply changing the order of some uint variables we managed to drop the memory usage to less than 1.4GB. Let’s dive into how inefficient field ordering in Go structs can have a huge impact on the memory footprint of a program.

Source: Saving a Third of Our Memory by Re-ordering Go Struct Fields, an article by Lane Wagner.

Hashing is not encryption

In a job interview years ago, the interviewer asked me to explain the difference between encryption, encoding, and hashing. At the time I was working for a company that specialized in encryption, so I took knowing the difference for granted.

It wasn’t until much later that I understood how easily most folks can confuse the three topics for one another. Let’s take a look at each in turn.

Source: Hashing is not encryption, an article by Eric Mann.