Arrays don't require a linear search, see my post about binary search. It requires a sorted array, but if you've already got that...
In terms of algorithmic complexity short circuiting has no impact on efficiency because the worst case is still O(n) and the average case is O(n/2) which simplifies to O(n), which is still greater than O(lg n)
In reply to Re^2: performance issues with grepping large sorted arrays
by Trizor
in thread performance issues with grepping large sorted arrays
by HarshaHegde
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |