Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: c,c++5,c#.

Author: Peter Fendrich

Date: 12:31:12 08/13/04

Go up one level in this thread


On August 13, 2004 at 15:06:00, Russell Reagan wrote:

>On August 13, 2004 at 11:50:13, Anthony Cozzie wrote:
>
>>There are Fortran -> C compilers.  There are C++ -> C compilers.  I'm fairly
>>sure there are ML -> C compilers.  So worst case, you can generate C code that
>>is just as fast as ML.
>
>Not necessarily. Suppose language X makes certain guarantees that C does not.
>The language X optimizer may produce faster code. Using an X-to-C compiler may
>even produce slower code since there are different guarantees.
>
>It's the same concept that explains why Fortran is faster than C for some
>purposes. Sometimes the C compiler can't guarantee that two pointers don't point
>to the same data. If another language makes such a guarantee, it can do further
>optimization that the C optimizer might not be able to do.
>
>My only point is: It's possible. Claiming "always", "impossible", "never", and
>so on is making a significant claim, and so far I haven't seen any arguments
>that would convince me that nothing can ever be faster than C because C is the
>closest to assembly. Maybe it's true 99% of the time, and I wouldn't dispute
>that, but that wasn't the initial claim.

Just to support that, here is an interesting shoutout between 30 languages.
The difference from C to highlevel languages like ocaml, SML, CLisp and Scheme
isn't that big. In fact C++ isn't number 2 after C...
http://www.bagley.org/~doug/shootout/craps.shtml
/Peter



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.