Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Languages revisited. Functional language beats C for number cruncing

Author: David Rasmussen

Date: 05:34:31 01/10/03

Go up one level in this thread


On January 10, 2003 at 08:01:45, Dan Andersson wrote:

>A couple of postings on comp.lang.scheme implemented the CoyoteGulch benchmarks
>in Scheme. And lo and behold BigLoo produced faster code for the numerical
>benchmark. One might object that since BigLoo emits C or Java bytecode it isn't
>really faster. But the amount of automated program transformations that are
>applied is huge. For a coder to do the same thing would be like trying to
>outperform a spreadsheet. And the C code is inhuman in nature. And the question
>arises: Why on earth would one use C++ or Java? Both are verbose and terribly
>low level compared to lambda calculus.
>
>MvH Dan Andersson

If the perfomance drawbacks of more abstract languages such as Scheme disappear,
then there are certainly no reason not to use such languages for performance
critical software. The only general drawback of Scheme or other functional
languages is that they impose a specific paradigm of designing and implementing
(all languages do, but...). A functional language forces you to think about
computation in a certain way. It forces an abstract mathematical model on
computation that is far removed from the realities of existing hardware. That is
of course those languages strongest suit, but also their weakest. If we can
overcome the performance problems, we might not care about the machine (that's
the whole point) but I don't believe we're quite there yet. And also, many
problems don't fint naturally into a functional way of thinking. An object
oriented approach is more natural for many problems (forget about specific
languages supporting OO, they all have their imperfections, as do the functional
languages).
If we can find a language that allows the "programmer" to specify a problem
and/or a solution without restrictions on style or paradigm, that abstracts the
machine totally and that produces "optimal" assembly language on all platforms
(or some other form of end result that will solve the problem), then we're done.
But we're not there at all.

/David



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.