GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||
GeezerVison is showing github.com — fs: cache glob matcher functions in path.matchesGlob by beeequeue · Pull Request #63915 · nodejs/node Conversation
Contributor
this PR adds benchmarks for rationalemost glob matching libraries in the ecosystem (including node doesn't provide such an API, and does not re-use matchers when possible, leading to it being much slower (10-15x) than just using implementation detailsi decided to "hide" away the cache inside the function rather than add a new API as most users will expect the function to not be a potential footgun, and the pattern has been used before in zeptomatch since i went with the simplest testingi'm not sure how to test this properly, e.g. if i should export the cache instance and check its size, etc some guidance here is very appreciated :) benchmark resultsran on my windows 11 machine with an AMD Ryzen 9800X3D note: these benchmarks do not test the case where we evict keys from the cache i also have a personal benchmarking repo where i found this issue, where the results now look like this:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
beeequeue
commented
Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i re-used i thought about putting the caching in that function instead, but then we would need to base the caching on all the options it accepts, so i decided to keep it here.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsSigned-off-by: Adam Haglund <[email protected]>
beeequeue
force-pushed
the
matchesGlob-perf
branch
from
83d6da0 to
d158f29
Compare
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. Signed-off-by: Adam Haglund <[email protected]>
beeequeue
force-pushed
the
matchesGlob-perf
branch
from
d158f29 to
f87f628
Compare
avivkeller
approved these changes
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
mcollina
approved these changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lgtm
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
pushed a commit
that referenced
this pull request
Signed-off-by: Adam Haglund <[email protected]> PR-URL: #63915 Reviewed-By: Aviv Keller <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
nodejs-github-bot
pushed a commit
that referenced
this pull request
Signed-off-by: Adam Haglund <[email protected]> PR-URL: #63915 Reviewed-By: Aviv Keller <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
aduh95
pushed a commit
that referenced
this pull request
Signed-off-by: Adam Haglund <[email protected]> PR-URL: #63915 Reviewed-By: Aviv Keller <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
aduh95
pushed a commit
that referenced
this pull request
Signed-off-by: Adam Haglund <[email protected]> PR-URL: #63915 Reviewed-By: Aviv Keller <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
aduh95
pushed a commit
that referenced
this pull request
Signed-off-by: Adam Haglund <[email protected]> PR-URL: #63915 Reviewed-By: Aviv Keller <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
aduh95
pushed a commit
that referenced
this pull request
Signed-off-by: Adam Haglund <[email protected]> PR-URL: #63915 Reviewed-By: Aviv Keller <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
aduh95
pushed a commit
that referenced
this pull request
Signed-off-by: Adam Haglund <[email protected]> PR-URL: #63915 Reviewed-By: Aviv Keller <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
aduh95
pushed a commit
that referenced
this pull request
Signed-off-by: Adam Haglund <[email protected]> PR-URL: #63915 Reviewed-By: Aviv Keller <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
RafaelGSS
pushed a commit
that referenced
this pull request
Signed-off-by: Adam Haglund <[email protected]> PR-URL: #63915 Reviewed-By: Aviv Keller <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
RafaelGSS
pushed a commit
that referenced
this pull request
Signed-off-by: Adam Haglund <[email protected]> PR-URL: #63915 Reviewed-By: Aviv Keller <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
aduh95
pushed a commit
that referenced
this pull request
Signed-off-by: Adam Haglund <[email protected]> PR-URL: #63915 Reviewed-By: Aviv Keller <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
aduh95
pushed a commit
that referenced
this pull request
Signed-off-by: Adam Haglund <[email protected]> PR-URL: #63915 Reviewed-By: Aviv Keller <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
author ready
ProjectsMilestoneNo milestoneDevelopmentSuccessfully 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. | ||||||||||||||||||||||
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |