News for hackers. Stuff that matters.
Re:How fast are Linux pipes anyway? by VWWHFSfQ on Thursday June 02, 2022 @09:25AM (#31594567)
Lua is an interesting one.

    while true do
      io.write "1"
    end
PUC-Rio 5.1: 25 MiB/s

PUC-Rio 5.4: 25 MiB/s

LuaJIT 2.1.0-beta3: 550 MiB/s <--- WOW

They all go slightly faster if you localize the reference to `io.write`

    local write = io.write
    while true do
      write "1"
    end
Re:How fast are Linux pipes anyway? by yakubin on Thursday June 02, 2022 @10:35AM (#31595408)
> They all go slightly faster if you localize the reference to `io.write`

No noticeable difference for LuaJIT, which makes sense, since JIT should figure it out without help.

Re:How fast are Linux pipes anyway? by bjoli on Thursday June 02, 2022 @02:44PM (#31598944)
And this, folks, is why you have immutable modules. If you know before runtime what something is, lookup is a lot faster.
Re:How fast are Linux pipes anyway? by VWWHFSfQ on Thursday June 02, 2022 @11:01AM (#31595739)
Ah yes you're right. Basically no difference with LuaJIT.

5.1 and 5.4 show about ~8% improvement.