http://www.dabeaz.com/ply/ply-2.4.tar.gz
Mostly this release just has a bunch of minor bug fixes. However,
the CHANGES file goes into more detail. If you're using PLY, please
give this download a try and let me know if anything breaks. I'll
probably make an official release in a few days or so.
Cheers,
Dave
1. In Ply-2.3, The Lexer object is declared as a classic (old-style)
class. In Ply-2.4, it's a new-style class that inherits from object.
I have noticed a performance difference between the two styles of
classes.
2. Ply-2.4 added the ability to signal errors from within production
rules (see CHANGES 11/27/07). Adding this requires an extra check in
the parser which takes place around line 318.
If I had to guess, I'm going to say it's (2), but I'll need to do
some more careful benchmarking to study it. I'll go on record by
saying that I *DON'T* like the fact that you're seeing a 16%
performance hit going from 2.3 to 2.4. I want PLY to be fast as
possible within the constraints of still being usable.
If there is any way to separate your benchmark into lexing versus
parsing timings, that would be very useful to me. Also, if anyone
else has performance numbers of benchmarks to share, I would
definitely be interested.
Cheers,
Dave
Ran 83 tests in 0.199s
FAILED (errors=83)
All errors are the same:
Traceback (most recent call last):
File "test.py", line 532, in test9
r1 = self.yacc.parse(s1)
File "/home/juanjo/python/ply/logic/ply/yacc.py", line 255, in parse
t = actions[state].get(ltype)
KeyError: 0
That line of code is from ply itself.
Juanjo
--
mi blog: http://www.juanjoconti.com.ar
-Dave
On Wed 07/05/08 3:54 PM , Juanjo Conti jjc...@gmail.com sent: