LuaJIT
#12
local MyClass = {}

function MyClass:new()
	local Obj = {}
	setmetatable(Obj, self)
	self.__index = self
	
	Obj.TestVar = math.random(50)
	
	return Obj
end

function MyClass:Test()
	local R = self.TestVar + 50
end

local startTime = os.clock()
local Constr = MyClass:new()
local test = Constr.Test
for I = 1, 1000000000 do
	test(Constr)
end
print(os.clock() - startTime);
Reply
Thanks given by:


Messages In This Thread
LuaJIT - by worktycho - 03-24-2014, 03:12 AM
RE: LuaJIT - by worktycho - 03-24-2014, 04:14 AM
RE: LuaJIT - by xoft - 03-24-2014, 05:11 AM
RE: LuaJIT - by worktycho - 03-24-2014, 07:37 AM
RE: LuaJIT - by NiLSPACE - 03-30-2014, 07:28 AM
RE: LuaJIT - by xoft - 03-30-2014, 09:58 AM
RE: LuaJIT - by bearbin - 03-31-2014, 12:31 AM
RE: LuaJIT - by worktycho - 03-31-2014, 02:15 AM
RE: LuaJIT - by NiLSPACE - 12-26-2015, 09:56 PM
RE: LuaJIT - by LogicParrot - 12-26-2015, 11:02 PM
RE: LuaJIT - by NiLSPACE - 12-26-2015, 11:11 PM
RE: LuaJIT - by LogicParrot - 12-26-2015, 11:19 PM
RE: LuaJIT - by NiLSPACE - 12-26-2015, 11:23 PM
RE: LuaJIT - by LogicParrot - 12-26-2015, 11:24 PM
RE: LuaJIT - by LogicParrot - 12-26-2015, 11:38 PM
RE: LuaJIT - by NiLSPACE - 12-26-2015, 11:57 PM
RE: LuaJIT - by NiLSPACE - 12-27-2015, 11:40 PM
RE: LuaJIT - by NiLSPACE - 12-28-2015, 04:05 AM
RE: LuaJIT - by worktycho - 12-28-2015, 08:47 AM
RE: LuaJIT - by LogicParrot - 12-28-2015, 09:23 AM
RE: LuaJIT - by worktycho - 12-28-2015, 09:25 AM



Users browsing this thread: 11 Guest(s)