Speed of hash tables compared to lua

Daniel Kozak kozzi11 at gmail.com
Mon Sep 14 05:25:03 UTC 2020


On Mon, Sep 14, 2020 at 3:55 AM James Blachly via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> On 9/13/20 4:50 PM, Daniel Kozak wrote:
> > I have tried emsi_containers, memutils and  ikod-containers.
> > default D's AA take 1s on my pc
> > emsi_containers take 3s realy slow
> > memutils was fast but does not realy work (seems it is broken because
> > there has been nan at d[0] and many  other indexes)
> > ikod-containers take 242ms
>
> ikod-containers is nice. Don't forget also dklib's khash =)
>
> https://github.com/blachlylab/dklib/
>
>
Does not work, first I have to change

auto map = khash!(keytype, valuetype);

to

auto map = khash!(keytype, valuetype)();

Because I get (source/app.d(20,11): Error: type khash!(uint, double, true,
true) has no value)

And after that it takes 262ms but end up with SIGSEGV.
But it print right sum, so I guess it is something with freeing when try to
dealocate hashmap
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20200914/28da2944/attachment-0001.htm>


More information about the Digitalmars-d mailing list