Skip to content

regex: vpcre more optimizations 😄 #26613

Merged
spytheman merged 5 commits into
vlang:masterfrom
penguindark:vpcre
Feb 15, 2026
Merged

regex: vpcre more optimizations 😄 #26613
spytheman merged 5 commits into
vlang:masterfrom
penguindark:vpcre

Conversation

@penguindark

Copy link
Copy Markdown
Member

What's in

  • added more optimizations:
    • Zero-Allocation Search: Reuses a pre-allocated Machine workspace for search operations.
    • Anchored Optimization: Patterns starting with '^' skip the scanning loop.
    • Prefix Skipping: Using Boyer-Moore-like skipping for literal prefixes.

Usage change

  • use of a direct struct variable to change max_stack_depth (I prefer to avoid fn call for this, should be not a problem because the function was merged only yesterday.)
    r.change_stack_depth(4000) => r.max_stack_depth = 4000

AI support: Gemini pro 3 preview

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 01f66ac933

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread vlib/regex/pcre/regex_test.v

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @penguindark 🙇🏻 .

@spytheman spytheman merged commit 53bb04c into vlang:master Feb 15, 2026
78 checks passed
cestef pushed a commit to cestef/v that referenced this pull request Mar 9, 2026
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