ID:272089
 
I was wondering if calling external procs from .dll files has have any noticeable effect on performance?
I'm not sure what the delay in accessing an exported function is, but as far as execution speed goes, running a function will be much faster if written in, say, C++, rather than in DM. The reason for this is simply that your operating system can execute the code in the DLL directly, whereas for a DM function it has to execute the code from the BYOND software which then reads the bytecode from the DMB and acts on that.

If there is little-to-no latency in calling an exported DLL function via call(), you can expect DLL functions to execute significantly faster than a DM-written counterpart. Nadrew, for example, said that his str_replace() function written in C++ was significantly faster than the dd_replaceText() (or whatever it was; I don't know the library or the function name exactly).

Hiead
In response to Hiead
That's great, then. Thanks!