-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve performance by improving the handling of hashes
Performance is improved in the following ways: 1. Eliminate Hash.ComputeHash() that returns a string, and Hash.Sum() that converts the string to an array of hash bytes 2. Avoid the use of Enumerable.Skip() and Enumerable.Take() 3. Avoid the use of Array.Reverse() on little-endian architectures Change library to use HashAlgorithm directly. Remove Hash.cs, Hash128.cs and their corresponding tests. Add Utils.HashBytesToUInt32() and Utils.HashBytesToUInt64() functions that convert a set of .NET hash bytes into a uint or ulong regardless of the endianness of the architecture. Fix Utils.HashKernel128() to conform to how HashKernel() works, and fix corresponding unit tests. Add TestProbabilisticDataStructures.TestHashKernelFNV1() that confirms that the HashKernel() function returns the same values as the HashKernel() function in https://github.com/tylertreat/BoomFilters running in Go. Move the original Hash.ComputeHash() that returns a string to Utils.ComputeHashAsString(). This function is no longer used by the library, but the unit tests that use it remain.
- Loading branch information
Showing
10 changed files
with
188 additions
and
414 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.