From: Steven Jenkins Date: 2005-06-10T07:08:40+09:00 Subject: Re: python/ruby benchmark. 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. Note that this is a lot more than parsing. The application is constructing, in a correct but not very efficient way, the entire data model in memory. I suspect that parsing itself is a small fraction of the total runtime. Steve