On my 166Mhz running under windows 95 and launching from file manager, the following runs in 21+ seconds using QB4.5 and 63+ seconds using PB3.5.
The code was compiled using $CPU 80386 and $OPTIMIZE SPEED
DEFINT A - Z
$STATIC
DIM Arr(59, 255)
PRINT TIMER
FOR I = 0 TO 59
FOR J = 0 TO 255
Arr(I, J) = I + J
FOR K = O TO 255
SWAP Arr(I, J), Arr(I, 255 - J)
FOR L = 0 TO 255
NEXT L
NEXT K
NEXT J
NEXT I
PRINT TIMER
Baring the use of ASM (which I can't see how it would speed it up any) is there a way to optimize the code to run faster than the QB4.5 code?
------------------
[This message has been edited by Walt Decker (edited August 16, 2001).]
The code was compiled using $CPU 80386 and $OPTIMIZE SPEED
DEFINT A - Z
$STATIC
DIM Arr(59, 255)
PRINT TIMER
FOR I = 0 TO 59
FOR J = 0 TO 255
Arr(I, J) = I + J
FOR K = O TO 255
SWAP Arr(I, J), Arr(I, 255 - J)
FOR L = 0 TO 255
NEXT L
NEXT K
NEXT J
NEXT I
PRINT TIMER
Baring the use of ASM (which I can't see how it would speed it up any) is there a way to optimize the code to run faster than the QB4.5 code?
------------------
[This message has been edited by Walt Decker (edited August 16, 2001).]
Comment