[antlr-interest] Re: Perfomance question re bit iterator
lgcraymer
lgc at mail1.jpl.nasa.gov
Tue Nov 16 15:00:27 PST 2004
--- In antlr-interest at yahoogroups.com, "ron_bennatan"
<ron_bennatan at g...> wrote:
>
>
> Hi,
>
> We have fairly complex parsers with some (but not too much)
> loookahead. We generate C++ code and we use codeGenBitsetThreshold=4.
>
> We've been doing some performance testing and when running gprof we
> see that around 40% of the time is in MismatchTokenException and
> specifically in std::_Bit_iterator std::_copy.
>
> Can anyone shed some light as to what exactly MismatchTokenException
> is, when it is raised (we think we know - but are not sure) and what
> we can do to reduce the run time? Also, are there any tips as to how
> to reduce the number of copies and anything else that can reduce the
> number of these exceptions and copies.
It is raised in calls to Parser::match(). For this to happen without
being reported at the user level means that a syntactic predicate is
"failing". Check your grammar and try to refactor it to remove
synpreds wherever possible.
--Loring
> Thanks.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list