
On Tue, Nov 18, 2008 at 3:52 PM, Don Stewart
dave:
2008/11/18 kenny lu
: The above number shows that my implementations of python style dictionary are space/time in-efficient as compared to python.
Can some one point out what's wrong with my implementations?
This isn't really a fair comparison. Map, IntMap, and Trie are persistent data structures, and Python dictionaries are ephemeral. (That is, when you "add" a key to a Map, you actually create a new one that shares structure with the old one, and both can be used in subsequent code. In Python, you would have to copy the dictionary.)
Strings, not ByteStrings. that's the difference.
Is that in response to what I wrote, or to the original question?
Speaking of ByteStrings and tries, has anyone implemented a Patricia
Trie for ByteStrings? I started putting one together a while back, but
I got distracted and never finished it.
--
Dave Menendez