My parser (written in Dylan) supports selective memorization on a rule-by-rule basis. It has no real “default.” That said, it parses fastest with memorization enabled on a few rules and disabled for most. It parses much slower if I disable memorization for all rules, and it parses somewhat slower if I enable memorization for all rules.
On Jul 31, 2011, at 3:03 PM, Volker Birk wrote: > On Sun, Jul 31, 2011 at 02:42:53PM -0700, Sérgio Medeiros wrote: >> Actually, it seems that PEG libraries that implement >> the Packrat algorithm (that guarantees linear parsing >> time) turn it off by default, because the memorization >> is expensive. > > in my C++ implementation I cannot affirm that. It really speeds up with > an admissible amount of memory consumption. In pyPEG I have it turned > off by default, because I implemented using Python's dicts, and these > are so slow that only in special cases I can measure performance > enhancements compared to just have clever designed languages and clever > written grammars. > > I would be very interested in other's experiences about that topic, too. _______________________________________________ PEG mailing list PEG@lists.csail.mit.edu https://lists.csail.mit.edu/mailman/listinfo/peg