Posted: Sat Mar 01, 2003 11:25 pm
Restored from previous forum. Originally posted by Franco.
Hi fellas,
after reading some really negative topics on this forum I want to share some positive thoughts
Yesterday I found test code for different programming languages, mostly basic @:
http://electronicauy.8bit.co.uk
So I wanted to know where PureBasic stays and converted the code to Pure.
On my machine (Duron 950Mhz Sony Notebook) I had the following result:
Visual Basic EXE = 12s
BCX Basic EXE = 6s ;this is basic code translated to C and compiled with LCC-Win32
PureBasic EXE = 2.3s ;
PureBasic with enabled Debugger (F5 in Editor) = 3s
Pascal EXE = 6s
Didn't test the other ones...
Well I don't know how 'good' the test code is (in general) but I had a good feeling after processing the tests.
On faster machines you get shorter times, so for a real comparison you need to start all EXE's on your computer. (on the website)
The only negative thing I found was, the BCX/LCC-Win32 EXE file is 8kb small and the PureBasic EXE 18kb.
But on the other hand, all the other EXE's are bigger
For the ones of you that are interested in the translated Pure code:
Have a nice day...
Franco
Hi fellas,
after reading some really negative topics on this forum I want to share some positive thoughts
Yesterday I found test code for different programming languages, mostly basic @:
http://electronicauy.8bit.co.uk
So I wanted to know where PureBasic stays and converted the code to Pure.
On my machine (Duron 950Mhz Sony Notebook) I had the following result:
Visual Basic EXE = 12s
BCX Basic EXE = 6s ;this is basic code translated to C and compiled with LCC-Win32
PureBasic EXE = 2.3s ;
PureBasic with enabled Debugger (F5 in Editor) = 3s
Pascal EXE = 6s
Didn't test the other ones...
Well I don't know how 'good' the test code is (in general) but I had a good feeling after processing the tests.
On faster machines you get shorter times, so for a real comparison you need to start all EXE's on your computer. (on the website)
The only negative thing I found was, the BCX/LCC-Win32 EXE file is 8kb small and the PureBasic EXE 18kb.
But on the other hand, all the other EXE's are bigger
For the ones of you that are interested in the translated Pure code:
Code: Select all
OpenWindow(1,224, 172, 205, 64,#PB_Window_SystemMenu,"Test Speed PureBasic")
CreateGadgetList(WindowID())
StringGadget(1, 4, 4, 128, 20, "")
ButtonGadget(2, 136, 4, 60, 20, "Begin")
TextGadget(3,4, 28, 128, 16, "Elapsed: 0")
ButtonGadget(4, 136, 28, 60, 20, "Exit")
Repeat
EventID.l = WaitWindowEvent()
Select EventGadgetID()
Case 2
Gosub ExecuteTest
Case 4
End
EndSelect
Until EventID = #PB_EventCloseWindow
End
ExecuteTest:
SetGadgetText(3, "Please Wait .")
StartTimer.l = GetTickCount_()
For LoopFor1.l = 1 To 10000000
Result1.f=((100000 * 100) / 1000) + Sqr(4)
Result2.f=((100000 * 100) / 1000) + Sqr(4)
Result3.f=((100000 * 100) / 1000) + Sqr(4)
Result4.f=((100000 * 100) / 1000) + Sqr(4)
Result1=((100000 * 100) / 1000) + Sqr(4)
Result2=((100000 * 100) / 1000) + Sqr(4)
Result3=((100000 * 100) / 1000) + Sqr(4)
Result4=((100000 * 100) / 1000) + Sqr(4)
If LoopFor1 = 100000
SetGadgetText(3, "Please Wait .")
ElseIf LoopFor1 = 1000000
SetGadgetText(3, "Please Wait .")
ElseIf LoopFor1 = 10000000
SetGadgetText(3, "Please Wait .")
EndIf
Next LoopFor1
SetGadgetText(1, "Result:" + Str(Result1 + Result2))
ElapsedTime.l = GetTickCount_()-StartTimer
SetGadgetText(3, "Elapsed: " + Str(ElapsedTime) + " ms")
Return
Franco