4 ms·
Off hand, this reminds me a lot of the Lua "generic for loop" logic: https://www.lua.org/manual/5.4/manual.html#3.3.5 https://www.lua.org/manual/5.4/manual.htm
by binary132 3y ago
Off hand, this reminds me a lot of the Lua "generic for loop" logic:
https://www.lua.org/manual/5.4/manual.html#3.3.5 https://www.lua.org/manual/5.4/manual.html#3.3.5
I always found it weird to use, but it is a pretty simple API for implementing generic iterators.
- uticus 3y agoSpeaking of Lua, it reminds me of LuaJIT and Mike Pall with his hot loops coded in assembly. There are places where performance increases weigh more, iteration is definitely a candidate.