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

Re: a book or tutorial



On Tue, 27 Mar 2001, Martin Donlon wrote:

> On Tue, Mar 27, 2001 at 04:22:34PM +0200, Mads Bondo Dydensborg wrote:

> > And when do you need to do that? Quake only uses assembler for software
> > rendering. Other then that, plain C. 
> > 
> > 
> > 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. 

As I understand it, the new "multischedule" CPU's will be almost
impossible to manage in your head. I do not think any ordinary programmer
(and in that aspect I consider 95% of us ordinary) can keep multiple
pipelines, cachelayouts, etc in their heads.

> 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.

I would rely on libraries to do this. Simply because there is no point in
all of us knowing the MMX/SSE/3DNow operations and opcodes. As I have
already stated, I believe alpha blending and texture mapping belongs in
hardware.

> 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.

By including assembler in code I personally think people behave
arrogantly. True, they may experience a speed up compared to their current
setup. But, the moment I move to another platform this is lost. Or, if I
have a better compiler than they do (as in pgcc/whatever vs gcc) they may
have included assembler worse than the assembler my compiler generates.

I am still not convinced assembler is worth it in anything but libs and
similar.

Mads

-- 
Mads Bondo Dydensborg.                               madsdyd@challenge.dk
The operating system of claim 1 wherein said core component includes a
plurality of export functions, wherein the export functions of said core
component and said first processing component are identified by export
symbols, wherein said set of import symbols identify a corresponding set of
kernel function calls issuable in the execution of said first component, and
wherein said component switch includes a data table supporting execution
time call redirection of said kernel function calls to export functions
determined by a correspondence between respective import and export symbols.

      -- Sentence from LynuxWorks patent on software modules in OS kernels.


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