cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/12/15:50:26

Message-Id: <m0xVe52-000S1uC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT edu DOT ar>
Organization: INTI
To: Anders Musikka <ajm AT algonet DOT se>, djgpp AT delorie DOT com
Date: Wed, 12 Nov 1997 18:02:54 +0000
MIME-Version: 1.0
Subject: Re: reply to: low level programming necesary?

Anders Musikka <ajm AT algonet DOT se> wrote:

> >In many ( not all ) cases assembly can be avoided by an author by writing 
> >good C/C++ code, by taking short-cuts ( you don't plot every grain of sand 
> >on a beach in a 3D enviroment, you plot a hundred or more per pixel, and 
> >you only show the surfaces that can be seen from your point of view ) ... 
> >Good C++ code may be 10,20, or 50 times slower than good assembly code, 
> 
> 10,20 or 50 TIMES faster?
> 
> That's extreme! I've noticed a difference of maybe 20% for my important
> inner-loops. 
And depends on the case, I remmember when I recoded a PCX unpacker in ASM and 
got only 6% more of speed. The only way to get 50 times of difference is to 
compare a bad C code with a very good ASM code ;-)

> (Check the asm-code a good C compiler produces, it's okay if all
> optimizations are on)
> Some people seem to think there's some kind of magic in
> assembly ("If I write it in assembly it will be a lot faster").
Well, you are right, but some times you can get up to 2 times faster on Pentium 
machines if you exploit the 2 pipes to the maximun level. This can be done only 
designing an algorithm to make that and coding it in ASM, that what the Quake 
engine does ;-).
 
SET 
------------------------------------ 0 --------------------------------
Visit my home page: http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-sot AT usa DOT net - ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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