Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: separate move functions?

Author: Sune Fischer

Date: 04:54:25 12/13/01

Go up one level in this thread


On December 13, 2001 at 06:50:58, Severi Salminen wrote:

>>From what I understand of assembler it runs about a factor of 2-3 faster than
>>good optimized C code,
>
>That _can't_ be true. Today's compilers generate more optimized code than good
>assembler programmers. Have you ever looked at what code your C-compiler
>produces? There are millions of cases where you just can't make it any faster.


>What kind of a generalization do you mean when saying 2-3 faster?

I have no idea ;)
I simply read that postulate somewhere one time I tried to learn assembler.
But in assembler you can do some tricks you can't do in C (as I understand it).
Maybe some of the assembly nerds can give examples?


"An old joke goes something like this: "There are three reasons for using
assembly language: speed, speed, and more speed." Even those who absolutely hate
assembly language will admit that if speed is your primary concern, assembly
language is the way to go. Assembly language has several benefits:

*) Speed. Assembly language programs are generally the fastest programs around.
*) Space. Assembly language programs are often the smallest.
*) Capability. You can do things in assembly which are difficult or impossible
in HLLs.
*) Knowledge. Your knowledge of assembly language will help you write better
programs, even when using HLLs.


Assembly language is the uncontested speed champion among programming languages.
An expert assembly language programmer will almost always produce a faster
program than an expert C programmer. While certain programs may not benefit much
from implementation in assembly, you can speed up many programs by a factor of
five or ten over their HLL counterparts by careful coding in assembly language;
even greater improvement is possible if you're not using an optimizing compiler.
Alas, speedups on the order of five to ten times are generally not achieved by
beginning assembly language programmers. However, if you spend the time to learn
assembly language really well, you too can achieve these impressive performance
gains. "

http://courses.ece.uiuc.edu/ece291/books/artofasm/fwd/fwd.html#78





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.