Performance: sets vs dicts.

John Bokma john at
Thu Sep 2 02:11:03 CEST 2010

Terry Reedy <tjreedy at> writes:

> On 9/1/2010 5:40 PM, John Bokma wrote:


> Yes, I switched, because 'constant time' is a comprehensible claim
> that can be refuted and because that is how some will interpret O(1)
> (see below for proof;-).

You make it now sound alsof this interpretation is not correct or out of
place. People who have bothered to read ItA will use O(1) and constant
time interchangeably while talking of the order of growth of the running
time algorithms and most of those are aware that 'big oh' hides a
constant, and that in the real world a O(log n) algorithm can outperform
an O(1) algorithm for small values of n.

>> Uhm, O(1) /is/ constant time, see page 45 of Introduction to Algorithms,
>> 2nd edition.

John Bokma                                                               j3b

Blog:    Facebook:
    Freelance Perl & Python Development:

More information about the Python-list mailing list