Skip to content

Remove "fast" advertising or improve performance #6

Open
@noughtmare

Description

@noughtmare

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions