[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a book or tutorial



On Tue, Mar 27, 2001 at 04:22:34PM +0200, Mads Bondo Dydensborg wrote:
> > 	Well, IMHO, you don't have to know how do make your code superfast and
> > optimized to just get the job done. But then ask yourself if you want
> > the job done, or if you want it done *well* - that's were those
> > specifics about CPUs, video hardware and other stuff come into practice.
> > Thing is, don't worry about writing the fastest, most efficient code the
> > first time, think about it when you really need to squeeze some extra
> > cycles.
> 
> And when do you need to do that? Quake only uses assembler for software
> rendering. Other then that, plain C. 
> 
> I can't begin to imagine when I would want to use assembler. Maybe the
> libs I use do it. But not me, no thanks. 
> 
> With the new CPU's (from e.g. intel) unless you are among the best 10
> assembler coders in the world, you want have a chance of writing assembler
> half as good as your compiler anyway.
It is perfectly possible for someone to write better code than a
compiler. If you take a application as a whole then yes, a compiler
could write much better assembler than almost anyone. However, taking
a specfic section of an algorithm it may or may not be possible to
improve on the compiler generated code. Things like alpha blending or
texture mapping can easily be optimised in this way, especially when you
start using MMX/SSE/3DNow opcodes. As a programmer its your job to
determine which parts or your code my require this kind of treatment and
which parts are better left alone.


-- 
Martin
--
Bother! said Pooh, as he stomped Barney's ass to jello.

---------------------------------------------------------------------
To unsubscribe, e-mail: linuxgames-unsubscribe@sunsite.dk
For additional commands, e-mail: linuxgames-help@sunsite.dk