delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/12/21/06:02:59

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Sourcerer <A_Pox_on_all_spammers AT n DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Is this optimizable ?
Message-ID: <h9uauvkip8afd6q7sj942qh4e8pmjv5lsi@4ax.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Lines: 24
Date: Sun, 21 Dec 2003 10:52:31 +0000
NNTP-Posting-Host: 82.37.58.189
X-Complaints-To: abuse AT blueyonder DOT co DOT uk
X-Trace: news-binary.blueyonder.co.uk 1072003938 82.37.58.189 (Sun, 21 Dec 2003 10:52:18 GMT)
NNTP-Posting-Date: Sun, 21 Dec 2003 10:52:18 GMT
Organization: blueyonder (post doesn't reflect views of blueyonder)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi All,
I am currently using this code to retrieve data from a data capture
board

unsigned char data[1024], *data_ptr;
data_ptr = data;

for(x = 0; x < 1024; x++)
    *data_ptr++ = inportb(0x246);

I am giving the compiler the -O3 option

Only trouible is, my for() loop is not fast enough. 
I am thinking there is not much there to optimize and that even if I
wrote the function in assembler it wouldn't be much quicker. 
But I figured I'd ask you guys first before I declare the program
unfeasable.
Any ideas ?


Sourcerer
____________________
You don't tell time,
Time tells you.

- Raw text -


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