Tuesday, October 16, 2012

In GMod13 we've switched over to LuaJIT. This is something that people have requested for a few years, but I've resisted due to some incompatibilities. So here's what you need to know.


LuaJIT is faster than plain Lua. If you need to know how or why you can find that info on their site. But something to consider is that this isn't going to take your FPS in GMod from 20 to 100. Most of the strain in the engine is still going to be rendering - the graphics card is almost always the bottleneck.

You should also consider that Lua isn't really doing any hard work in GMod. In general Lua is only really being used to call engine functions. You're only really going to see a speed increase if you're doing a lot of processing with Lua.

That's not to say there aren't any speed increases. In a timedemo I ran a few times I averaged 132fps with LuaJIT, and 126 without.


GMod changes the Lua syntax in a few ways. It adds C comments, it adds the continue keyword, it adds !not and && and ||.

The old version also added bitwise | and &. These are removed in the new version - which is going to break some code that relies on it. I chose to make this change now while we're breaking other stuff. We have access to the luajit bit library now - which is a lot more complete.

Another change worth noting is that the global "_R" no longer exists. It's accessible via debug.getregistry().

More Rubbish

Your Portfolio Gave Me Diarrhea

Friday, October 1, 2021


Friday, September 24, 2021

We got married

Thursday, September 16, 2021

Unity Quiz

Sunday, September 6, 2020

Everything We Watched In Lockdown

Thursday, September 3, 2020

Thanks EU

Thursday, October 11, 2012

New Office

Monday, October 8, 2012

Sky Shader

Wednesday, October 3, 2012


Friday, September 14, 2012

I'm going to Egypt for 2 weeks

Monday, August 20, 2012