4 ms·
> PyPy, which (being a JIT) has relatively slow startup > time pypy -c 'print "Hello World"' Hello World pypy -c 'print "Hello World"' 0.08s user
by patrec 9y ago
> PyPy, which (being a JIT) has relatively slow startup
> time pypy -c 'print "Hello World"'
Hello World
pypy -c 'print "Hello World"' 0.08s user 0.04s system 96%
cpu 0.120 total
> time luajit -e 'io.write("Hello World!\n")'
Hello World!
luajit -e 'io.write("Hello World!\n")' 0.00s user 0.00s
system 0% cpu 0.002 total
- JackCh 9y agoSometimes I wonder why we're not all using Lua instead of Python. Lua seems to get a strange amount of hate in some circles, but I've found both Lua and Python to be reasonably pleasant languages to work with.
- zeugmasyllepsis 9y agoI had a similar feeling a while back, but when I actually picked up Lua for a project I was shocked by how limited the standard library is. Third party libraries aside (which Python clearly has in spades), even just the standard library is pretty sparse. It makes sense, since Lua is at least partly motivated by being lean and embeddable, but it puts Lua in a completely different space for me.
- make3 9y agono batteries
- civility 9y agoOther folks complain about the lack of libraries. Personally, the two things which turn me off on Lua (luajit) are 1-based arrays and the conflation of hash-tables and array-lists into a single thing.
- enriquto 9y ago> the conflation of hash-tables and array-lists into a single thing. Precisely, one of the things that turns me off on Python (coming from Lua), is the unnatural proliferation of different container types.
- civility 9y agoTo each their own :-) You might like Tcl - associative arrays (hash tables), arrays (lists), strings, numbers, and code are all the one type (at least conceptually).
- rrcaptain 9y agoOddly that's one of the things I like most about python. The containers module has so many very useful things. Plus hash-tables and array-lists shouldn't ever really be the same thing.
- hiccuphippo 9y agoI don't like how everybody invents their own class system.
- lifthrasiir 9y agoFrom my personal account about Lua [1]: > Three, the language is not a mere combination of syntax and semantics. Any evaluation should also account for user bases and ecosystem, and in my very humble opinion Lua spectacularly fails at both. I'm not going to assume the alternative reality---Lua has a sizable user base and its ecosystem is worse even for that user base. > [...] The lack of quality library also means that you are even more risky when you are writing a small program (because you have less incentive to write it yourself). I have experienced multiple times that even the existing libraries (including the standard ones) had crucial flaws and no one seems to be bothered to fix that. Also in the embedded setting the use of snippets, rather than proper libraries, are more common as libraries can be harder to integrate, and unfortunately we are left with PHP-esque lua-users.org for Lua... I think this critique still holds today, and unless miracle happens (like D), I doubt this is fixable. [1] https://news.ycombinator.com/item?id=13902023 https://news.ycombinator.com/item?id=13902023
- geofft 9y agoIs ... that faster than CPython? Wow. Maybe I should symlink /usr/bin/python -> pypy on my laptop....
- chc 9y agoIt's not. You can test it on your system. In every case I've seen, Python starts up faster than PyPy. Neither takes a super long time. PyPy has some great performance characteristics, but startup time isn't one of them.
- masklinn 9y agoIt's much slower. On my machine, "$PYTHON -c ''" (execute nothing) takes 60ms on Python 2.7, 80ms on 3.6 and 250ms on pypy.
- firethief 9y agoStartup << warmup.