[antlr-interest] ANTLR 3.1 - Serious performance downgrade
Terence Parr
parrt at cs.usfca.edu
Sun Aug 17 13:24:54 PDT 2008
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.
Ter
More information about the antlr-interest
mailing list