GeezerVison is showing github.com — crypto: use new.target instead of instaceof to detect construct calls by joyeecheung · Pull Request #51026 · nodejs/node
Conversation
joyeecheung
commented
Dec 3, 2023
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
The former is much more performant.
Refs: nodejs/performance#136
On macOS + M2:
confidence improvement accuracy (*) (**) (***)
crypto/webcrypto-digest.js n=100000 method='SHA-1' data=10 sync='createHash' *** 4.19 % ±1.05% ±1.40% ±1.84%
crypto/webcrypto-digest.js n=100000 method='SHA-1' data=100 sync='createHash' *** 4.83 % ±0.64% ±0.85% ±1.10%
crypto/webcrypto-digest.js n=100000 method='SHA-1' data=20 sync='createHash' ** 3.77 % ±2.59% ±3.49% ±4.62%
crypto/webcrypto-digest.js n=100000 method='SHA-1' data=50 sync='createHash' *** 5.10 % ±0.56% ±0.75% ±0.98%
crypto/webcrypto-digest.js n=100000 method='SHA-256' data=10 sync='createHash' *** 5.82 % ±2.27% ±3.05% ±4.04%
crypto/webcrypto-digest.js n=100000 method='SHA-256' data=100 sync='createHash' *** 5.86 % ±2.46% ±3.31% ±4.37%
crypto/webcrypto-digest.js n=100000 method='SHA-256' data=20 sync='createHash' *** 5.92 % ±2.24% ±3.02% ±4.00%
crypto/webcrypto-digest.js n=100000 method='SHA-256' data=50 sync='createHash' *** 5.67 % ±0.50% ±0.66% ±0.87%
crypto/webcrypto-digest.js n=100000 method='SHA-384' data=10 sync='createHash' *** 4.68 % ±0.72% ±0.96% ±1.25%
crypto/webcrypto-digest.js n=100000 method='SHA-384' data=100 sync='createHash' *** 5.83 % ±2.52% ±3.39% ±4.49%
crypto/webcrypto-digest.js n=100000 method='SHA-384' data=20 sync='createHash' * 2.91 % ±2.73% ±3.68% ±4.88%
crypto/webcrypto-digest.js n=100000 method='SHA-384' data=50 sync='createHash' *** 4.19 % ±0.79% ±1.06% ±1.39%
crypto/webcrypto-digest.js n=100000 method='SHA-512' data=10 sync='createHash' ** 3.51 % ±2.28% ±3.07% ±4.06%
crypto/webcrypto-digest.js n=100000 method='SHA-512' data=100 sync='createHash' *** 5.01 % ±0.54% ±0.71% ±0.93%
crypto/webcrypto-digest.js n=100000 method='SHA-512' data=20 sync='createHash' ** 4.38 % ±2.64% ±3.53% ±4.64%
crypto/webcrypto-digest.js n=100000 method='SHA-512' data=50 sync='createHash' ** 4.01 % ±2.40% ±3.22% ±4.26%
crypto/create-hash.js n=100000 *** 6.77 % ±3.00% ±3.99% ±5.20%
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
bricss and CanadaHonk reacted with rocket emoji
The former is much more performant.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
There's a typo in the commit message (instaceof)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
commit-queue-squash
PRs the Commit Queue should land as one squashed commit.
crypto
Issues and PRs related to the crypto subsystem.
needs-ci
PRs that need a full CI run.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|