Dll equals ultimate performance?

So I’ve been making a computer in Gmod, another universal turing machine, first in low level wire, then in E2, and I thought “E2 is good, cause everyone has it. But if I want my reduced instruction set CPU to compete with Black Phoenix’s ZCPU, I must make it a lua entity like he did”. But then I thought, scrap that, lua is a script language run inside of a C or C++ interpreter. Dlls have Got to give tenfold performance!

In short, I want ultimate performance of many millions of executions per second, whatever the cost. Are DLL’s really faster than Lua in this matter and how do I write a DLL for garrysmod? I can program C but are there any references on like how does lua run a function from a dll and is there anything special to know?

Learn C++, C won’t do.
Learn GMod Lua and generic Lua 100%, else you’ll get confused.
Read this.
Look at the source code of these.
Keep The Lua Manual in your back pocket.
Get annoyed at how hard it is.
Potentially finish, and then realise that although raw code in DLLs will obviously run faster than Lua… due to the sheer speed of Lua, there was no real point to making the DLL.

But remember… have fun!

It’s probably worth the experience though.

Execution of DLL-Code is a few times faster than the interpreted Lua, yes.
I basically learned coding lua-modules (I never coded C++ before) with the help of a few friends (Neico,Jinto) and by looking at the Binary Module section (DecoDaMan already told ya to take a look on these as an example).
My first start was setting up Visual Studion 2008 and getting a simple thing compiled. I think it will be easier for you since you know C and C++ should be easier for you to read thant it was for me.
Then I modified and messed around with gm_sqlite and other modules. This helped a lot on understanding how you do this and that.

-snip-
Damn he removed it.
“Hopelessly outdated”
Why the hell did they remove it? Every binary module is based on them anyway! Or is there a more updated version I’ve missed?

What? What got removed by who?

Oops, I snipped it :smiley:

Those are out of date from what I’ve heard.

Garry’s up to date interface is here: http://gm-sqlite.googlecode.com/svn/trunk/gm_sqlite/common

Or you could use Azuisleet’s secret :ninja: headers here: http://gmodmodules.googlecode.com/svn/trunk/secretheaders/