AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
The Importance of Memory Allocation in a Database
The standard library gives us the encoding slash binary package. And there we have this binary.read method which I think looks really cool. If you run this code and there's no error then basically you get exactly what you want. You could turn those sort of four bytes that were somewhere on disk, turn them into our in memory representation of that UN32. So is this a good idea to do that exactly like well if you do it once or maybe twice, it could be a good idea. If you do it a billion times, this is what happens. This is very short lift. And this is cheap and fast to allocate. And why is it cheap?