Well, no. They are not certainly using int
, they might be using a more efficient data type.
This might be for legacy reasons or it might be intentional because it might actually matter a lot. If I make up an example, chat_participant_id
is definitely stored with each message and probably also in some index, so you can search the messages. Multiply this over all chats on WhatsApp, even the ones with only two people in, and the difference between u8
and u16
might matter a lot.
But I understand how a TypeScript or Java dev could think that the difference between 1 and 4 bytes is negligible.
There are only two hard problems in computer science:
I'm afraid you've fell victim to the problem 2.