Hacker Newsnew | past | comments | ask | show | jobs | submit | TheNumbat's commentslogin


Yeah, this would be great! Currently only 128-bit SSE/NEON is working but AVX is coming very soon. There's also nothing blocking Windows, but it will require some work. (I added the SIMD support in OxCaml)


FWIW, the "Get OxCaml" page actually says that SIMD on ARM isn't supported yet. If it actually works it would be worth removing that from the known issues list https://oxcaml.org/get-oxcaml/


Indeed, it says that because we don't have a library of NEON intrinsics (like ocaml_simd_sse) yet, but the extension itself works.


Ah, that clears it up a bit. Thanks! Looking forward to all of this. (For the interested readers, here's the SSE library: https://github.com/janestreet/ocaml_simd/tree/with-extension...)


Cool to hear there aren't any technical blockers to add Windows support! You just convinced me into giving OxCaml a try for a hobby project. 128-bit SSE is likely to be enough for my use case and target specs.


David Allsopp had an oxcaml branch compiling on Windows a few months ago, so it’s in the queue…


This is so cool.


See footnote 3.


Yes - upcoming posts will cover the uniqueness and data-race-freedom designs.


I was actually wondering about that - it appears a (i+i^2)/2 sequence makes insertions (and by extension erases with rehashing) 7-10% faster, which is pretty significant. Lookups and probe lengths are about the same, so I think the conclusions stand.


Agreed - I do mention in the post that open addressing is impractical when using intrusive linked lists, which are common in low level data structures.


I just benchmarked absl::flat_hash_map and got results comparable to Robin Hood with a load factor between 75% and 90%, which makes sense. It's also faster for looking up missing keys, so seems like a good option. I didn't benchmark the maximum probe lengths, though, so not sure on that front.


I tied adding the maps to the [1] benchmark, but I wasn't able to, since they aren't type generic yet. You may want to benchmark against [2], and [3] which are the best performing ones in the above benchmark.

[1] https://github.com/martinus/map_benchmark/

[2] https://github.com/martinus/unordered_dense/blob/main/includ...

[3] https://github.com/ktprime/emhash

Edit: I had the wrong link for [2] and [3], somehow...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: