www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/28/08:56:02

From: gminer AT Newbridge DOT COM (Glen Miner)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Optimization
Date: 28 Nov 1996 12:44:13 GMT
Organization: Newbridge Networks Corporation
Lines: 33
Message-ID: <57k1et$4od@kannews.ca.newbridge.com>
References: <57hg9b$or5 AT kannews DOT ca DOT newbridge DOT com> <329C4CD4 DOT 7474 AT cornell DOT edu> <Pine DOT SUN DOT 3 DOT 90 DOT 961127095705 DOT 25056B-100000 AT coop10> <329C62F6 DOT 23F6 AT stud DOT warande DOT ruu DOT nl>
NNTP-Posting-Host: 138.120.136.238
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>> > you might be better off just using ints (32 bits) instead of 8, or
>> > worse, 16 bit quantities.
>> 
>> What makes you say that? I can't see how this would make it faster...
>> more cache misses, and an extra shift to index non-byte sized quantities.
>> Not to mention the fact that there are more byte sized registers.
>
>I believe in 32-bit protected mode most dword register ops are faster
>than the equivalent 16-bit ones on a 486 and above. Certainly on a P6
>16-bit instructions are disproportionately slow.  
>In any case I haven't seen djgpp generate any optimizations which utilise
>the byte registers; AFAIK it uses them only in straightforward byte ops.

That is quite sad. I mean, in a register starved architecture, I can't do
the compiler a favor by giving it byte sized data... Hmm. Someday I'll be
able to afford a real processor...

>I have no idea how good your C coding skills are, so don't be offended,
>but careful C code can speed up a sloppy implementation by ~ 100%:
>on the other hand, there are limits.

I've been optimizing it under a different compiler for the better part of
6 months. :) The implementation is approaching perfection... I'm just
trying to make sure that I'm doing everything I can to make the new
compiler happy :)

Thanks for you suggestions, though.

Peace
-- 
===[ Gabo / [ABC] : gaminer AT undergrad DOT math DOT uwaterloo DOT ca ]===================
Latest ABC Shogi: http://www.undergrad.math.uwaterloo.ca/~gaminer/shogi.html
"What Greenpeace spends in a year General Motors spends in four hours" -Moby

- Raw text -


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