On 6/9/05, Steven Jenkins <steven.jenkins / ieee.org> wrote:
> James Edward Gray II wrote:
> >> On Jun 9, 2005, at 4:15 PM, Lothar Scholz wrote:
> >> - code that must do a lot of parsing
> > I've actually used Ruby for a pretty hefty parsing application in my
> > work.  It was my experience that this is an area where Ruby really
> > shines.  Funny to see you bring it up as the opposite of that now.
> Here's a little benchmark. I wrote a parser in Racc to read the export
> format from a system engineering modeling tool. The grammar is
> non-trivial: 173 rules, 371 states. Running it on a fairly large file
> (65k lines, 3.6 MB) takes about 6 seconds on a 3.2 GHz P4 running Linux.

Similarly, my ~75 page manual for PDF::Writer is generated from a
parsed source in 1m 6s on a similar P4 running Windows XP. (It takes
significantly longer -- about 6 - 8m -- on my 1Ghz Crusoe laptop.)
This may not seem fast, but it's incredible when you look at the
complexity of the manual involved. The majority of the time isn't in
calculation or in parsing, either -- it's in the transaction
capabilities required by a good formatting engine.

-austin
-- 
Austin Ziegler * halostatue / gmail.com
               * Alternate: austin / halostatue.ca