Mail Archives: djgpp/2000/04/16/09:17:42
On Sun, 16 Apr 2000, Alexei A. Frounze wrote:
> Just make either a plane C code (which is slower) or huge external ASM
> subroutine
Well Alexei, programmers have particularly bad tendency of finding where
the bottleneck in a program really is... say for example if a character
move genration algorithm takes up 90% of your programs time and the
blitting takes up only 10% then what use will writing the blitting in
assembly have..the move genration part is what you should optimise...since
it takes the most time..
So what I would suggest would be to write the entire (or as much code as
possible) using C..then you can run gprof and see which routines are
taking up the most cpu time...and belive me you will be surprised...
*then* you can decide on what routines to optimise or not...
And also I find that surprisingly enough a good optimizing compiler
produces faster code than a hadwritten assembly sequence. Because the
compiler can optimize the output of the C code taking in to advatage the
cpu characteristics of various x86 architectures...
And also the assembly you *think* is fast may sometimes be very slow (ie
there maybe a faster way of doing it) on diferent x86 cpu's....
Grendel
Hi, I'm a signature virus. plz set me as your signature and help me spread
:)
- Raw text -