Does use of DLL's make my application run faster than using standard modules and procedures?
:p Kinjal :p
Printable View
Does use of DLL's make my application run faster than using standard modules and procedures?
:p Kinjal :p
Yeah makes your code faster to write. =) That's the purpose of a DLL. DLL's make your exe file smaller and allows for more code re-use.
It also makes it faster by allowing other of your Apps to use it as well. (So you don't have to program the same thing in every app, you just get it from the dll)
MAYBE...
In App speed though it depends what your calculating.
If you have a highly optimised C Dll and you call it once and it spends time calculating then returns, Probably.
BUT, if you have a DLL that a loop continually calls then the overhead of calling the dll can be higher than the performance increase.
So it depends on what it does. A sorting algorithm is more likely to be quicker that way than VB, but a Dll that just returns the sum of two vars is more likely to be quicker in just VB once you figure in the call time.
So can I use DLL's instead of modules in my application?
:p Kinjal :p
Are you talking normal Dlls or ActiveX dlls?
Either way the answer is... (to Quote Hunt for Red October)
..."Sure, Why would you want to?"
I would use modules as much as possible and leave dll's, as dll's can be used by others, and make your app looks like "borrowing code". Of course there is fusioning dll's, but that makes no sense having external dll's an just fusion them again. And for the performance thing, there's probably no performance gain in having stored your functions made in vb in a dll instead of a module.
Do you mean that crappy Fusion program?
(assuming you do)
I got the demo and had a look, It's not real static linking (maybe), it's the whole dll tacked onto the back of the exe in compressed form as far as I can guess.
What do you think?
VB6 runtime dll = 1.3 mb
My app = 0.1 mb
Total = 1.4 Mb
Winzip (or cabs) compresses this 57%
New size = 800k
Fusion of the app = 900k
Winzip fusion of the app = 880k (3% in winzip)
There seems to be compression happening here as an exe usually gets 40-60% compression in winzip, not 3%
very suspicious