I downvoted this node because I think it is an inappropriate suggestion. Rule #1 of benchmarking is don't guess. Rule #2 of benchmarking is optimize what really matters.
The biggest potential problem I can see with this code (without seeing the data set) is that the loop tends to O(n/2) performance. If there are a lot of numbers in the array, it will take a while to find the right number. A hash lookup, tending to O(1) performance, would be much more performant.
In reply to Re: Re: slow CGI's
by chromatic
in thread slow CGI's
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |