Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Hashing method #28

Open
Kerrigan29a opened this issue Dec 17, 2018 · 4 comments
Open

Replace Hashing method #28

Kerrigan29a opened this issue Dec 17, 2018 · 4 comments

Comments

@Kerrigan29a
Copy link
Contributor

Kerrigan29a commented Dec 17, 2018

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:

@notnil
Copy link
Owner

notnil commented Dec 17, 2018

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.

@Kerrigan29a
Copy link
Contributor Author

I have implemented it. You can find in #49

@notnil
Copy link
Owner

notnil commented Mar 24, 2020

@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.

@Kerrigan29a
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants