My friend who is a VB6 programmer is doing a benchmark against C
and the VB is running faster than the C but we know this isn't a reliable benchmark
Could you look at our benchmarks and tell us any thing that might be causing this.
MINGW
#include <stdio.h>
#include <time.h>
int main ()
{
clock_t startt;
int test;
//int startt;
int cur;
test = 0;
cur = 0;
startt = clock();
while(cur < 1000)
{
test = test + 1;
cur = clock() - startt;
}
printf (" %d loops in 1 second \n", test / 1000000);
getchar();
return 0;
}
VB6
Public Declare Function GetTickCount Lib "kernel32" () As Long
Public Sub Main()
Dim i As Long
Dim cur As Long
Dim start As Long
start = GetTickCount
i = 0
Do While cur < 1000
i = i + 1
cur = GetTickCount - start
Loop
MsgBox i / 1000000
'divide it by 1 million so we
'get a readable number
End Sub
PS he says the VB is running in module without a fourm in the project.