by montebicyclelo · 4y ago · 0 comments
From looking at the code snippets, a big issue with this study becomes clear - it doesn't reflect how languages like Python are used in practice.
In practice, the "hot loops" of Python are in c/c++/fortran/cython/numba/... i.e. Python code usually makes use of a vast ecosystem of optimized science/maths/data science libraries. Whereas the study code is mainly using pure Python.
It's an issue with the methodology that the programs are written specifically for this study; creating an artificial situation.
This is a vast overgeneralization. You'll find these optimized loops in optimized packages, done by engineers with enough experience. In practice, there is a lot of slow running code. And that includes "optimized" code that runs on numpy or similar but simply doesn't lend itself very well to being optimized in that way.
Python is convenient for short scripts, but very slow to execute.
Additionally, going through the FFI from C++ to Python and back to C++ has a cost. Eliminating this overhead was one of the motivations behind Julia.
How would this be comparing apples to apples? The paper’s main objective is to compare programming languages in their own native calls. It is like properly translating the Bible or Shakespeare to other languages: some translations will be more textual than others, loosing all the nuances, specially if compared to the original transcript.
If you have python glue calls to other processes written in other languages, then you would be creating noisy in results. It is not the purpose of the paper at all, and it is outside of its scope.
If you use python as glue, it should be compared to other languages used as glue.
Not correct — the programs were taken from the benchmarks game.