I've been doing a lot of programming in Go lately, and I've caught myself doing optimizations that I'm not sure are even worth it and wanted to get everyone's opinions. Basically, I'm trying to use the smallest type of int possible whenever I can. If I know a number is never going to go above 255 or below 0, I'll use a uint8. If it's never going above 65535, a uint16. And so forth.
It's not exactly a ton of extra effort, but I also don't know if it's just getting compiled away, or if the compiler would end up doing the same or better job handling everything as a standard int. I've also heard that, because processors operate on words rather than bits/bytes, this kind of thing ultimately doesn't matter since they all take up one word of memory anyway.
As for the type of app, it's a server for a game. Lots and lots of structs and lots and lots of TCP packets that all needs to operate with as little delay as possible, so it really does matter whether or not an NPC's health takes up 64 or 16 bits.