Open Kerrigan29a opened 5 years ago
Love it. Ill take a look at it this weekend. @Kerrigan29a if you want to take a stab to compare benchmarks Ill review before then. Also the CPU profiler might be useful.
I have implemented it. You can find in #49
@Kerrigan29a thanks for the pull. I will review it. Definitely a better approach than the current implementation, but I don't like the dependencies outside the standard lib. I have tried to keep those down historically (not as relevant today with module additions). They seem to be used to test for collisions which I totally get but adds a lot of distraction to the repo for just the hash. Let me think on it.
You are welcome. I used golang.org/x/text/language
and golang.org/x/text/message
in the tool to view big numbers with thousands separator. Remove it if you want and just use fmt.Printf
or remove the entire collision checking tools.
The hashing method it's very expensive (because of the MD5 dependency) to use it in any cache or transposition table. I suggest to implement Zobrist hashing wich is the de-facto standard.
Possible reference implementations: