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

Partial parse #26

Merged
merged 1 commit into from
Mar 28, 2017
Merged

Partial parse #26

merged 1 commit into from
Mar 28, 2017

Conversation

mmmries
Copy link
Collaborator

@mmmries mmmries commented Mar 28, 2017

A rough cut at #5

I stole the basic idea here from @newellista who suggested that we only really need to keep the unmatched bytes around for the parser state (no need to have a state: :waiting etc). This ends up introducing a few more conditionals which always degrades the readability a bit.

Before I try to refactor I first wanted to get some feedback on whether this looked like a reasonable attempt at parsing.

Benchmarks before and after the change show no significant change in performance (~81k parses/sec).

/cc @newellista @tallguy-hackett

@mmmries mmmries mentioned this pull request Mar 28, 2017
@newellista
Copy link
Collaborator

:shipit:

@mmmries mmmries merged commit 499d0cc into master Mar 28, 2017
@mmmries mmmries deleted the partial_parse branch March 28, 2017 20:50
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