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

Remove "fast" advertising or improve performance #6

Open
noughtmare opened this issue Sep 12, 2022 · 0 comments
Open

Remove "fast" advertising or improve performance #6

noughtmare opened this issue Sep 12, 2022 · 0 comments

Comments

@noughtmare
Copy link
Contributor

noughtmare commented Sep 12, 2022

uu-parsinglib is much slower than all other popular parsing libraries for parsing a simple arithmetic expression language.

Here is the source code I wrote for this benchmark.

I think there are three options moving forward:

  1. My code is written poorly, so it can be improved and we can write a guide or list of tips for writing more performant parsers.
  2. The library is slow and we should accept that, so we should remove the "fast" advertising and instead focus on the other features. Maybe we should even add warnings that this is not a very performant library for some use cases.
  3. The library is slow but we should not accept that, so we should figure out why that particular benchmark is so slow and optimize the library.

Perhaps the best course of action is to do (2) first (because it is easy) and try to do (3) later.

Update: I think I see a few optimization opportunities in the dumped Core of that code:

  • <<|>, <|>, <$, <*, *> and <*> are not inlined
  • pSatisfy is not even specialized
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

No branches or pull requests

1 participant