Dear all,

I don't know how to make my parser faster since I already use 'infix
expression'. I observed that after removing some small matches, the time cost
dropped from ~20 to ~10 seconds, so my best guess is that the slowness is
mainly caused by the frequent object construction and deconstruction, or
deeply the behavior of PEG? Any suggestion?

Best
Li

在 2013-7-1,下午8:59,Li Dong <[email protected]> 写道:

> Dear all,
> 
> I have removed some small matches, and use infix engine in expression rule,
> here is the difference before and after
> 
> Before using infix engine:
> [Notice]: Test fortran code parsing
> ---> Parsing uses 8.734259 seconds..
> 
> After using infix engin:
> [Notice]: Test fortran code parsing
> ---> Parsing uses 7.858645 seconds..
> 
> The difference is not that large.
> 
> 在 2013-7-1,下午5:40,Li Dong <[email protected]> 写道:
> 
>> Oh, yes!
>> 
>> BTW, I am really worrying about the performance of the parser written in
>> PEG, because I will face tens of thousands of Fortran code lines, so the
>> parser must be very efficient.
>> 
>> Li
>> 
>> 在 2013-7-1,下午5:23,Kaspar Schiess <[email protected]> 写道:
>> 
>>>> Does infix engine support unary operator? Like parsing the condition in
>>>> Fortran:
>>>> 
>>>> .not. flag
>>>> 
>>>> since currently I am using one expression rule for all the expression
>>>> parsing, including logical condition (maybe this is not a good idea?).
>>> 
>>> Why don't you roll the unary ops into your terms? (term op term)
>>> 
>>> k
>>> 
>>> 
>> 
>> 
> 
> 


Reply via email to