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

Speeded up ConsistentShuffle by doing less string manipulation #11

Merged
merged 1 commit into from
Sep 10, 2016

Conversation

NickNightingale
Copy link
Contributor

In my tests this improves encoding speed by 2 to 10 times depending on the minimum hash length. Maybe letters is not the best choice of variable name for the new char array!

@ullmark
Copy link
Owner

ullmark commented Apr 2, 2015

Great! I will check it out. This code started out as mostly a port of javascript and ruby version, but I have started changing to .NET classes that make more sense, like Stringbuilder etc.

@NickNightingale
Copy link
Contributor Author

Thank for respondings - I've been developing software for more years than I care to remember, but I have never done a github pull request before! I also updated the encode method to use a StringBuilder but that actually seemed to make things marginally slower. I am happy to share that code if you are interested.

@ullmark
Copy link
Owner

ullmark commented Apr 8, 2015

I'll have a look at the updates, I've been thinking of adding a couple of tests to measure the speed. I am currently changing some of the logic to also support long so it might be fun to have a look at the difference for that change.

@ullmark
Copy link
Owner

ullmark commented Jul 9, 2015

@NickNightingale sorry for the hold up on this, wanted to finish up the Int64 support before changing the algoritm.

Been meaning to add some performance tests, could be a goot place to start with that here.

@ullmark ullmark merged commit 0122837 into ullmark:master Sep 10, 2016
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

Successfully merging this pull request may close these issues.

2 participants