#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default VBA -vs- VB

Does someone have a feel for the relative speeds of VBA -vs- Visual Basic?
For a computationally intensive application say for simplicity. Calculating
the nth digit or pi or whatever?

It's not clear to me what "compiled" means anymore. People refer to VBA
being compiled, but I've never felt comfortable whether it is really fully
compiled down to optimized executable code (like C say), or whether it's
actually tokenized -- something between interpreted and compiled. And I
know even less about Visual Basic.

Thanks.

Bill

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default VBA -vs- VB

VBA is tokenized. I don't know about a VB EXE or DLL. But why compare
Excel VBA to standalone VB? You should be comparing Excel to standalone VB.
Excel can do calculation far faster than VBA.

--
Jim
"Bill Martin" wrote in message
...
Does someone have a feel for the relative speeds of VBA -vs- Visual Basic?
For a computationally intensive application say for simplicity.
Calculating the nth digit or pi or whatever?

It's not clear to me what "compiled" means anymore. People refer to VBA
being compiled, but I've never felt comfortable whether it is really fully
compiled down to optimized executable code (like C say), or whether it's
actually tokenized -- something between interpreted and compiled. And I
know even less about Visual Basic.

Thanks.

Bill



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default VBA -vs- VB

The reason for that sort of comparison is that I have moderately large
spreadsheets where I use VBA to do a lot of repetitive Monte Carlo
optimization. At times I've been tempted to port it out to C code, but I
never personally liked C and never been motivated enough to actually do it
anyhow.

I was just curious if VB would give fully compiled performance, and yet be a
higher level language than C to program in. Presumably various bits of VBA
code could be ported more easily into VB than into C?

The easy solution would be to just get a much faster computer, but...

Bill
------------------------------
"Jim Rech" wrote in message
...
VBA is tokenized. I don't know about a VB EXE or DLL. But why compare
Excel VBA to standalone VB? You should be comparing Excel to standalone
VB. Excel can do calculation far faster than VBA.

--
Jim
"Bill Martin" wrote in message
...
Does someone have a feel for the relative speeds of VBA -vs- Visual
Basic? For a computationally intensive application say for simplicity.
Calculating the nth digit or pi or whatever?

It's not clear to me what "compiled" means anymore. People refer to VBA
being compiled, but I've never felt comfortable whether it is really
fully compiled down to optimized executable code (like C say), or whether
it's actually tokenized -- something between interpreted and compiled.
And I know even less about Visual Basic.

Thanks.

Bill




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default VBA -vs- VB

If you take your VBA code and put it in a VB6 ActiveX dll and use that dll
you may get some increased speed but not that much. I found it in the order
of 50% to 100% increase, depending of course what the VBA code is.
Usually there is more gain if you optimize your VBA code.
Still, moving to a VB ActiveX dll is very easy and you have the added bonus
of good code protection if you needed that.

RBS


"Bill Martin" wrote in message
...
The reason for that sort of comparison is that I have moderately large
spreadsheets where I use VBA to do a lot of repetitive Monte Carlo
optimization. At times I've been tempted to port it out to C code, but I
never personally liked C and never been motivated enough to actually do it
anyhow.

I was just curious if VB would give fully compiled performance, and yet be
a higher level language than C to program in. Presumably various bits of
VBA code could be ported more easily into VB than into C?

The easy solution would be to just get a much faster computer, but...

Bill
------------------------------
"Jim Rech" wrote in message
...
VBA is tokenized. I don't know about a VB EXE or DLL. But why compare
Excel VBA to standalone VB? You should be comparing Excel to standalone
VB. Excel can do calculation far faster than VBA.

--
Jim
"Bill Martin" wrote in message
...
Does someone have a feel for the relative speeds of VBA -vs- Visual
Basic? For a computationally intensive application say for simplicity.
Calculating the nth digit or pi or whatever?

It's not clear to me what "compiled" means anymore. People refer to VBA
being compiled, but I've never felt comfortable whether it is really
fully compiled down to optimized executable code (like C say), or
whether it's actually tokenized -- something between interpreted and
compiled. And I know even less about Visual Basic.

Thanks.

Bill





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default VBA -vs- VB

Thanks for the info.

Bill
--------------------
"RB Smissaert" wrote in message
...
If you take your VBA code and put it in a VB6 ActiveX dll and use that dll
you may get some increased speed but not that much. I found it in the
order of 50% to 100% increase, depending of course what the VBA code is.
Usually there is more gain if you optimize your VBA code.
Still, moving to a VB ActiveX dll is very easy and you have the added
bonus of good code protection if you needed that.

RBS


"Bill Martin" wrote in message
...
The reason for that sort of comparison is that I have moderately large
spreadsheets where I use VBA to do a lot of repetitive Monte Carlo
optimization. At times I've been tempted to port it out to C code, but I
never personally liked C and never been motivated enough to actually do
it anyhow.

I was just curious if VB would give fully compiled performance, and yet
be a higher level language than C to program in. Presumably various bits
of VBA code could be ported more easily into VB than into C?

The easy solution would be to just get a much faster computer, but...

Bill
------------------------------
"Jim Rech" wrote in message
...
VBA is tokenized. I don't know about a VB EXE or DLL. But why compare
Excel VBA to standalone VB? You should be comparing Excel to standalone
VB. Excel can do calculation far faster than VBA.

--
Jim
"Bill Martin" wrote in message
...
Does someone have a feel for the relative speeds of VBA -vs- Visual
Basic? For a computationally intensive application say for simplicity.
Calculating the nth digit or pi or whatever?

It's not clear to me what "compiled" means anymore. People refer to
VBA being compiled, but I've never felt comfortable whether it is
really fully compiled down to optimized executable code (like C say),
or whether it's actually tokenized -- something between interpreted and
compiled. And I know even less about Visual Basic.

Thanks.

Bill







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"