On Jan 25, 2008 1:28 PM, SJS <[EMAIL PROTECTED]> wrote: > begin quoting David Brown as of Fri, Jan 25, 2008 at 01:22:41PM -0800: > > On Fri, Jan 25, 2008 at 01:20:20PM -0800, Chuck Esterbrook wrote: > > > > >There are plenty of fascinating fields that require performance > > >including AI, games, scientific applications and simulations. You can > > >use the slow languages (Python, Ruby, LISP, Smalltalk) to a certain > > >degree until you start pushing parts out to C, using them only for > > >glue, or simply waiting a long time to get your results. > > > > Lisp is a slow language? A lot of problems are done in lisp because it's > > not slow. A lot of things in Lisp that are slow algorithmically can be > > rewritten, still in lips, to be faster. Some problems even run faster in > > Lisp than in a language like C. > > Presumably, you're comparing an optimal solution in Lisp to a naive > solution in C? > > -- > One place where C will lose, perhaps, > Is for small mallocs when running laps. > Stewart Stremler
A CS professor at Virginia Tech encouraged his students to not be shy about malloc'ing a large block and managing memory yourself when faced with the "many small mallocs" problem. This a good example where C outshines Pascal where such an approach would be impossible. -Chuck -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
