I wrote an algorithm just to see how fast C\C++ is when compared to Blitz.
C/C++ did it in 1.5 secs, which didn't surprise me.
Blitz2d/3D did it in 25 secs.
BlitzPlus did it in 1 min 9 secs.
I'm just wondering what change in BlitzPlus that it made it so much slower.
Here is the code:
C/C++ did it in 1.5 secs, which didn't surprise me.
Blitz2d/3D did it in 25 secs.
BlitzPlus did it in 1 min 9 secs.
I'm just wondering what change in BlitzPlus that it made it so much slower.
Here is the code:
;this program sorts an array of numbers from ;largest to smallest Global count=1 Global temp Const terminator=-1 Print "This program sorts random numbers from 1 to 32768 from largest to smallest." Print " " Print "If you want to sort a 1000 numbers enter a (1000)." num = Input("Enter how many elements you want the array: ") Dim SortArray(num+1) SeedRnd (MilliSecs()) For a=1 To num+1 SortArray(a)=Rnd(1,32768) Next SortArray(num+1)=terminator Print "Please wait..." oldtime$ = CurrentTime() While (SortArray(count) <> terminator) If SortArray(count+1) <= SortArray(count) count=count+1 Else temp=SortArray(count+1) SortArray(count+1) = SortArray(count) SortArray(count) = temp count = 1 EndIf If KeyDown(1) Then Exit Wend newtime$ = CurrentTime() For b=1 To (num) Print SortArray(b)+" " Next Print "Start Time "+oldtime$ Print "End Time "+newtime$ Print " " FlushKeys() WaitKey() End