swiftlang / swift-experimental-string-processing

An early experimental general-purpose pattern matching engine for Swift.
Apache License 2.0
278 stars 47 forks source link

Processor cleanup #655

Closed milseman closed 1 year ago

milseman commented 1 year ago
=== Regressions ======================================================================
- LinesAll                                3.01ms    2.88ms  128µs       4.4%
- NotFoundAll                             6.86ms    6.81ms  50.7µs      0.7%
- HangulSyllableAll                       6.71ms    6.67ms  40µs        0.6%
- CssAll                                  3.55ms    3.51ms  34.9µs      1.0%
=== Improvements =====================================================================
- EmailLookaheadNoMatchesAll              39.7ms    40.7ms  -1.07ms     -2.6%
- CompilerMessagesAll                     112ms 113ms   -927µs      -0.8%
- BasicCCC                                10.2ms    10.9ms  -700µs      -6.4%
- DiceRollsInTextAll                      45ms  45.7ms  -690µs      -1.5%
- InvertedCCC                             20.2ms    20.8ms  -644µs      -3.1%
- BasicRangeCCC                           10.5ms    11ms    -502µs      -4.5%
- CaseInsensitiveCCC                      11.3ms    11.7ms  -493µs      -4.2%
- AnchoredNotFoundWhole                   8.09ms    8.58ms  -493µs      -5.7%
- BasicBuiltinCharacterClassAll           8.22ms    8.68ms  -458µs      -5.3%
- EmailLookaheadList                      9.26ms    9.66ms  -403µs      -4.2%
- ReluctantQuantWhole                     10.4ms    10.7ms  -245µs      -2.3%
- WordsAll                                13.2ms    13.5ms  -220µs      -1.6%
- DiceNotation                            4.84ms    5.03ms  -190µs      -3.8%
- ReluctantQuantWithTerminalWhole         6.22ms    6.4ms   -182µs      -2.8%
- IPv4Address                             2.44ms    2.58ms  -141µs      -5.5%
- IPv6Address                             3.9ms 4.03ms  -134µs      -3.3%
- MACAddress                              2.88ms    2.99ms  -114µs      -3.8%
- NumbersAll                              7.04ms    7.11ms  -76.2µs     -1.1%
- EagarQuantWithTerminalWhole             2.52ms    2.58ms  -61.9µs     -2.4%
- LiteralSearchAll                        6.45ms    6.5ms   -49µs       -0.8%
- LiteralSearchNotFoundAll                6.29ms    6.33ms  -39.9µs     -0.6%

Gives us a few (reproducible) % on some benchmarks and paves the way towards more profitable refactorings. Added comments for parts of code that need more benchmark coverage.

milseman commented 1 year ago

@swift-ci please test

milseman commented 1 year ago

@swift-ci please test