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

feat(bench): added comparison between verify and verifyOneShot #31

Merged
merged 1 commit into from Apr 13, 2023

Conversation

H4ad
Copy link
Collaborator

@H4ad H4ad commented Apr 8, 2023

I think I found a regression on crypto.verify after NodeJS 16.x, I was trying to speedup the node-jwa and when I tested on NodeJS 18.x and 19.x, the function was ~4x slower.

@H4ad
Copy link
Collaborator Author

H4ad commented Apr 8, 2023

If the slowdown confirms, I think it is caused by this commit: nodejs/node@8c4b8b2

@H4ad
Copy link
Collaborator Author

H4ad commented Apr 8, 2023

That function (validationFunction) can be the issue, is used by 63 files, if it confirms, that thing slowdown a bunch of other things too.

The definition of that function can be found here: https://github.com/nodejs/node/blob/284e6ac20cc5afe39a0ffeea90b8684f6803d232/lib/internal/validators.js#L419-L422

The difference is now he hides the stackframe.

Edit: The source code of hideStackframe can be found here: https://github.com/nodejs/node/blob/284e6ac20cc5afe39a0ffeea90b8684f6803d232/lib/internal/errors.js#L411-L417

Reading the code, I don't think that function can be the issue but is to only significant thing that changed between NodeJS Versions.

@RafaelGSS RafaelGSS merged commit c2f26bf into RafaelGSS:main Apr 13, 2023
@H4ad H4ad deleted the feat/crypto-verify branch April 13, 2023 03:08
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.

None yet

2 participants