Replies: 5 comments 6 replies
|
Parser code: |
0 replies
|
Or even make a breaking change and move advanced parsers into |
0 replies
|
@Bykiev |
0 replies
|
@emayevski, ExpressionsOptions can't be used in parser, which is defined in a static constructor. If we'll use none-static constructor the performance will be worse and compiled parser will be not working as expected |
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Now parser handles many things, like guids, dates/times, hex numbers, but in many use cases it's not needed. I think creating a new NCalc.LightParser plugin can be a good idea. I did some benchmark and light parser is 2 times faster:
// * Warnings *
MultimodalDistribution
LogicalExpressionFactoryBenchmark.SimpleAntlrExpression: Default -> It seems that the distribution can have several modes (mValue = 2.94)
LogicalExpressionFactoryBenchmark.AdvancedAntlrExpression: Default -> It seems that the distribution is bimodal (mValue = 3.79)
LogicalExpressionFactoryBenchmark.LightParserAdvancedExpression: Default -> It seems that the distribution can have several modes (mValue = 2.89)
@gumbarros, what do you think?
All reactions