[Tutor] optimization: faster than for
Kent Johnson
kent37 at tds.net
Sun Jul 1 06:28:39 CEST 2007
elis aeris wrote:
> my question, is there any other way to make it run faster,
>
> as described in the webpage, it's possible to use map() but I don't
> know how to do it with this one, 2 dimensional arrays.
How about
number_scanned = 1024 * 768 ?
But seriously, the example you gave doesn't do any real work, it is just
contrasting two methods of looping.
If this is a continuation of the 200 dollar questions thread, Luke has
given you some good ideas but you don't seem to like them.
In both cases, you are asking for optimizations of artificial problems.
There is no point in even asking that question. You have to optimize the
code that actually solves the problem you care about.
Kent
More information about the Tutor
mailing list