Mail Archives: djgpp/1998/08/09/01:49:00
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 -