Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

LUA is FFOC

Name: Anonymous 2011-02-05 9:01

LUA is the toy language for those who enjoy the Forced Flushing Of L1/L2 Cache per operation. In fact, every operation causes several L2 cache misses during table look-ups, flushing both the L1 and L2 caches.

http://www.slideshare.net/hughreynolds/optimizing-lua-for-consoles-allen-murphy-microsoft

Enjoy your FFOC.

Name: Anonymous 2011-09-25 11:51

>>162
This can be solved by using a different value than nil to represent nil, although this is very inconvenient. If Lua didn't have this problem with ..., the hack wouldn't be necessary.

local function apairs (...)
    local n = select("#", ...)
    return function (t, i)
        if i < n then return i + 1, t[i + 1] end
    end, { ... }, 0
end

for i, v in apairs(10, 20, nil, nil, 50, nil) do
    print(i, v)
end

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List