Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Why is assembly more effecient than C?

Author: Robert Hyatt

Date: 15:15:36 09/27/98

Go up one level in this thread


On September 27, 1998 at 17:39:30, John Coffey wrote:

>On September 26, 1998 at 18:00:26, James Robertson wrote:
>
>
>>The compiler generates very efficient code; but there are a lot of things you
>>can do in assembly that aren't avaliable in C++. Also, in assembly you think
>>about programming differently; I saw things I could do to improve performance I
>>never thought about in the C++ enviroment.
>
>
>Have others found assembly to be faster than straight C?  I still think
>that memory accesses might be the bottle-neck - i.e. so it is hard for me
>to see assembly as a big improvement over C.
>
>John Coffey


Depends on how far you take it.  Cray Blitz... pure fortran (using the
very best fortran compiler on the planet, too) is 5x *slower* than the
hand-coded assembly language version.  Different approach in the asm
version, keeping things in registers longer, doing things that are
architecture specific, etc...

But it can make a big difference.



This page took 0.41 seconds to execute

Last modified: Thu, 07 Jul 11 08:48:38 -0700

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