APIs and VB.net

APIs and VB.net

Post by Jacquelin Hard » Fri, 07 Jun 2002 18:38:50



My VB projects involve lots of graphics, particularly APIs calls for speed
increase. Is it worhed to move from VB6 to VB.NET or not at all ?

Thank you

Jacquelin Hardy

 
 
 

APIs and VB.net

Post by Mike D Sutto » Sat, 08 Jun 2002 01:04:29


Quote:> My VB projects involve lots of graphics, particularly APIs calls for speed
> increase. Is it worhed to move from VB6 to VB.NET or not at all ?

Since the underlying API's do not change from one language to the next you
may very well not notice any speed difference at all, but AFAIK .NET is
slightly nearer the underlying API's then VB6 so you may notice a tiny speed
difference (Such as the difference between calling an API in VB and C).
There will be little difference in the actual speed of execution of the
routine since it's still running the same code.
I'm not sure on VB.NET's native code execution speed compared to VB6 but if
you have lots of mathematics to perform then it makes a big difference to
compile that in a language with a faster mathematics engine such as VC6.
I don't know what .NET is like in this respect having never really done much
development with it at all, you'd be better off asking your question in a
VB.NET group for that.
Hope this helps,

    Mike

 -- EDais --

 - Microsoft Visual Basic MVP -
WWW: Http://EDais.earlsoft.co.uk/



 
 
 

APIs and VB.net

Post by Dan » Sat, 08 Jun 2002 23:28:21


Jacquelin,

   If your project involves intense graphics as you say, I
would definately not do the project in VB.net. In VB.net,
any native calls to C-style decls such as the Win32 Gdi,
have to go through the interop layer of the .Net
framework. In some cases, this may involve some expensive
data marshaling (.Net strings -> API char arrays, etc),
and moving to and from the managed heap/stack to the
unmanaged world.

   ... If speed is your concern, then I definately would
not use GDI+ either, which is not hardware accelerated -
and is God-awfully slow.

   For now, keep the project in VB6, but otherwise I
completely agree with Mike, where your project may benefit
from being written in VC++. (... and VC.Net still compiles
to fast machine code!).

Dan

Quote:>-----Original Message-----
>> My VB projects involve lots of graphics, particularly

APIs calls for speed
Quote:>> increase. Is it worhed to move from VB6 to VB.NET or
not at all ?
>> Since the underlying API's do not change from one

language to the next you
Quote:>may very well not notice any speed difference at all, but
AFAIK .NET is
>slightly nearer the underlying API's then VB6 so you may
notice a tiny speed
>difference (Such as the difference between calling an API
in VB and C).
>There will be little difference in the actual speed of
execution of the
>routine since it's still running the same code.
>I'm not sure on VB.NET's native code execution speed

compared to VB6 but if
Quote:>you have lots of mathematics to perform then it makes a
big difference to
>compile that in a language with a faster mathematics
engine such as VC6.
>I don't know what .NET is like in this respect having

never really done much
>development with it at all, you'd be better off asking
your question in a
>VB.NET group for that.
>Hope this helps,

>    Mike

> -- EDais --

> - Microsoft Visual Basic MVP -
>WWW: Http://EDais.earlsoft.co.uk/


>.

 
 
 

APIs and VB.net

Post by Mike D Sutto » Sun, 09 Jun 2002 01:40:38


Quote:>    For now, keep the project in VB6, but otherwise I
> completely agree with Mike, where your project may benefit
> from being written in VC++. (... and VC.Net still compiles
> to fast machine code!).

How is this the case, I thought every .NET language compiles to the common
ASM-like byte-code (LC?  Not sure on the name there..) which is run by the
.NET runtime?  Isn't this the entire principle of the .NET 'strategy?

    Mike

 -- EDais --

 - Microsoft Visual Basic MVP -
WWW: Http://EDais.earlsoft.co.uk/


 
 
 

APIs and VB.net

Post by Ray Merce » Tue, 11 Jun 2002 15:15:26




Quote:> >    For now, keep the project in VB6, but otherwise I
> > completely agree with Mike, where your project may benefit
> > from being written in VC++. (... and VC.Net still compiles
> > to fast machine code!).

> How is this the case, I thought every .NET language compiles to the common
> ASM-like byte-code (LC?  Not sure on the name there..) which is run by the
> .NET runtime?  Isn't this the entire principle of the .NET 'strategy?

.NET is an added layer of runtime.  Every .NET language compiles to a common
interpreted byte-code which is then interpreted at runtime by the .NET
layer.

I can't figure out what you mean by "ASM-like byte-code".  ASM is the
closest you can get to machine code - .NET is at the opposite end of the
spectrum.  There is nothing "ASM-like" about it.

-Ray

 
 
 

APIs and VB.net

Post by Mike D Sutto » Wed, 12 Jun 2002 00:39:42


Quote:> .NET is an added layer of runtime.  Every .NET language compiles to a
common
> interpreted byte-code which is then interpreted at runtime by the .NET
> layer.

> I can't figure out what you mean by "ASM-like byte-code".  ASM is the
> closest you can get to machine code - .NET is at the opposite end of the
> spectrum.  There is nothing "ASM-like" about it.

I meant in terms of it's structure rather than usage, at least the couple of
samples of LC (Or whatever it's called) that I've seen have looked very
similar to ASM.  (Although in hindsight it could have actually been ASM and
I just misinterpreted the article if they are indeed so dissimilar,
admittedly my knowledge of both languages is next to zero..)
Apologies for the confusion,

    Mike

 -- EDais --

 - Microsoft Visual Basic MVP -
WWW: Http://EDais.earlsoft.co.uk/


 
 
 

APIs and VB.net

Post by Max Bolingbrok » Wed, 12 Jun 2002 00:48:37


What I've seen of IC (?) looks pretty ASM like frankly. Ive only done a little ASM though, mainly for fun :)

Max Bolingbroke

 
 
 

APIs and VB.net

Post by Ben A L Jemmet » Wed, 12 Jun 2002 03:03:15




Quote:> I meant in terms of it's structure rather than usage, at least the couple
of
> samples of LC (Or whatever it's called) that I've seen have looked very
> similar to ASM.

MSIL (Microsoft Implementation Language)?  It'd make sense that it's a
machine code stream (so has a corresponding assembler language), which is
emulated on all target platforms.  This technique dates way back (Infocom's
interactive fiction used a system called the Z machine, which did the same
thing), and allows a program to be compiled from any random language
(VB.NET, C#, MSIL itself) down to the virtual machine code and then run on
any number of systems without modification; you just rewrite the emulator
program.

--
Regards,
Ben A L Jemmett.
(http://web.ukonline.co.uk/ben.jemmett/, http://www.deltasoft.com/)