Would be interesting to implement FxHash in Nim and see how that changes 
performance. The source for it can be found 
[here](https://docs.rs/fxhash/latest/src/fxhash/lib.rs.html#11-324), so should 
be easy enough. Nim appears to use Murmurhash which hashes 32 bits at a time, 
so better than the default in Rust which apparently only does one byte at a 
time.

I tried converting the Table to just a seq of a key/value tuple which just 
scans the sequence for the right key. It was faster than the current Table 
implementation (it generally is up to a certain size). I also tried a tuple of 
a key and a value seq, still faster than Table, but slower than the interleaved 
version.

We do get a bit screwed by not being able to use `-d:danger` it speeds it up 
considerably. Does Go even have the kinds of checks that `-d:release` performs? 
It seems crazy fast if its doing the same work. That being said I did notice 
that the output from the Go version and the Nim version is a bit different. 
Haven't quite been able to pin down what the difference is, but it seems like 
one of the solutions potentially does something wrong.

Reply via email to