in reply to Re^2: Check if at least one element of array is bigger than X
in thread Check if at least one element of array is bigger than X
but it still checks the entire list
So what? Maybe that is an issue if the list is tens of thousands of items long and the test is being performed often, but in most cases neither criteria is met and the simplistic grep solution is by far the simplest and most maintainable technique. For the vast majority of cases avoiding grep for efficiency reasons is a perfect example of why we implore people to avoid premature optimisation.
When I was writing my original reply I considered opening that particular can of worms, but given the nature of the OP's question decided that the additional layer of confusion wasn't warranted - sigh.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Check if at least one element of array is bigger than X
by Anonymous Monk on Apr 08, 2010 at 01:41 UTC | |
by ikegami (Patriarch) on Apr 08, 2010 at 02:01 UTC |