Faster dictionaries?

sig siguctua at gmail.com
Thu Jul 19 12:10:53 UTC 2007


its a scratch implementation of dictionaries using linked list of associations.
dont care about names, care about numbers:
(code to run taken from MaDictionary class comment)

magma vs mine:

time to add to sd: 161
time to add to md: 1865
time to access to sd: 124
time to access to md: 597
time to replace to sd: 114
time to replace to md: 676
time to remove 300 from sd: 2
time to remove 300 from md: 3568
--
sd - my dictionary
md - MaWeakIdentityKeyDictionary

smalltalk vs mine:
--
time to add to sd: 159
time to add to md: 63178
time to access to sd: 147
time to access to md: 49052
time to replace to sd: 132
time to replace to md: 50736
time to remove 300 from sd: 2
--
sd - my dict
md - smalltalk Dictionary. removing keys takes forever, so i stopped
it before it printed a result..
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BucketDictionary.st
Type: application/octet-stream
Size: 4580 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070719/685544b3/BucketDictionary.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DictBucket.st
Type: application/octet-stream
Size: 1335 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070719/685544b3/DictBucket.obj


More information about the Squeak-dev mailing list