Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: swiftlang/swift-experimental-string-processing
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: swiftlang/swift-experimental-string-processing
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: feature/perf
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 4 commits
  • 15 files changed
  • 1 contributor

Commits on Oct 7, 2025

  1. [perf] Create a flattened representation of DSLTree (#831)

    This change simplifies the pre-compilation representation of the
    regex to store a pre-order traversal of the syntax tree in an array
    instead of an indirect enum. This enables an optimization pass that
    can index into and mutate the tree more easily.
    
    This change includes tests that verify that list-based compilation
    generates the same instructions as the original tree-based
    compilation, and switches to the list-based compilation. This
    change also eliminates the "literal wrapper" node that preserved
    AST – we aren't using the saved AST, so it resulted in unneeded 
    links in the chain.
    
    Because parsing still generates an AST which is converted to a
    DSLTree before the new list, regex compilation may be slower
    until the intermediate DSLTree is fully removed.
    natecook1000 authored Oct 7, 2025
    Configuration menu
    Copy the full SHA
    4cdb58a View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2025

  1. Add benchmark job in CI (#833)

    Also tweaks the RegexBenchmark formatting/settings a bit.
    natecook1000 committed Oct 14, 2025
    Configuration menu
    Copy the full SHA
    62b0ae2 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2025

  1. [perf] Implement auto-possessification (#832)

    This optimization recognizes quantifications followed by
    an atom that can't be matched at the start of the quantification,
    and converts them to possessive, eliminating any backtracking
    at that position. This change includes an accessor for the
    first "required" atom (which will be used in other
    optimizations), and converts DSL.QuantificationKind to a
    struct to support the possessification changes.
    
    When deciding on exclusion during auto-possessification, awareness of
    the current matching options is important for correct analysis. For
    example, /a+A/ can be auto-possessified, but the case insensitive
    pattern /(?i)a+A/ cannot be.
    natecook1000 authored Oct 16, 2025
    Configuration menu
    Copy the full SHA
    e539ac1 View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2025

  1. Configuration menu
    Copy the full SHA
    f27b1b7 View commit details
    Browse the repository at this point in the history
Loading