This repository has been archived by the owner on Sep 9, 2024. It is now read-only.
Add version of xxHash64 that uses native BigInt #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a new file,
xxhash64-bigint.js
, that uses native JavaScript BigInts rather than the cuint library. I haven't added it to your build scripts or anything like that yet, as I'm not quite sure how it should be packaged. Probably the best thing is to have a separate npm package (eg.xxhashjs-bigint
) that doesn't depend on thecunit
package at all. It could also be added to the existing package, but that means thecunit
package would still be pulled in even when not needed.I've been testing with scripts similar to this:
Which results in output like:
Since it's a new file, the easiest way to view the changes is probably to manually compare the original
xxhash64.js
(after the patch in #23) with the new file. A diff is below:Closes #22