It’s for their servers. I guess it might have to do with cache optimization reasons. For performance reasons, they want to ensure they can fit as much as possible in the cache. One extra byte can throw the memory alignment off, which cause wasted space in cache.
On a device with many gigabytes of RAM and probably terabytes of storage.
I guess when you have billions of users, and presumably tens or hundreds of billions of instances of a thing living in your sever every bit adds up? I don't even know where to even start doing the napkin math for something like that.
100 billion messages per day and over half of them in groups apparently. It's a lot, but 3 bytes per message is still not a lot of data. I'd guess they pack the metadata as tight as possible.
That's the thing, right? What's "a lot of data" at these scales? Since they keep all these messages indefinitely (and users keep up to two copies of each, too) that's 100 gigs of data per byte that they save per day. 40 Terabytes per year. Plus 40 more among their collective users and another 40 presumably stashed in some Google Drive somewhere.
It's a lot for me, and it'll cost you what? A couple grand to store at home? That's a drop in the ocean of a company like Meta with petabytes upon petabytes of garbage stored all over the place... but then again, if I was making a thing and I could shave 40TB a year of storage I... probably would?
I don't know, the scope of modern, monopolistic online services is mind-boggling. I'm in the space where I'm savvy enough to understand how massive this nonsense is but also not working on it directly enough to be desensitized about the numbers. It's like trying to figure out how many people live on the planet, your brain can parse that it can't parse what you're trying to do and the dissonance makes you all wobbly.
I get what you’re saying but I don’t like this line of thinking. In the tech industry there is far too much bloat that we just accept due to cheap memory and storage.
There's much better algorithmic and datatype optimizations to be made than to design your app around saving 3 bytes that most runtimes probably represent as a long long anyways
True but more generally things like Electron apps, not precompiling classes in interpreted languages’ Docker images, looping through millions of records without plucking only the data you need, etc seem to be widespread and shrugged off.
While writing code you can get in the habit of doing things efficiently and long-term the cost savings pile up. Obviously caring about only this one specific case will hardly accomplish much on its own.
How about the processor optimization as your 8 bit number needs to be packed and unpacked every time you want to use it?
I you read the responses here, there's enough ambiguity about the choice of 256 users to maybe put a damper on the reflext to gatekeep computer science from a journalist.