Proposed implementation for an Ordered Dictionary
Raymond Hettinger
python at rcn.com
Thu Feb 26 23:54:40 EST 2009
More information about the Python-list mailing list
Thu Feb 26 23:54:40 EST 2009
- Previous message (by thread): Proposed implementation for an Ordered Dictionary
- Next message (by thread): Proposed implementation for an Ordered Dictionary
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Paul Rubin] > Ehh, I guess I'm not surprised at the slowdown and extra complexity > from the second dict. Oh well. If the module really turns out to be > really used a lot, another (messy) approach would be to write a C > extension that uses a doubly linked list some day. That seems like an ideal implementation to me. O(1): appending, popping, searching, and deletion O(n): traversal Raymond
- Previous message (by thread): Proposed implementation for an Ordered Dictionary
- Next message (by thread): Proposed implementation for an Ordered Dictionary
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list