Performance: sets vs dicts.

John Bokma john at castleamber.com
Wed Sep 1 20:13:43 EDT 2010


Robert Kern <robert.kern at gmail.com> writes:
> On 9/1/10 4:40 PM, John Bokma wrote:
>> Arnaud Delobelle<arnodel at googlemail.com> writes:
>>>>> Terry Reedy<tjreedy at udel.edu> writes:

[...]
>>> I don't understand what you're trying to say. Aahz didn't claim that
>>> random list element access was constant time, he said it was O(1) (and
>>> that it should be part of the Python spec that it is).
>>>> Uhm, O(1) /is/ constant time, see page 45 of Introduction to Algorithms,
>> 2nd edition.
>> While we often use the term "constant time" to as a synonym for O(1)
> complexity of an algorithm, Arnaud and Terry are using the term here
> to mean "an implementation takes roughly the same amount of wall-clock
> time every time".

Now that's confusing in a discussion that earlier on provided a link to
a page using big O notation. At least for people following this
partially, like I do.
-- 
John Bokma j3b
Blog: http://johnbokma.com/ Facebook: http://www.facebook.com/j.j.j.bokma
 Freelance Perl & Python Development: http://castleamber.com/


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /