AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
How to Use Pointers to Save on Memory
You should almost always put things on the stack, which means like, okay, I said that I wrote C for a while before I started with Go and see a really big thing as to pass point cards around. And so I kind of took this practice with me to go, but it's really wrong because anywhere you can copy a struct, which means just pass it around as it is without taking its pointer,. So sticking to that will probably get you a performance boost if you haven't been doing that so far. Yeah.