[pypy-dev] Parsing in PyPy (and runicode)
holger krekel
holger at merlinux.eu
Fri Feb 27 20:19:08 CET 2009
On Fri, Feb 27, 2009 at 13:38 -0500, Frank Wierzbicki wrote:
> On Fri, Feb 27, 2009 at 1:19 PM, Jacob Hallén <jacob at openend.se> wrote:
> > Andrew Dalke, who is very thorough in his investigation of software, has
> > written som interesting things about his experience with ANTLR as well as
> > some other parsing projects. In short, he likes ANTLR as a tool, but in his
> > application, it is considerably slower than some other alternatives.
> > He also has something called python4ply, which is a ready, MIT licensed
> > parser for Python.
> >
> > You can find his articles on
> > http://www.dalkescientific.com/writings/diary/archive/
> I see the part you are likely talking about:
>
> """
> 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 :)
RPython calls are not much more expensive than C calls.
So an RPython backend would not suffer.
holger
More information about the Pypy-dev
mailing list