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: rust-lang/regex
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: rust-lang/regex
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ag/tweaks
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Oct 13, 2023

  1. automata/meta: force some prefilter inlining

    In some ad hoc profiling, I noticed an extra function call that really
    didn't need to be there.
    BurntSushi committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    b6aabdc View commit details
    Browse the repository at this point in the history
  2. syntax: loosen ASCII compatible rules

    Previously, patterns like `(?-u:☃)` were banned under the logic that
    Unicode scalar values shouldn't be available unless Unicode mode is
    enabled. But since patterns are required to be UTF-8, there really isn't
    any difficulty in just interpreting Unicode literals as their
    corresponding UTF-8 encoding.
    
    Note though that Unicode character classes, even things like
    `(?-u:[☃])`, remain banned. We probably could make character classes
    work too, but it's unclear how that plays with ASCII compatible mode
    requiring that a single byte is the fundamental atom of matching (where
    as Unicode mode requires that Unicode scalar values are the fundamental
    atom of matching).
    BurntSushi committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    a94d280 View commit details
    Browse the repository at this point in the history
  3. automata/meta: tweak reverse suffix prefilter strategy

    Previously, we were only use the reverse suffix optimization if it found
    a non-empty longest common suffix *and* if the prefilter thought itself
    was fast. This was a heuristic used in the old regex crate before we
    grew the "is prefilter fast" heuristic. We change this optimization to
    just use the "is prefilter fast" heuristic instead of requiring a
    non-empty longest common suffix.
    
    This is, after all, what the inner literal optimization does. And in the
    inner literal case, one should probably be even more conservative
    because of the extra work that needs to be done. So if things are going
    okay with the inner literal optimization, then we should be fine with
    the reverse suffix optimization doing essentially the same thing.
    BurntSushi committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    f6f73f2 View commit details
    Browse the repository at this point in the history
Loading