www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/18/13:49:55

From: buers AT gmx DOT de (Dieter Buerssner)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: inefficiency of GCC output code & -O problem
Date: 18 Apr 2000 17:08:15 GMT
Lines: 40
Message-ID: <8dibun.3vvqvqr.0@buerssner-17104.user.cis.dfn.de>
References: <Pine DOT LNX DOT 4 DOT 10 DOT 10004161837540 DOT 1138-100000 AT darkstar DOT grendel DOT net> <38F9D717 DOT 9438A3F6 AT mtu-net DOT ru> <8df84a DOT 3vvqu6v DOT 0 AT buerssner-17104 DOT user DOT cis DOT dfn DOT de> <38FB4094 DOT DE7B5F4C AT mtu-net DOT ru> <8dfum2 DOT 3vvqu6v DOT 0 AT buerssner-17104 DOT user DOT cis DOT dfn DOT de> <38FB7858 DOT 41B090DB AT mtu-net DOT ru> <8dh6kr DOT 3vvqvqr DOT 0 AT buerssner-17104 DOT user DOT cis DOT dfn DOT de> <38FC0E77 DOT 904B12BE AT mtu-net DOT ru>
NNTP-Posting-Host: pec-114-54.tnt7.s2.uunet.de (149.225.114.54)
Mime-Version: 1.0
X-Trace: fu-berlin.de 956077695 8227418 149.225.114.54 (16 [17104])
X-Posting-Agent: Hamster/1.3.13.0
User-Agent: Xnews/03.02.04
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Alexei A. Frounze wrote:

>Dieter Buerssner wrote: 
>> Alexei A. Frounze wrote:
>> 
>> >3. Dieter, I hope you won't try to convert span() to plane C. :)
>>                                                       ^^^^^
>> (Nice misspelling. With optimizing plane C-compiler, you shouldn't
>> need any assembly for 3d graphics ;)
>
>So why Doom,Quake,... and Allegro have ASM???

I made a joke. I am no native English speaker (neither are you).
Perhaps, the joke was bad/wrong. Don't you see, that a plane C
(not *plain*), should be able to texture planes quite efficiently.
I just thought, this was a *nice* misspelling.

>> >      };
>>         ^
>> Why this semicolon? The same thing I see everywhere in your sources.
>
>Do you think this semicolon makes something slower? 

No. But why the semicolon. It seems highly unconventional to me.

[code snipped]

>And they differ. 57 vs 70. Is it an improvement???

I don't doubt your numbers at all. Perhaps in my configuration, the
speed is limited by the access to the screen, and not in your config.
But it is clear, that the interface change (pointers vs. integer)
could make a small difference. When you call span(..., &u1, &u2, ...),
gcc most probably will not be able to hold u1 and u2 in registers.

I already said, that your ASM for span looks highly optimized,
so I was really surprised by my findings. It may also be a
BUG in my CPU, or a cache issue. Your version unrolls by an higher
factor.

- Raw text -


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