Code:
local _G = _G
function test()
local start = time()
for x = 1, 200000000 do
local a = _G["TargetFrame"]
end
print(time() - start)
end
Result: 8
Code:
function test()
local start = time()
for x = 1, 200000000 do
local a = _G["TargetFrame"]
end
print(time() - start)
end
Result: 10
But can't say why.
[edit]
Keep in mind that are 200,000,000 loops. In words: two hundred million. The difference is ~2 secs. 0.00000001 secs per access.
Guess it's save to ignore that in most cases.