You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some parsers shouldn't have error messages, they always should produce success results. For such parsers caring about expectations is really expensive and unnecessary. Idea is to make some subclass or some flag to exclude everything unneeded. I've tested on my library (just copied and rewrote many, skipMany and choose methods) and parser started working 30% faster.
The text was updated successfully, but these errors were encountered:
Sounds like a good idea, although I'm not sure I understand all the implications yet, nor what is the best way to do it. Did you profile your markdown parser using obervatory? If yes, where is this extra time spent after your change to lazy expectation? In CombinedExpectation allocations?
Actually EmptyExpectation allocation was higher. CombinedExpectation allocation + EmptyExpectation allocation takes around 8-10% of time. But combined with other operations like checking expectations parameter while ParseResult.copy and so on, gives ~30% less time for parsing.
Some parsers shouldn't have error messages, they always should produce success results. For such parsers caring about expectations is really expensive and unnecessary. Idea is to make some subclass or some flag to exclude everything unneeded. I've tested on my library (just copied and rewrote many, skipMany and choose methods) and parser started working 30% faster.
The text was updated successfully, but these errors were encountered: