Re:Again on 0-based vs. 1-based indexing
by adrian_b on Wednesday January 20, 2021 @08:03AM
(#25845911)
Yes, but checked indexing requires only one comparison with the upper limit when your indices are 0-based, instead of 2 comparisons, when the starting index is different from 0.
The sign of the index can be determined without a comparison, usually simultaneously with one of the previous operations.
The sign of the index can be determined without a comparison, usually simultaneously with one of the previous operations.