-
Notifications
You must be signed in to change notification settings - Fork 1
Smaller and faster murmur #79
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
Conversation
|
so is this a vendor of that code? is there a good reason not to put it in the dependencies list and install it properly? and if not, how about we make a |
The reason is because the library is on JSR and not on NPM, which requires a custom registry to be set up in I can move it to a vendor/ dir though |
|
Added performance benchmarks, the vendored impl is a little slower Will investigate |
|
Turns out BigInt's make the perf much worse. Will rewrite to use plain numbers. (and address other perf issues) |
|
Performance issues fixed, new benchmarks: |
|
@v1rtl before we go ahead with this we need increased confidence that our vendored and modified code actually produces stable results. This has been a consistent problem with murmur3 (IIRC one of the reasons we use -revisited, see https://cimi.io/murmurhash3js-revisited/ for some of those details). Can you chase down some stable test vectors we could put in here, we only have 2 at the moment, leaving it mostly up to the dependency to get it right. We need to beef up the test suite here if we're going to own the code that does the hashing. Perhaps we can just import test fixtures from murmurhash3js-revisited? If we match that and there are good edge cases in it then this should be OK I hope. |
|
@rvagg thank you for taking time to review and suggesting to add a more comprehensive test suite. I borrowed the tests from revisited and adapted them to the vendored impl (they all pass). Lmk anything else is needed |
|
@v1rtl can you rebase on master please, I've updated some of the CI components here and want to get a clean run |
murmurhashjs3-revisited to have strong types and decrease the bundle size
|
@rvagg done |
|
great, but now we have new lint errors from the updated toolcahin: |
|
will fix |
|
fixed |
|
nice 👌 thanks @v1rtl |
|
🎉 This PR is included in version 2.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Uses a more compact murmur hash implementation by timepp and removes an untyped and heavier
murmurhash3js-revisiteddependency.And it's faster than the previous implementation: