-
Notifications
You must be signed in to change notification settings - Fork 53
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
Consolidate parser ranged variants #98
Comments
nom merged this as rust-bakery/nom#1608 with rust-bakery/nom#1613 remaining Differences we want from that
The main questions remaining
|
Postponed as I want to remove the deprecated functions first |
Potential parsers:
For |
The problem with that approach is I feel like |
I'm running into the dreaded
when using I was already thinking of having a fallback function. Looks like it'll be required |
Hmm, I feel like using functions for this, making the API fluent, is one part verbosity and one part being clever. Maybe I should just fallback to doing this the original way |
When working on winnow-rs#98, I realized `repeat` makes the intent a lot clearer. Thanks `chumsky`! This is a part of winnow-rs#95
When working on winnow-rs#98, I realized `repeat` makes the intent a lot clearer. Thanks `chumsky`! This is a part of winnow-rs#95
When working on winnow-rs#98, I realized `repeat` makes the intent a lot clearer. Thanks `chumsky`! This is a part of winnow-rs#95
When working on winnow-rs#98, I realized `repeat` makes the intent a lot clearer. Thanks `chumsky`! This is a part of winnow-rs#95
We now have
Still remaining
That still leaves ascii parsers like |
This is a follow up to winnow-rs#241 for merging in the 0/1 variants This is a step towards winnow-rs#98
This is a follow up to winnow-rs#241 for merging in the 0/1 variants This is a step towards winnow-rs#98
This is a follow up to winnow-rs#241 for merging in the 0/1 variants This is a step towards winnow-rs#98
This is a follow up to winnow-rs#241 for merging in the 0/1 variants This is a step towards winnow-rs#98
The new consolidated ranged parsers seem to cause performance regressions. I just tried to upgrade
I can open a separate issue for this, maybe I can try helping to find the root cause. |
I tried to keep the changes very small so hopefully you can isolate the root cause (and of course, it seems like we need more benchmarks since our existing ones didn't catch this) |
I've narrowed down the slowdown for parse/hcl-edit/large.tf to 98f5e03 |
Same for parse/hcl-edit/deeply_nested.tf |
The slowdown is specifically when using the ascii parsers that wrap |
If I'm reading
|
That is confusing that the slowdowns would be on drops. |
Problem found, see #251 Now performance is better than it was before |
Woa, thanks for digging! Although I promised, I didn't find the time to investigate this myself due to personal obligations which keep me away from my computer for most of the day right now. Using 0.4.7 I can see a 15-25% performance improvement over 0.4.6. 👍 |
What's the status for these? Any known challenges? Ranges for |
Unimplemented. The initial batch was opportunistic in that we already had the |
At this point, |
Please complete the following tasks
winnow version
0.2.0
Describe your use case
Nom has
many1
,many0
, andmany_m_n
functions. Similar with other parts of the API.Describe the solution you'd like
What if instead we had a
IntoRange
trait that took in the different range types and single numbers.Example:
Alternatives, if applicable
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: