[ZPT] dictionaries, has_key, and the test function

Willem Broekema willem@pastelhorn.com
Mon, 16 Dec 2002 19:27:36 +0100


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