Better HN
topnewbestaskshowjobs
Log inSign up

asifgdinio

0 karma · joined Jul 11, 2020 (6y ago) · 1 submissions

Submissions

comment 6y ago · link · parent

>If we just run /bin/true, we can do 500 of them in a second, so it looks like running any program has about 1ms of overhead.

This is off by at least three orders of magnitude, at least on my machine.

    $ time for i in $(seq 1000000); do true; done

    real 0m1.049s
    user 0m1.037s
    sys  0m0.019s
This article would be better if it were about computers in general, not about Python. I specifically avoid using Python for anything serious because I find its performance impossible to reason about. Then again, perhaps it's a good thing to have examples that require thinking rather than just reciting the machine's specs like most of these lists I've seen.