How can I speed this function up?

John Machin sjmachin at lexicon.net
Sat Nov 18 02:58:39 EST 2006



On Nov 18, 2:05 pm, Chris <cfri... at bigpond.net.au> wrote:
> with this function I went from 8.04 s to 6.61 s.

And your code became less understandable.

> Now running up against
> my limited knowledge of python. Any chance of getting faster?

You have saved 1.4 *seconds*. What is the normal running time for this
app with 0.5M records? What is 1.4 seconds as a percentage of that?

Please consider that you are barking up the wrong gum tree. Competing
with a C app on speed is not something that experienced Python
programmers would take on lightly.

Talk to your colleague about some of these factors: time to write code,
robustness, clarity, ease of maintenance.

Cheers,
John




More information about the Python-list mailing list