Video: https://youtu.be/YrXYRiVGork
Written version: https://cloudexplainers.com/why-python-is-slow-and-when-it-doesn-t-matter/
Everything below ran for real in the video. Run it in a throwaway machine or container, never on a computer you care about.
The machine the video used, as files you can build it from:
lab/builtin.pylab/bytecode.pylab/loop.clab/loop.pylab/numpy_sum.pylab/sizes.pylab/threads.pylab/web_request.py
# ana@laptop:~/shop$
python3 loop.py
gcc -O2 -o loop loop.c
./loop# ana@laptop:~/shop$
python3 bytecode.py# ana@laptop:~/shop$
python3 sizes.py# ana@laptop:~/shop$
python3 threads.py# ana@laptop:~/shop$
python3 builtin.py
python3 numpy_sum.py
pypy3 loop.py# ana@laptop:~/shop$
python3 web_request.pyFrom Cloud Explainers. Lab files are MIT licensed (see the repository's LICENSE).