Computer Chess Club Archives


Search

Terms

Messages

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

Author: Russell Reagan

Date: 12:06:00 08/13/04

Go up one level in this thread


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.



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.