[ZPT] dictionaries, has_key, and the test function
Tim Lynch
lynch@gould.mannlib.cornell.edu
Mon, 16 Dec 2002 16:22:05 EST
sorry, I didn't mean to give the impression that I had concluded *any*
line was a bottleneck. I haven't come to any such conclusion.
I was just wondering what the wisdom of the list was as to what ZPTisms
to use and what ZPTisms to avoid.
just looking for some ZPT'lore is all.
- Tim
Willem wrote:
>
> Tim Lynch wrote:
> > if I could ask a follow-up, of the proposed solutions that have come
> > in over the past few days, does anyone see an approach that might be
> > significantly faster?
>
> Without measuring things, how can you conclude *this* line of the code
> is the speed bottleneck?
>
> > Can't say I've done any benchmarking to verify my impression, but
> > Willem's solution below does seem the fastest.
>
> The amount of code, and the time it takes to run it, are often not
> linearly related.
>
> Measure first!
>
>
> - Willem