Mail Archives: djgpp/1998/01/28/13:31:55
From: | Robin Burrows <rburrows AT hotmail DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Code speed-up
|
Date: | Wed, 28 Jan 1998 16:40:50 +0000
|
Organization: | Virgin Net Usenet Service
|
Lines: | 16
|
Message-ID: | <34CF5F92.126C@hotmail.com>
|
Reply-To: | rburrows AT hotmail DOT com
|
NNTP-Posting-Host: | 194.168.73.210
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hello,
Anyone suggest a speed up for this little bit of code:
for (l=0;l<mapblockheight;l++) {
maplinecpypt = (unsigned char *) mapdestpt->line[(l+j)] + i;
for (k=0;k<mapblockwidth;k++) {
*maplinecpypt = *mapgfxpt; maplinecpypt++; mapgfxpt++;
}
}
It seems quite inefficient copying a byte over a 32bit bus, but I'm not
sure how odd addresses would affect a bigger move. The inner line of
this function is called 256*180 times for ONE screen update.
Regards,
Robin Burrows.
- Raw text -