Quote Originally Posted by Schmidt View Post
Not sure what you mean with "hacking" - is it the usage of pointers in VB (you know, the same things you do when writing C++ code)?
Among other things, yes.

Quote Originally Posted by Schmidt View Post
Seems you are of the opinion, that when you work with pointers in C++, then it's "a nice, clean and fast way" - but when you use basically
the same Pointer-approach in VB6 per VartPtr/StrPtr & Co, then it is suddenly an "evil hack".
It is an evil hack.

Note that VarPtr is a function. I'd expect like all functions a stack frame needs to be prepared every time its called. Surely setting up a stack frame consumes extra cycles. Do you think you would get such overhead using pointers in C++ ? Do you believe that the C++ compiler would produce calls into a whole function just to access a bit of memory ?

Surely if VB6 was meant to be decent with pointers, MS would have provided a more efficient means of dealing with them. But they didn't hence techniques that involve VarPtr are hacks. You're basically "hacking" the language to do something it was not really meant to do.

Quote Originally Posted by Schmidt View Post
A blurry statement that, sorry to say... not sure what exactly is so difficult to understand in, that VB6 can compile roughly to the same speed-level as VC++6.
VB6 can compile to native code yes but VB6 is natively COM. What do you think it compiles to when you say...access an array ? Its most likely going to compile calls into OLE functions like SafeArrayAccessData(Feel free to correct me if I'm wrong ) If I need to process an array of pixels every 50 milliseconds, this overhead is totally unacceptable. I need a compiler gives me direct access to the memory without the overhead of calling into functions like SafeArrayAccessData. C++ gives you pointers which work very well with arrays and the C++ compiler no doubt uses far fewer native instructions for array operations than you would get from the VB6 compiler.

Quote Originally Posted by Schmidt View Post
Writing fast routines requires first and foremost *experience*, no matter what language (especially not, when the languages in question are pretty close since they compile already "natively").
Don't kid yourself, the VC++ compiler doesn't compile code close to what the VB6 compiler would do.