goodmami / goodmami/pe

Remove packrat parser

Open
#16 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
51
Forks
4
PR merge metrics
No merged PRs in 30d

Description

The machine parser, in pure python mode, is currently about 10% slower than the packrat parser on the JSON benchmark. In PyPy, however, the machine parser is roughly twice as fast. The Cython version is also roughly the same speed as the PyPy version. This means the packrat parser is only more performant in pure python without PyPy, so maybe it's not worth the maintenance burden of having both around.

The caveat is that the machine parser does not have memoization yet (see #15), so it will not do well on grammars where that makes a difference. I think the packrat parser can go once memoization is added to the machine parser.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.