Re:GOTOphobia Considered Harmful (In C)
by worthless-trash on Monday February 27, 2023 @12:54AM
(#34953496)
And we liked it !
I remember in Commodore basic, finding that a period by itself ('.') was parsed as zero, but was actually slightly faster than using zero, and saved a byte every time it was used. In other words, you could write:
10 for i = . to 6.28 step 0.1:next
and it would be slightly faster and smaller than 10 for i = 0 to 6.28 step 0.1:next
Made for some ugly inner loops, but you gotta do what you gotta do. For that matter, we certainly would have removed some of those extra spaces as well. Bytes mattered and whitespace slowed you down.
I remember chasing bytes with short variable names, abbreviated print statements, reducing spaces as much as possible etc.
I had like 28k to play with and I was 14 years old!