Re: Which is faster: getglobal vs ref?

78 views
Skip to first unread message

Sainan

unread,
Jul 17, 2025, 2:01:57 AMJul 17
to lu...@googlegroups.com
Oh, I love me some vibes-based no-benchmarking optimisation. You might quite enjoy using LuaLIT.

But seriously, your performance isn't gonna tank even if you do something a bit suboptimal. I use mutexes and tons of Lua states and can still comfortably hit 240 fps on modern hardware.

-- Sainan

Steven

unread,
Jul 17, 2025, 9:27:22 AMJul 17
to lu...@googlegroups.com
You're right, I'm prematurely optimizing. I should stop doing that.

But just to follow up, I did some benchmarks, and the cached global solution takes about 75% the time of the dynamic global solution. Not a considerable enough speed gain for the complexity and loss of dynamism, probably. Especially considering both would apparently be able to hit 240 fps!

--
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lua-l+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/lua-l/38VQbLS44W5q07v7r6qIuNdXoe8ibWZAZ4E_oneh4AeCgNUrmiZinMG-iGzlTiGqx7jNy9KhRxqMMsaWjcXmyGsVtmI-vtxGqgVUZ7X5A1w%3D%40calamity.inc.
Reply all
Reply to author
Forward
0 new messages