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

Regexp mem opt #119

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Regexp mem opt #119

wants to merge 10 commits into from

Conversation

zix99
Copy link
Owner

@zix99 zix99 commented Feb 18, 2025

Optimize all matchers into zero-allocs by using passed-in buffer

I've been doing a ton of benchmarking on this, and while it does save some allocs, it actually seems to increase frozen GC time and net-neutral on general runtime. Benchmarks on a regex itself does have significant savings, so it does seem counter-intuitive.

There's more to figure out here before/if merging.

Copy link

netlify bot commented Feb 18, 2025

Deploy Preview for raredocs ready!

Name Link
🔨 Latest commit da99380
🔍 Latest deploy log https://app.netlify.com/sites/raredocs/deploys/67b917273a3bea0008f36b66
😎 Deploy Preview https://deploy-preview-119--raredocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 75.00000% with 20 lines in your changes missing coverage. Please review.

Project coverage is 92.35%. Comparing base (96e50b0) to head (da99380).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
pkg/testutil/mem.go 41.37% 14 Missing and 3 partials ⚠️
pkg/matchers/fastregex/re2.go 81.25% 2 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #119      +/-   ##
==========================================
- Coverage   92.53%   92.35%   -0.19%     
==========================================
  Files         120      122       +2     
  Lines        6255     6315      +60     
==========================================
+ Hits         5788     5832      +44     
- Misses        346      359      +13     
- Partials      121      124       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -7,6 +7,7 @@ type Factory interface {

// A non-thread-safe matcher that can be used to find matches
type Matcher interface {
FindSubmatchIndex(b []byte) []int
FindSubmatchIndexDst(b []byte, dst []int) []int
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs

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.

2 participants