From: David Ross Date: 2004-08-28T04:57:10+09:00 Subject: Re: performance comparison --- James Edward Gray II wrote: > 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? > > I can't speak for Python, but I have a lot of > experience with coding > chess searches in Perl. > > Unfortunately, I've never been able to achieve > reasonable performance > there either. I've had some luck using a simple > string as my data > structure and avoiding higher level manipulations. > I've also tried > unrolling recursion, again with some success. > > If memory serves, my personal best is somewhere > around 40x slower than > C. Of course, my C skills aren't anything to brag > about so that may be > giving Perl an advantage... > > James Right, of course interpreted languages will be slower. They have extra overhead. C programs do as well, but not much. Garbage collection used to be slow many many years ago, but have made drastic improvement. I will probably get yelled at for saying this but note that I am not biased to what I am going to say(I love both C, C++, ada, asm and ruby. I'm am only strong in these ;) I know more.) When computers get really fast, what language you use whether it have a huge overhead or not will be irrelevant. Of course Operating systems will always be written in C and maybe C++. BSD OSes I havent seen any C++ code, but there is C++ code in Windows NT. I can just see a bright future where programming will all be a breeze with easy debugging and not spending countless hours on a typo :) ---------------------------------------- -- Name: David Ross -- Phone: 865.539.3798 -- Email: drossruby [at] yahoo [dot] com ---------------------------------------- __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail