[pypy-dev] Parsing in PyPy (and runicode)

Armin Rigo arigo at tunes.org
Fri Feb 27 20:19:46 CET 2009


On Fri, Feb 27, 2009 at 01:38:39PM -0500, Frank Wierzbicki wrote:
> """
> It looks like every character read incurs several Python function
> calls, which are a lot more expensive in Python than in Java or C++.
> There's no easy change for this, so I'm pretty sure the
> ANTLR-generated parser always going to be slower than PLY.
> """
> I wonder if producing a parser in C would work for PyPy if this is
> unavoidable?  I know it misses the purpose of PyPy a bit -- just a
> thought :)

No, our goal would be to generate an RPython parser, not just a Python
one.  A few function calls are not more of a problem for RPython than
they are for C.  So that should be fine.  In other words, if ANTLR
generates parsers expecting the speed of a Java or C++ kind of backend,
then an RPython backend is no problem either.

A bientot,


More information about the Pypy-dev mailing list