3 ms·
Starting from zero saves memory. If I have a variable used as an index for an array of 256 elements, starting from 0 allows me to store it in a single byte. If
by frhack 2y ago
Starting from zero saves memory.
If I have a variable used as an index for an array of 256 elements, starting from 0 allows me to store it in a single byte. If I start from 1, I need two bytes, effectively doubling the memory usage—an unnecessary 100% increase.
Now, multiply this inefficiency across every instance where programs encounter a similar situation.
- hulitu 2y ago> Starting from zero saves memory. Computer memory.