Using functional tools

RPM1 rpm1deletethis at frontiernet.net
Sat May 4 19:39:35 EDT 2002


"Alex Martelli" <aleax at aleax.it> wrote ..


>
> Numeric, as you see, seem even faster than your extension
> (6 times, rather than 4 times, as fast as the slowest Python
> code, the one you give as reference).  I hope it _is_ well
> known that Numeric is often quite worthwhile even for heavy
> array manipulations that have nothing particularly 'numeric'
> about them:-).
>
> Personally, unless I was already using Numeric for something
> else in the program, I'd just code the list comprehension --
> unless and until measurements showed that these few hundredths
> of a second (for index-lists of a hundred thousand items) are
> part of my program's bottlenecks, of course, in which case I'd
> turn to Numeric.

Actually I like the Numeric solution.  And since this is a chess program,
this function will easily be called 100's of millions of times.  So ANY
savings is worth while.

Thanks!
Patrick






More information about the Python-list mailing list