Oh God....you are really dense. Look at this:-
vb Code:
' Private Sub Test() 'Lets just pretend this array has 'data Dim numbers() As Integer For i = LBound(numbers) To UBound(numbers) numbers(i) = numbers(i) * 2 Next End Sub
Are you really going to pretend that the VB compiler would produce native code that would execute as fast as this compiled by a C++ compiler:-
c++ Code:
// void Test() { // Lets pretend this pointer // points to a list of integers int* numbers; int numElements=1000; for(int i=0;i<numElements;i++) { numbers[i]=numbers[i]*2; } }
The VB6 array is a SafeArray. It has to be accessed through COM API calls. The C++ uses simple pointer arithmetic. It should be obvious which one would execute faster. Are you seriously suggesting that this is not true ?




Reply With Quote