Skip to content
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

Parser cleanup (implement shortcut methods, use new parse oneOf) #509

Merged
merged 10 commits into from
Mar 31, 2021

Conversation

Davidde94
Copy link
Collaborator

@Davidde94 Davidde94 commented Mar 24, 2021

Resolves #476

Also works to improve the parser errors as mentioned in #483

We now have shortcut functions to the parser library, meaning we don't need ParserLibrary to appear every line.

Also any instances of calls to oneOf where there were 2 or 3 parser functions have been replaced with the new multiple-argument method.

Result:

  • NIOIMAPPerformanceTester is about 20% faster
  • If we added a new 4-option oneOf parser it hits about 30%, but we need to draw the line somewhere.

@Davidde94
Copy link
Collaborator Author

@swift-server-bot test perf please

@Davidde94 Davidde94 requested a review from weissi March 31, 2021 09:57
@Davidde94 Davidde94 merged commit 22b38c5 into apple:main Mar 31, 2021
@Davidde94 Davidde94 deleted the de/parser-shortcut-methods branch March 31, 2021 10:21
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.

Restore shortcut methods in the parser
2 participants