From: Yukihiro Matsumoto Date: 2008-02-12T02:51:24+09:00 Subject: Re: very bad character performance on ruby1.9 Hi, In message "Re: very bad character performance on ruby1.9" on Mon, 11 Feb 2008 03:33:54 +0900, "Eric Mahurin" writes: |I'd like to bring up the issue of how characters are represented in |ruby 1.9from a performance standpoint. In a recent ruby-quiz (parsing |JSON), the |fastest pure-ruby solution was simply an LL(1) parser that looked at one |character at a time (it beat various Regexp solutions). With ruby 1.9, the |runtime increased by 4X making it a slow solution. A simple benchmark is at |the end of this message that counts words in an LL(1) fashion. With ruby |1.8.6, it can could the words in Homer's Iliad in 1.46s on my machine and in |ruby 1.9 (from ubuntu gutsy) it takes 52.87s (36X increase in runtime). I just checked in some performance tweaking. The script run still slower (2.3 times), but much better than 36 times. It is nice for two hour job. |Please consider this significant performance issue in ruby 1.9. We were primarily working on spec in M17N field. I think we're about to start performance tuning on it. matz.