3 ms·
This is missing one large avenue of speedup: the startup time, which is bad with Python. Some of my Lua scripts are done faster than Python starts up, even when
by aasasd 5y ago
This is missing one large avenue of speedup: the startup time, which is bad with Python. Some of my Lua scripts are done faster than Python starts up, even when doing file i/o. This is especially crucial for interactive ‘productivity’ helper scripts, which need to respond instantly.
As an anecdote, when I was making my first Lua script for Alfred on a horribly underpowered machine, I briefly couldn't figure out if I actually configured the script properly, because the dummy example output indeed appeared right as I typed the last input key. Turns out, Lua really runs that fast.
Alas, the lack of proper ‘null’ bugs me—it may interfere with making middleware for external APIs, receiving and transmitting schema-less data. A bunch of libraries use cjson.null or interoperable lua-null or somesuch, but I'm sure I'll bump into a lib that won't know about those.
Ah, and by the way, from what I vaguely heard, actual native multithreading might be doable in Lua with libraries. At least I've seen a couple of such libs, but haven't tried them.
- BiteCode_dev 5y agoYes, I'm hoping the latest MS effort on speeding up Python will also tackles that. The JIT effort is great, but projects like mercurial had to hack lazy import because they are so slow in python. I wish this can be baked in the language some day: loading half the stdlib to run hello world is not very efficient.