delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/09/01:49:00

From: rjvdboon AT cs DOT vu DOT nl
Newsgroups: comp.os.msdos.djgpp
Subject: Re: should i bother learning asm?? or just learn dx?
Date: 7 Aug 1998 16:59:11 GMT
Organization: Fac. Wiskunde & Informatica, VU, Amsterdam
Lines: 28
Message-ID: <6qfbov$bv1$1@star.cs.vu.nl>
References: <000401bdc220$05238d80$944e08c3 AT arthur>
NNTP-Posting-Host: sloep06.cs.vu.nl
User-Agent: tin/pre-1.4-980730 (UNIX) (SunOS/5.5.1 (sun4u))
Originator: rjvdboon AT sloep06 DOT cs DOT vu DOT nl
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Arthur <arfa AT clara DOT net> wrote:
> ASM is the cream of programming languages. It should be what you
> always aspire to. However *alas* virtually no game nowadays is pure
> ASM. What you should do (or what most people do) is get your game
> working in C/C++ and add processor-heavy features (such as graphics)
> in ASM.

> Remember always, no matter what anyone else says, that any language
> (including C) will never be as fast as the same code in optimised
> ASM. It is just not possible.

But it is possible that the compiler (i.e. GCC) optimizes your
function in C better than you could think off. That's why you should,
IMHO, first profile your speed-critical application, and then _try_ to
optimize in ASM the parts you _think_ can (and should) go faster.
GCC does a lot in aligning, instruction ordering and other things for
your CPU, if you give it the right options.

greetings,
 Robert.

PS. this is not intended to start a (flame)war between C/C++ and ASM
    coders, but it's just to clarify some more. And I think it's not
    _necessary_ to know ASM to be a good (game) coder, although I am
    sure it will be very usefull if you do.
-- 
rjvdboon AT cs DOT vu DOT nl        | "En dat is niet waar!" sprak (ex?) Staatsecre-
www.cs.vu.nl/~rjvdboon   |    taris Netelenbos (onderwijs) fel.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019