Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Any speed issues with DLL's

This topic is 5811 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Just wondering if i had some graphics functions inside a DLL to do my rendering or whatever else, would using a DLL slow down things at all, i assume it probably would a little bit, but not very sure on this

Share this post

Link to post
Share on other sites
If you are using .Net and a .Net based dll...nope. Otherwise, I''m not sure...I don''t think it would though, I don''t see any reasons for a performance hit.

"Wisdom is proportionate to your reference base. Intelligence is the ability to appropriately use that Wisdom."

Share this post

Link to post
Share on other sites
Nope, it wouldn''t slow things down. We do it in our engine.

DLLs get mapped into the address space of your process (your main program).

The addresses of any imports (functions in the DLL used by the main program) get fixed at load time so that the calls point directly to the DLL calls. So it ends up no different to a non-inlined function in your main program!

One thing to be aware of though is if the main program (or anything it calls) needs to create/destroy threads with any kind of regularity make sure you call DisableThreadLibraryCalls() in response to a DLL_PROCESS_ATTACH message in your DllMain().

To be on the safe side I''d still ensure that you don''t use DLL functions for high frequency calls (i.e. if you have a DLL function which transforms a single vertex which gets called tens of thousands of times in a frame, then you probably have a bad design!)

Simon O''Connor
Creative Asylum Ltd

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!