[antlr-interest] More, Status of C++ backend?
Jim Idle
jimi at temporal-wave.com
Tue Jan 1 18:36:26 PST 2008
Possible, but the C runtime already has a string too and I prefer to
keep away from third party dependencies, even if they are decent ones.
Jim
> -----Original Message-----
> From: Mark Wright [mailto:markwright at internode.on.net]
> Sent: Tuesday, January 01, 2008 6:49 PM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] More, Status of C++ backend?
>
> > 2) also I have come to all these issues because again did profile of
> > 100K-1M INSERTS, and I see big troubles in ANTLR 2.7.2 C++ runtime.
> > As far as I could see problem come from LA() which calls a lots
> > NextToken() which creates std::string() what cause call of new()
(and
> > later free.
> >
> > ANTLR parser looks to work 8-10 times slower of YACC or Lemon. And I
> > think because of this reason.
> >
> > I have check -- and it seems to be deal of few hard days work to try
> > remove std::string from C++ runtime of ANTLR 2.7.2 and using instead
> > just pair { char*, length }
> > where char* points right into string we do parse.
> > I do not see any need today do COPY of each token string.
> > btw, how you have implement this in C runtime for v3 ?
>
> Hello Ruslan and Jim,
>
> Another idea is: maybe it might be easier to find a way to optionally
> plug in Andrei Alexandrescu's flex_string instead of std::string.
> flex_string is used in the Boost Wave project, presumably for the
> same reason.
>
> Thanks, Mark
>
> --
More information about the antlr-interest
mailing list