-
Notifications
You must be signed in to change notification settings - Fork 525
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
Improve FastParseCommand readability #119
Conversation
@microsoft-github-policy-service agree |
Failures seem to be unrelated, other PRs are failing with same tests related to the TLS handshake. |
Was actually able to find small workaround for the small regression on .NET 6. This is now a perf win all across the board. |
7384efc
to
c97b420
Compare
Great job! Thank you for your diligent work on this. There's definitely a lot of room for performance optimization in the parsing loop, and your approach seems spot-on. However, I am holding off on merging this pull request for now. We're currently in the process of refactoring the parsing logic, and we have made changes to the semantics of the If you have the time, I’d appreciate it if you could review the PR and provide any comments. Once #164 is merged, we can proceed with integrating this one. |
PS: Thanks also for the benchmark! This is super useful. Once we have command parsing and execution separated, we should think about adding a proper parsing benchmark that follows your example. |
I see, glad someone was already working on larger clean up on this. Looks like we had similar ideas already. Seems to be a very nice clean up :) |
c97b420
to
7b60511
Compare
Updated the PR on top of main as #164 is merged now. I didn't touch any of the FastParseArrayCommand as the mileage varies on how much benefit you get from there with this pattern. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! The code looks solid overall and the performance looks good as well. I noticed two minor typos in the comments. Once those are fixed, I'll be happy to merge this PR. Thank you for your contribution! 🙌
* Improve FastParseCommand readability * PR feedback --------- Co-authored-by: Lukas Maas <lumaas@microsoft.com>
Modified the code to use switch expression with pattern matching.