Subj : Re: OO compilers and efficiency To : comp.programming From : Jon Harrop Date : Mon Jul 25 2005 12:25 pm Rob Thorpe wrote: > That's rather odd, did the system you were programming on have a > particularly small stack? No, it was ordinary x86 Linux. > Or did the C code allocate lots of unnecessary information on the stack? In a sense, yes. Although it isn't easy to stop it from doing so. > Was it just the lack of GC acting on the stack? I would say that this isn't directly related to GC. The C equivalent of the OCaml was using malloc and free to allocate local variables on the heap. > Most of the time you can put a similar amount of data in either the > stack or heap. In theory, yes. In practice, it can be very fiddly and error-prone in non-GC languages like C. -- Dr Jon D Harrop, Flying Frog Consultancy http://www.ffconsultancy.com .