-
Notifications
You must be signed in to change notification settings - Fork 99
Consider readding unsafe slicing in the parser #82
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
Comments
This change would give us ~20% performance win:
|
Using latest Rust nightly and the PR that I just put against master, the perf impact is as following: parse/"simple": -15% |
@cyplo - on twitter you indicated you might be able to help us with fuzzing [0]. I may file a separate issue for the parser fuzzing prior to 1.0, but this is a particular aspect of it that I'd like to tackle now. We have a parser that in theory should only cut at known character bounds. In result, we should be able to slice for free using unchecked, and we know that it brings sizable perf wins, but I don't know to verify the risk here. Is that something you may know how to help us decide on? [0] https://twitter.com/zbraniecki/status/1096383281929560064 |
Hi, sure thing @zbraniecki ! Would it be possible to jump on a call to discuss this ? - you can DM me on Twitter |
|
I honestly struggle to see any possibility of the future development of Fluent Syntax which would lead to us allowing for AST nodes to start/end on anything but start/end of characters. |
Moving to 0.8, since it doesn't affect the API |
This has been fixed with |
@zbraniecki let me know if you're still interested in looking into fuzzing this together :) github@cyplo.net is a good starting point or @cyplo on pretty much anywhere |
Thanks for removing the
unsafe
block here, at least for now. Would you mind filing a follow-up for discussing re-adding it, please? I'd like to look into it a bit more, given that we're likely protected from invalid UTF8 input by the sheer fact of acceptingString
intoFluentResource::try_new
.Originally posted by @stasm in #76
The text was updated successfully, but these errors were encountered: