scripting languages vs statically compiled ones

Programmer Dude Chris at Sonnack.com
Wed Nov 3 00:56:03 CET 2004


John writes:

> Believe it :-). VB5 and VB6 can be compiled to native code and has
> more or less identical performance to equivalent C code. And why
> should not it? VBA implementation in VB is statically typed, well
> optimized and not even as expressive as C. There is no kind of
> developer productivity overhead like you see in Python :-). If your VB
> code is running slower in VB6, chances are you are using variants and
> other less optimizable features.
> 
> VBA in MS Office is interpreted (not even p-code) and your C dll will
> improve performance a lot, but not much in VB5/VB6.
> 
> I actually benchmarked this 4 years ago. VB4 code ran 30 times slower
> compared to when using a C dll. VB5 code ran at about the same speed
> as C.

Concur.  A while back I thought I could speed up a VB app that had
a lot of bit-twiddle operations by writting a C-based DLL for it.

Turns out it ran slower that way!

Having used the VC++ debugger to step through compiled VB code, I
can attest to it being compiled down to native.  Ratio is much higher
than with, say C or C++... I'd WAG it at about 10:1 or slightly more.




More information about the Python-list mailing list