Speed of hash tables compared to lua
James Blachly
james.blachly at gmail.com
Tue Sep 15 01:12:24 UTC 2020
On 9/14/20 1:28 AM, Daniel Kozak wrote:
> On Mon, Sep 14, 2020 at 7:25 AM Daniel Kozak <kozzi11 at gmail.com
> <mailto:kozzi11 at gmail.com>> wrote:
>
>
> 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
>
>
> But this line will fix that for me:
>
> extern(C) __gshared string[] rt_options = [ "gcopt=parallel:0
> cleanup:none" ];
>
> So it is something with GC trying to free already freed memory I geuss
Hmm, thank you for that. We are using extensively internally and have
not had segfault. Can you share the benchmarking code?
I will of course update the readme to include the omitted function call ();
More information about the Digitalmars-d
mailing list