[phobos] Sealed Hash Tables
David Simcha
dsimcha at gmail.com
Fri Oct 22 07:26:00 PDT 2010
P.S. The builtin hash table is pathetically crufty, buggy, etc. and could
use a rewrite, but even if/when this happens, I still think a separate
sealed container implementation would be a Good Thing.
On Fri, Oct 22, 2010 at 10:22 AM, David Simcha <dsimcha at gmail.com> wrote:
> The main problem with replacing the builtin hash table is that the builtin
> isn't sealed (and as far as I can tell isn't supposed to be). RandAA is
> intended to be sealed and has no clean way of allowing ref access to
> contents. This is the tradeoff that allows very efficient memory management
> in the case of large tables.
>
>
> On Fri, Oct 22, 2010 at 10:06 AM, Andrei Alexandrescu <andrei at erdani.com>wrote:
>
>> If your hash table implementation is interface-compatible with the
>> built-in one and does better than it, the logical path to go is to replace
>> the built-in table with yours. Would you be interested in that?
>>
>> We'd need a battery of tests for such, and I see you already got one from
>> PyDict. Great!
>>
>>
>> Andrei
>>
>>
>> On 10/22/10 8:59 CDT, David Simcha wrote:
>>
>>> I've come to the realization that one of the most annoying library level
>>> problems in D2 is lack of a good hash table implementation for large
>>> tables. The builtin AAs aren't bad for small to medium sized tables, but
>>> are absolutely terrible for large tables due to the way they manage
>>> memory. Is anyone already working on a sealed container implementation
>>> of hash tables? If not, would others be interested in my RandAA
>>> (http://dsource.org/projects/aa) after some cleanup, etc.? I believe
>>> that this design is extremely well suited to the sealed container
>>> paradigm, and it interacts much better with the GC than the builtin
>>> impl. when dealing with large arrays.
>>> _______________________________________________
>>> phobos mailing list
>>> phobos at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/phobos
>>>
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20101022/6ecee585/attachment.html>
More information about the phobos
mailing list