[antlr-interest] ANTLR 3.1 - Serious performance downgrade
Dr. Michael Gerz
michael.gerz at teststep.org
Mon Aug 25 10:06:00 PDT 2008
Terence Parr schrieb:
>
> On Aug 17, 2008, at 1:19 PM, Benjamin Niemann wrote:
>
>> Hi Michael,
>>
>> there has been a major change to the implementation of the
>> TokenRewriteStream. I quick look at the code suggests, that
>> TokenRewriteStream.reduceToSingleOperationPerIndex() is O(n^2), where
>> n is the number of rewrites - and it is called for each toString call.
>> Did you do some profiling to find the method that takes most of the
>> time?
>
> Hi. Yep, n^2 but figured there aren't THAT many changes...decided
> that I'd go for actually correct functionality first...it was horribly
> broken except for some common cases before.
>
> I just saw your earlier post...ooops. Sorry about that. I guess I
> need to build an index for that code. Shit. Likely you can backgrade
> to earlier version fairly easily for now.
Are you going to provide a performance fix in the near future?
Backgrading means recompiling my grammars (there are many of them in my
project), because the API changed during summer.
Michael
More information about the antlr-interest
mailing list