diff options
author | David Walter Seikel | 2014-04-07 13:40:11 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-04-07 13:40:11 +1000 |
commit | 0f8c5938fe24d9019a573e10554bcd04b34bba33 (patch) | |
tree | efc75876346f0f6bc42b590cd55b5bbecb5b7fa3 | |
parent | TODO fixed. (diff) | |
download | SledjHamr-0f8c5938fe24d9019a573e10554bcd04b34bba33.zip SledjHamr-0f8c5938fe24d9019a573e10554bcd04b34bba33.tar.gz SledjHamr-0f8c5938fe24d9019a573e10554bcd04b34bba33.tar.bz2 SledjHamr-0f8c5938fe24d9019a573e10554bcd04b34bba33.tar.xz |
Performance note.
-rw-r--r-- | ClientHamr/GuiLua/skang.lua | 7 |
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 | ||
609 | local Mum = | 609 | local Mum = |
610 | { | 610 | { |
611 | --[[ From an email by Mike Pall - | ||
612 | "Important: create the metatable and its metamethods once and reuse | ||
613 | the _same_ metatable for _every_ instance." | ||
614 | |||
615 | This 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 | ||