Skip to content

Eliminate linear factor in Engine's consume method #494

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

Merged
merged 1 commit into from
Jun 17, 2022

Conversation

milseman
Copy link
Member

Rough measurements. Note that my machine had slightly different amounts of load running, so this is mainly to see improves along the lines of several X vs %:

- ReluctantQuant 197ms
- ReluctantQuantWithTerminal 248ms
- EagarQuantWithTerminal 76.1ms
- BasicBacktrack 456ms
- BasicBacktrackFirstMatch 459ms
- cssRegex 298ms
- FirstMatch 147ms
- AllMatches 953ms

After

- ReluctantQuant 212ms
- ReluctantQuantWithTerminal 267ms
- EagarQuantWithTerminal 79.6ms
- BasicBacktrack 22.4ms
- BasicBacktrackFirstMatch 22.4ms
- cssRegex 102ms
- FirstMatch 151ms
- AllMatches 40.3ms

@milseman
Copy link
Member Author

@swift-ci please test

20x perf speedup in the "BasicBacktrack" benchmarks.
@milseman milseman force-pushed the sublinear_refactoring branch from d175e89 to 7cdf0f7 Compare June 17, 2022 16:45
@milseman
Copy link
Member Author

@swift-ci please test

@milseman
Copy link
Member Author

Merging to unblock some other improvements and cherry-picking

@milseman milseman merged commit b4f12bb into swiftlang:main Jun 17, 2022
@milseman milseman deleted the sublinear_refactoring branch June 17, 2022 16:50
Copy link
Contributor

@Azoy Azoy left a comment

Choose a reason for hiding this comment

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

LGTM!

milseman added a commit to natecook1000/swift-experimental-string-processing that referenced this pull request Jun 17, 2022
20x perf speedup in the "BasicBacktrack" benchmarks.
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