Magnus Lie Hetland
mlh at idi.ntnu.no
Mon Nov 5 15:07:31 CET 2001
"Morten W. Petersen" <morten at thingamy.net> wrote in message
news:Pine.LNX.4.21.0111051436400.21948-100000 at bcryachts.atsat.com...
> I'm wondering if there exists any C-based implementations of sequenced
> dictionaries, i.e. dictionaries that will remember the order of the
> objects 'added' on it.
> I have a pure python implementation  but suspect that it will be
> too slow.. Alternatively, if anyone could have a look at it and give
> some optimization tips, that would be greatly appreciated.
Just a thought... You might want to consider using a tree structure.
There you get ordering _and_ logarithmic lookup. I think there are
several implementations out there, both in Python and as C extension
Magnus Lie Hetland The Anygui Project
More information about the Python-list