how fast (or slow) are the calls to dlls?
if i called a dll every step of my game, would chaos ensue?
usind VC++
how fast (or slow) are the calls to dlls?
if i called a dll every step of my game, would chaos ensue?
usind VC++
let us eat and drink
I doubt it becuase so many programs and games on the shelf use dlls quite often
If you want the func to be executed very fast, and if you are calling it repeatedly then I wouldt bother with Dlls........put the code in your main module and use the "inline" keyword where appropriate.
When you call a dll....it does something like
CALL Entry in Imported Jumptable
JMP To Functiontable in Dll
JMP To Actual Function in Dll
Now you can optimise this if your compiler supports __declspec(dllexport/dllimport), so the call goes straight to the Functiontable in the dll.....but it will still be quicker in your exe and you can use stuff like "inline"....
There are apps that allow you to Bind a dll and an exe, so there is just 1 call...but then you have to guess what was the point in using a dll in the first place!
For stuff that's not so critical, and assuming you are going to want to update those modules, or you want to share that code amongst your other apps...then fine use a dll
thanks
let us eat and drink
I'd say the overhead is negligible.
DirectX uses DLL-calls for all operations.
If the DLL is loaded run-time, the call is negligible.
Last edited by Sang-drax; 09-15-2002 at 08:51 AM.
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling
conclusion:
it wont kill me
let us eat and drink