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

Speedup Parsers.validID #3952

Merged
merged 2 commits into from Feb 19, 2018

Conversation

Projects
None yet
3 participants
@jrudolph
Member

jrudolph commented Feb 19, 2018

It turned up in profiling sessions. Previously, it used parser combinators
which are somewhat slow especially when the JVM is still cold.

The grammar for ID is simple enough to afford this handwritten parser.

Speedup Parsers.validID
It turned up in profiling sessions. Previously, it used parser combinators
which are somewhat slow especially when the JVM is still cold.

The grammar for ID is simple enough to afford this handwritten parser.

@eed3si9n eed3si9n added the ready label Feb 19, 2018

@dwijnand

This comment has been minimized.

Member

dwijnand commented Feb 19, 2018

Could we write a property-based that tests that this new impl == matches(ID, s)?

@dwijnand

Thanks @jrudolph.

@dwijnand dwijnand merged commit b393631 into sbt:1.x Feb 19, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@dwijnand dwijnand removed the ready label Feb 19, 2018

@jrudolph jrudolph deleted the jrudolph:jr/speedup-validId branch Feb 19, 2018

@jrudolph

This comment has been minimized.

Member

jrudolph commented Feb 19, 2018

Nice, thanks for adding the test @dwijnand. I wonder if it ever finds an example that would actually return true for either sides of the equality, though...

@dwijnand

This comment has been minimized.

Member

dwijnand commented Feb 19, 2018

@jrudolph good intuition! you were right.. expanded the tests and fixed a bug in your re-impl: #3955.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment