Performance Benchmarks

new topic     » topic index » view thread      » older message » newer message

I ran across these benchmark tests comparing some basic compilers.Do these test have any validity for comparing performance?

The code was the same for the three clones. To check speed in >>CPU bound:

'************************************* 
Dim X As Double 
Dim Y As Double 
Dim intCounter As Integer 
Dim sStartTime As Integer 
Dim sEndTime As Integer 
 
sStartTime = Time$ 
Print sStartTime 
Y = .5 
For intCounter = 1 To 50000000 'Main loop 
Y = Y / 1.1234 
Y = Y * 1.1234 
X = acos(Y) 
X = asin(Y) 
X = tan(Y) 
X = cos(Y) 
X = exp(Y) 
X = log(Y) 
X = sin(Y) 
X = sqr(Y) 
X = tan(Y) 
Next intCounter 
sEndTime = Time$ 
Print sEnd 
Sleep 'Wait 
'************************************* 

To check speed in >>I/O bound:

'************************************* 
Dim intCurr As Integer 
Dim intFF As Integer 
Dim strStartTime As String 
Dim strEndTime As String 
 
strStartTime = TIME$ 
Print strStartTime 
 
intFF = FREEFILE 'First free file handle 
 
Open "F:\Text.Test" For Output As #intFF 
FOR intCurr = 1 TO 25000000 
PUT #intFF,, STR(intCurr) 
NEXT 
Close #intFF 
strEndTime = TIME$ 
Print strEndTime 
Sleep 'Wait 
'************************************* 

The results to my slow Compaq Presario laptop (512mb ram, Pentium 1,7mhz) was:

>>CPU 
HotBasic (demo licence): 49sec Exe size: 4.608bytes 
PureBasic (demo licence): 1min 31sec Exe size: 6.144bytes 
FreeBasic: 57sec Exe size: 21.504bytes 
RealBasic (demo licence): 2min 27sec Exe size: 1.584.603bytes 
 
>>IO 
HotBasic (demo licence): 1min 25sec Exe size: 6.656bytes 
PureBasic (demo licence): 1min 00sec Exe size: 12.800bytes 
FreeBasic: 39sec!!! Exe size: 29.184bytes 
RealBasic (demo licence): 5min 11sec Exe size: 1.582.817bytes 

[edit: added formatting. matt]

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu