
CA-Realizer program execution speed problem !!!
Hello,
We've just recently purchased CA-Realizer v2 in order to port some of our
QuickBASIC v4.5 analysis programs over to the Windows environment. We've run
into a problem with code execution speed though. A simple randomization program
takes almost 10 times longer to run in Realizer than running it in QuickBASIC
in a DOS window. Anyone have any ideas ? I've include the randomization test
routine below to give you a better idea of the code I am speaking of.
Thanks in advance.
-------------------------------------------------------------------------------
Dept. of Psychology (306)966-6696
University of Saskatchewan Saskatoon, SK CANADA S7N 0W0
-------------------------------------------------------------------------------
OPTION BASE 0
DIM Count (10,10) as INTEGER
DIM ItemIndx(10) as INTEGER, Indx(10) as INTEGER
PRINT "Test Randomization Routine": PRINT
PRINT "Start time: "; TIME$: PRINT
TEST# = 0 'Note: 10,000 random trial sequences will be generated
'------------------------------------------------------------------------
'Routine to randomize indices for a stimulus array
RANDOMIZE TIMER
TEST:
N = 10 'n = number of items (trials)
FOR I = 0 TO N - 1: Indx(I) = I: NEXT 'item indices to be randomized
Trial = 0: MaxPos = N
RAND:
RndPos = INT(MaxPos * RND)
ItemIndx(Trial) = Indx(RndPos): Trial = Trial + 1
Indx(RndPos) = Indx(MaxPos - 1): MaxPos = MaxPos - 1
IF Trial < N
GOTO RAND
END IF
'------------------------------------------------------------------------
FOR Trial = 0 TO N - 1: 'PRINT ItemIndx(Trial)
Count(Trial, ItemIndx(Trial)) = Count(Trial, ItemIndx(Trial)) + 1 '# per case per rnd position
NEXT: 'PRINT
TEST# = TEST# + 1
IF TEST# < 200
GOTO TEST
END IF
PRINT "Trial Stimulus Item Frequences"
FOR Trial = 0 TO N - 1: PRINT Trial;
FOR ItemIdx = 0 TO N - 1
PRINT USING " ##### "; Count(Trial, ItemIdx);
NEXT: PRINT : NEXT
PRINT : PRINT "Finish time: "; TIME$
INPUT "HIT <RETURN>","FINISHED";