LISTS: Extract every other element - SUMMARY
Christian Tismer
tismer at appliedbiometrics.com
Sun Dec 19 15:19:28 EST 1999
Mike Fletcher wrote:
>
> Not with my testing on the code-as-given (incidentally, code as given had a
> nameerror on p in the second loop setup). I get:
Oops, I really thought a loop initilizes its variable always.
Thanks! :-)
>
> 1.098 -- algo7
> 1.052 -- for with multiply
> 1.134 -- for with divide
> 0.421 -- matrix step-slice
> 0.428 -- matrix reshape
>
What funny machine/Python do you have ???
Algo 7 is 2.5 times faster on my P200 /Py1.5.2/Windooze.
Here Algo 8 vs. Algo 7: (as expected):
>>> timing(algo7, data, 10)[0]
1.15
>>> timing(algo8, data, 10)[0]
1.1
>>>
Hääh? Stunned-ly y'rs - chris
--
Christian Tismer :^) <mailto:tismer at appliedbiometrics.com>
Applied Biometrics GmbH : Have a break! Take a ride on Python's
Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net
10553 Berlin : PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF
we're tired of banana software - shipped green, ripens at home
More information about the Python-list
mailing list