cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/28/16:51:10

Message-ID: <3596AC77.2ED6C239@hotmail.com>
Date: Sun, 28 Jun 1998 22:49:59 +0200
From: Archee/CoNTRACT <soltesz AT hotmail DOT com>
Reply-To: soltesz AT hotmail DOT com
Organization: School
MIME-Version: 1.0
To: lubaldo AT adinet DOT com DOT uy
CC: djgpp AT delorie DOT com
Subject: Re: 64k demo
References: <6lun9s$cie AT dfw-ixnews10 DOT ix DOT netcom DOT com>
<35819A38 DOT C1BA3FCB AT hotmail DOT com>
<358305BC DOT 61AB AT stud DOT warande DOT ruu DOT nl>
<6lun9s$cie AT dfw-ixnews10 DOT ix DOT netcom DOT com> <3 DOT 0 DOT 1 DOT 32 DOT 19980616011946 DOT 006a2bcc AT adinet DOT com DOT uy>

Another topic:

When you use 2d arrays, the speed depends of the MAX INDEX of the first
dimension of the array:


A>
char ad[200][200];
long index1,index2;


asm:

imul edi,[_index1],200
add edi,[_index2]
mov al,[edi+_ad]


B>
IF you smart:
char ad[200][256];
long index1,index2;

asm:
mov edi,[_index1]
shl edi,8
add edi,[_index2]
mov al,[edi+_ad]


SHL is MUCH faster than multiple !

- Raw text -


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