aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-04-07 13:40:11 +1000
committerDavid Walter Seikel2014-04-07 13:40:11 +1000
commit0f8c5938fe24d9019a573e10554bcd04b34bba33 (patch)
treeefc75876346f0f6bc42b590cd55b5bbecb5b7fa3
parentTODO fixed. (diff)
downloadSledjHamr-0f8c5938fe24d9019a573e10554bcd04b34bba33.zip
SledjHamr-0f8c5938fe24d9019a573e10554bcd04b34bba33.tar.gz
SledjHamr-0f8c5938fe24d9019a573e10554bcd04b34bba33.tar.bz2
SledjHamr-0f8c5938fe24d9019a573e10554bcd04b34bba33.tar.xz
Performance note.
-rw-r--r--ClientHamr/GuiLua/skang.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua
index d4b3616..a8a75ae 100644
--- a/ClientHamr/GuiLua/skang.lua
+++ b/ClientHamr/GuiLua/skang.lua
@@ -608,6 +608,13 @@ end
608 608
609local Mum = 609local Mum =
610{ 610{
611--[[ From an email by Mike Pall -
612"Important: create the metatable and its metamethods once and reuse
613the _same_ metatable for _every_ instance."
614
615This is for LuaJIT, he's the author, and concerns performance.
616]]
617
611__index = function (parent, key) 618__index = function (parent, key)
612 -- This only works for keys that don't exist. By definition a value of nil means it doesn't exist. 619 -- This only works for keys that don't exist. By definition a value of nil means it doesn't exist.
613 620