From: "M. Edward (Ed) Borasky" Date: 2006-11-19T19:25:35+09:00 Subject: Re: Ruby vs Java vs c++ David Kastrup wrote: > "Martin DeMello" writes: > > >> On 11/19/06, El Gato wrote: >> >>> However, it seems to me that you're looking for the expressiveness of >>> Ruby and the speed of C++. Welcome to the club. Strangely enough, >>> >> I'm learning OCaml for just that reason :) Some of the Scheme >> dialects get some impressive performance figures too, but I haven't >> really looked into them as much. >> > > I have looked through several compilers. I have to say that one of > the most appealing Scheme->C compiler ideas I have seen was to drop > the distinction between heap and compiler stack: functions were called > with an appropriate continuation data structure, and no function ever > properly returned at the C level. Data was allocated using alloca. > > When the heap/stack combination overflowed, it was garbage-compacted > in its entirety. All continuations without a pending reference to > them consequently were removed from the stack. > > This basically made continuations rather easy to implement. > Impressive. > I haven't dug into Scheme implementation benchmark shootouts recently, but for now, my money is on Gambit, mostly because of the "Termite" package implementation of Erlang-like lightweight processes. -- M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P) http://borasky-research.blogspot.com/ If God had meant for carrots to be eaten cooked, He would have given rabbits fire.