[squeak-dev] Re: The Inbox: Collections-ul.601.mcz
leves at elte.hu
Wed Jan 21 07:46:27 UTC 2015
I think the only way to do it is to duplicate the code. But going that way
would have other tradeoffs.
What is more important? To have O(1) time removal, or to have O(1) time
access by index?
Looking at the Python docs, I think that dictionary is implemented by
using a linked list, because it doesn't look like it supports access by
index, but it can remove both the first and the last pair.
On Mon, 19 Jan 2015, Marcel Taeumel wrote:
> Nice! :)
> Do you have any ideas about the array-to-order mapping to make removal O(1)?
> The array access seems quite hidden in Dictionary and not reachable via
> subclassing w/o much code duplication...
> View this message in context: http://forum.world.st/The-Inbox-Collections-ul-601-mcz-tp4800473p4800576.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
More information about the Squeak-dev