That's impressive! But 1 million times of variable assignment took only 140 ms? It's that one assignment took only 140 nanosecond, which is near one DRAM access? Can PL/pgSQL processing be really so fast?
In this case the PLpgSQL can be very fast - and after changes in pg 13, the PLpgSQL is not significantly slower than Lua or than PHP.
Every body can repeat these tests - I did it on my Lenovo T520 notebook