-
Notifications
You must be signed in to change notification settings - Fork 16
chore(benchmark): added benchmark for object-hash #39
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
Codecov Report
@@ Coverage Diff @@
## main #39 +/- ##
==========================================
+ Coverage 80.37% 80.49% +0.11%
==========================================
Files 8 8
Lines 968 979 +11
Branches 125 126 +1
==========================================
+ Hits 778 788 +10
- Misses 190 191 +1 see 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
| }, | ||
| "license": "MIT", | ||
| "dependencies": { | ||
| "benchmark": "2.1.4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer it to be a top level devDependency. Benchmark is part of same repo same as tests for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm.. I'm not sure how I can do that with pnpm without touching in tsconfig.json.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me push to the branch (i don't have push access)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added you as a collaborator to my fork, but I think you can easily modify this PR by using Github CLI.
| @@ -0,0 +1,67 @@ | |||
| const Benchmark = require('benchmark'); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not using .mjs for ESM syntax?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not run easily with .ts or .mjs, so instead of fighting with these things I just use commonjs.
But we can change to use .ts, I just don't know how I can make this work in this repo ahashuhas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest node versions have native esm support. We also have jiti here and it uses native ts => cjs/esm transform but it might little bit affect perf.
|
The new performance with all changes merged: To compare, this was the benchmark without the perf improvements: |
|
New changes on M2: |
|
Moving to #40 since i don't have push access to amend here. Thanks for quick and amazing contribs ❤️ |
This is the benchmark that I was using during the tests and improvements.