From: Lothar Scholz Date: 2004-08-28T07:12:36+09:00 Subject: Re: performance comparison Hello James, JEGI> On Aug 27, 2004, at 1:55 PM, George Ogata wrote: >> Boris Glawe writes: >> >>> What's the reason for this big performance difference ? >> >> I don't know what your C code looks like, but when you consider what >> must go in a typical C statement vs. an equivalent ruby statement, I >> don't find it too surprising. How do other interpreted languages >> (e.g., python) go? JEGI> I can't speak for Python, but I have a lot of experience with coding JEGI> chess searches in Perl. JEGI> Unfortunately, I've never been able to achieve reasonable performance JEGI> there either. I've had some luck using a simple string as my data JEGI> structure and avoiding higher level manipulations. I've also tried JEGI> unrolling recursion, again with some success. JEGI> If memory serves, my personal best is somewhere around 40x slower than JEGI> C. Of course, my C skills aren't anything to brag about so that may be JEGI> giving Perl an advantage... On pure algorithm based problems you can expect a script language to be around 20 - 150 times slower. Some time ago i started a (long) thread in comp.lang.python where i posted an image manipulation algorithm. Nobody was able to get it down the 120x line. This algorithm was really bad, it couldn't use any available c function, so one c instruction mapped to one python instruction. So i doubt that there will ever be a time when a script language would ever be useable for Zip compressors, image manipulation or KI algorithms. Just because not only the CPU performance increases but the data sets increases also, maybe faster then CPU performance. One of the reasons why i don't understand the people on this mailing list who want to do everything in ruby. I guess a lot of them are simply to lazy to learn C and C++ well. -- Best regards, emailto: scholz at scriptolutions dot com Lothar Scholz http://www.ruby-ide.com CTO Scriptolutions Ruby, PHP, Python IDE 's