News for hackers. Stuff that matters.
Re:Numbering should start at zero: E.W. Dijkstra by frhack on Friday March 21, 2025 @12:32PM (#43437733)
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.
Re:Numbering should start at zero: E.W. Dijkstra by hulitu on Friday March 21, 2025 @12:36PM (#43437777)
> Starting from zero saves memory.

Computer memory.