| 9 Aug 2021 |
Mic92 | There are different hash table implementations one can use. | 12:14:41 |
Mic92 | llvm also has a hash set specific to symbols that allocates strings within the hash table to save memory. | 12:15:08 |
Mic92 | I guess a count should be cheaper than a malloc but maybe you can do the benchmark. | 12:16:08 |
manveru | well, i'd imagine a count won't allocate anything in the GC, so it should help for stuff like haskell.nix which has a ton of symbols afaik... | 12:20:46 |
andi- | Why count over find? Do you fear the allocation an allocator might produce? count could probably be more costly than find that (should?) return on the first positive match. | 12:40:15 |