From 0f8c5938fe24d9019a573e10554bcd04b34bba33 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 7 Apr 2014 13:40:11 +1000 Subject: Performance note. --- ClientHamr/GuiLua/skang.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ClientHamr/GuiLua') 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 local Mum = { +--[[ From an email by Mike Pall - +"Important: create the metatable and its metamethods once and reuse +the _same_ metatable for _every_ instance." + +This is for LuaJIT, he's the author, and concerns performance. +]] + __index = function (parent, key) -- This only works for keys that don't exist. By definition a value of nil means it doesn't exist. -- cgit v1.1