From mboxrd@z Thu Jan 1 00:00:00 1970 From: tfb@tfeb.org (Tim Bradshaw) Date: Thu, 8 Jun 2017 19:41:55 +0100 Subject: [TUHS] Array index history In-Reply-To: <57dce8ab-153d-89ce-91d6-07d9f01f7d6b@kilonet.net> References: <23afd785-e260-75ca-5c46-77c62fbcf3cd@kilonet.net> <016301d2dfc0$b098e250$11caa6f0$@ronnatalie.com> <57dce8ab-153d-89ce-91d6-07d9f01f7d6b@kilonet.net> Message-ID: > On 7 Jun 2017, at 20:15, Arthur Krewat wrote: > > In the days when memory and clock cycles were costly, an extra decrement or subtract was not something to be taken lightly :) Indeed they weren't, and that's how we know that 1-based indexing doesn't require any overhead given a reasonably good compiler. If you'd gone to people writing big CFD simulations in 1975 and told them that by using a version of FORTRAN which had 0-based arrays they could save any significant runtime at all then they would have changed to it without a thought. But they didn't.