[dev] startup time of some interpreters

From: Greg Reagle <greg.reagle_AT_umbc.edu>
Date: Thu, 20 Feb 2020 12:22:53 -0500

Hello. I am amazed at how fast Lua is to start up and shut down. Is my benchmark defective in any way? Lua seems to start up and exit faster than bash, python, rc, and ksh. Dash and mksh are faster. These interpreters are all packages from Debian Stable 10 "Buster".

/usr/bin/time sh -c 'for i in $(seq 1 200); do dash -c "echo \"hello\""; done' > /dev/null
0.12user 0.04system 0:00.17elapsed 97%CPU (0avgtext+0avgdata 1728maxresident)k
0inputs+0outputs (0major+16728minor)pagefaults 0swaps

/usr/bin/time sh -c 'for i in $(seq 1 200); do mksh -c "echo \"hello\""; done' >
/dev/null
0.16user 0.05system 0:00.23elapsed 96%CPU (0avgtext+0avgdata 1904maxresident)k
0inputs+0outputs (0major+18472minor)pagefaults 0swaps

/usr/bin/time sh -c 'for i in $(seq 1 200); do lua -e "print \"hello\""; done' >
/dev/null
0.22user 0.07system 0:00.31elapsed 97%CPU (0avgtext+0avgdata 2496maxresident)k
0inputs+0outputs (0major+25334minor)pagefaults 0swaps

/usr/bin/time sh -c 'for i in $(seq 1 200); do bash -c "echo \"hello\""; done' > /dev/null
0.26user 0.09system 0:00.36elapsed 96%CPU (0avgtext+0avgdata 3240maxresident)k
0inputs+0outputs (0major+30253minor)pagefaults 0swaps

/usr/bin/time sh -c 'for i in $(seq 1 200); do ksh -c "echo \"hello\""; done' > /dev/null
0.28user 0.14system 0:00.44elapsed 95%CPU (0avgtext+0avgdata 3888maxresident)k
0inputs+0outputs (0major+37146minor)pagefaults 0swaps

/usr/bin/time sh -c 'for i in $(seq 1 200); do /usr/lib/plan9/bin/rc -c "echo \"hello\""; done' > /dev/null
0.43user 0.14system 0:00.60elapsed 96%CPU (0avgtext+0avgdata 2008maxresident)k
0inputs+0outputs (0major+43700minor)pagefaults 0swaps

/usr/bin/time sh -c 'for i in $(seq 1 200); do python -c "print \"hello\""; done' > /dev/null
2.32user 0.88system 0:03.32elapsed 96%CPU (0avgtext+0avgdata 7220maxresident)k
0inputs+0outputs (0major+174760minor)pagefaults 0swaps
Received on Thu Feb 20 2020 - 18:22:53 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 20 2020 - 18:24:09 CET