-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Perf optimizations #58
Conversation
@@ -17,11 +18,19 @@ public Between(Parser<A> before, Parser<T> parser, Parser<B> after) | |||
_after = after ?? throw new ArgumentNullException(nameof(after)); | |||
} | |||
|
|||
public bool CanSeek => _before is ISeekable seekable && seekable.CanSeek; |
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.
Extension methods with aggressive inline to reduce duplication?
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.
I am not concerned about perf here since this is called once per application (when the parser tree is built). How would an extension method remove duplication?
9b72222
to
857636d
Compare
Before
After
And benchmarks comparing JSON parsing, including Newtonsoft