← Back to context

Comment by kstrauser

21 hours ago

> All these "Performance friendly" python dialects (Tryton, Pythran, CuTile, Numba, Pycell, cuPy, ...) appears like Python but are nothing like Python as soon as you scratch the surface.

Which is the whole point. Python has properties that make it bad for massive, fast number twiddling. However, it’s exceptionally nice for doing all the command line parsing and file loading and setup and other wrapping tasks required to run those pipelines.

Fortran’s fantastic at math stuff. I’d sure hate to have to write all the related non-math stuff in it.

And yes, Python’s slower than other languages. But in production, most Python code spends a huge chunk of its time waiting for other code to execute. It takes more CPU for Python to parse an HTTP request or load data files than an AOT language would take, but it’s as efficient sitting there twiddling its thumbs waiting for a DB query or numeric library to finish.

I wouldn't call it "exceptionally nice". Decentish if you use uv & strict Pyright... sure.

> most Python code spends a huge chunk of its time waiting for other code to execute.

Highly dependent on what you are doing. That hasn't been my experience most of the time.

  • > I wouldn't call it "exceptionally nice"

    I guess depends on your reference point :-) I recall in the beginning, python offering an easier/more readable alternative to Perl, which itself was a step up from awk/sed/sh script (for the tasks/uses GP mentions)