purebasic code[4.30]:
timer.f=ElapsedMilliseconds()
k.l
For i.l=1 To 100000
For j.l=1 To 100000
k=i+j
Next j
Next i
MessageRequester(StrF(ElapsedMilliseconds()-timer),"")
End
purebasic cost 30.9 seconds
powerbasic cost 11.3 seconds with likely code
My computer:Intel duo core E4500
System:Microsoft XP(SP2)
Running speed compare between purebasic and powerbasic
Re: Running speed compare between purebasic and powerbasic
You did remember to use "DisableDebugger" at the head of your PureBasic
source, right? Because that's how executables are built with PureBasic.
And you do know that ElapsedMilliseconds() doesn't return a float?
So, please post your results with this corrected PureBasic code:
source, right? Because that's how executables are built with PureBasic.
And you do know that ElapsedMilliseconds() doesn't return a float?
So, please post your results with this corrected PureBasic code:
Code: Select all
DisableDebugger
timer.l=ElapsedMilliseconds()
k.l
For i.l=1 To 100000
For j.l=1 To 100000
k=i+j
Next j
Next i
MessageRequester(Str(ElapsedMilliseconds()-timer),"")
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
> You did remember to use "DisableDebugger" at the head of your PureBasic source, right?
That'll only get you half way there. You have to turn it off entirely: http://www.purebasic.fr/english/viewtop ... 209#242209
Oh, and this test is nonsense anyway. If you want to do a real comparison then test with a code/algorithm that actually solves a real world problem. Measuring how fast a useless empty loop will run tells you nothing.
That'll only get you half way there. You have to turn it off entirely: http://www.purebasic.fr/english/viewtop ... 209#242209
Oh, and this test is nonsense anyway. If you want to do a real comparison then test with a code/algorithm that actually solves a real world problem. Measuring how fast a useless empty loop will run tells you nothing.
quidquid Latine dictum sit altum videtur

