Dicts 5x Faster than Sets
David Wilson
dw at botanicus.net
Wed Jun 9 17:07:15 EDT 2004
More information about the Python-list mailing list
Wed Jun 9 17:07:15 EDT 2004
- Previous message (by thread): Priting Out in COLOURS
- Next message (by thread): Dicts 5x Faster than Sets
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Jun 09, 2004 at 12:24:25PM -0700, Kamilche wrote:
> Hm, I just saw the 'sets' feature, and ran some timings to see if I
> should use it instead of 'dict' sometimes. I discovered it's 4x slower
> in adding, and 6x slower in removing items!
Which version of Python did you test this on? In the upcoming Python
2.4, sets will be significantly faster, so don't discard their use yet,
as they'll be implemented using native code within the year.
David.
--
"Science is what we understand well enough to explain to a
computer. Art is everything else we do."
-- Donald Knuth
- Previous message (by thread): Priting Out in COLOURS
- Next message (by thread): Dicts 5x Faster than Sets
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list