Posted: Tue Oct 21, 2008 9:06 pm
I guess that the issue is the amount of ram: i have 512MB, and the first time i executed your code, the computer flashed the HDled a lot (looks like it wrote on the HD virtual-mem), but the next times i executed it i get about this:
Poke: 1641
Pointer: 1312
:roll:
Anyway, the difference is not so big to take it so seriously.
Do it like this:It is more realistic. I get:
Poke: 1656
Pointer: 1500
Poke: 1641
Pointer: 1312
:roll:
Anyway, the difference is not so big to take it so seriously.
Do it like this:
Code: Select all
*Mem.long = AllocateMemory(200000000)
*m=*Mem
t1 = ElapsedMilliseconds()
If *Mem
For I = 0 To 199999990
PokeL(*Mem, I)
*Mem + SizeOf(byte)
Next
EndIf
t2 = ElapsedMilliseconds() - t1
*Mem=*m
t3 = ElapsedMilliseconds()
If *Mem
For I = 0 To 199999990
*Mem\l = I
*Mem + SizeOf(byte)
Next
EndIf
t4 = ElapsedMilliseconds() - t3
MessageRequester("Time:", "Poke: " + Str(t2) + #LF$ + "Pointer: " + Str(t4))
Poke: 1656
Pointer: 1500