4 ms·
Off topic nitpick: I wish Python stopped being added to these kinds of performance lists. Python isn't a poor tool for those kinds of problems, it's the wrong t
by Waterluvian 7y ago
Off topic nitpick: I wish Python stopped being added to these kinds of performance lists. Python isn't a poor tool for those kinds of problems, it's the wrong tool. And I don't mean, "oops you locked yourself into the wrong language." I mean that valid Python is Python that calls into a language like C or Rust when there's performance needs. Numpy and Scipy are, I'm going to bet, mostly C.
Imagine I did a comparison of the fastest way to cut a board lengthwise. And my comparison was using a table saw, a jigsaw, a circular saw, and a planer. Actually, that sounds dumb enough that I kind of want to do that. All the worst ways to rip a board.
- cyphar 7y agoMicroPython is a wholesale rewrite of Python to be suitable for microcontrollers. I imagine this is the reason it was included in a comparison for languages to be used for an SoC. From memory, the ESA (European Space Agency) uses it for some of their projects.
- tylerhou 7y ago> Numpy and Scipy are, I'm going to bet, mostly C. You'd be surprised; About 25% of SciPy (much of the numerical computing portions) are in FORTRAN. It turns out that decades of compiler/numerical computing research has made the FORTRAN compiler generate numerical code which runs faster than GCC/Clang today. https://github.com/scipy/scipy https://github.com/scipy/scipy
- cyphar 7y agoMost people use the GCC Fortran front-end. I think the main reason you get speed from Fortran is because it provides more hints to the compiler, but also because generations of PhD students have been optimising compilers for Fortran-specific performance gains.
- pjmlp 7y agoPeople that care about Fortran performance use Intel, PGI, IBM compilers.
- Waterluvian 7y agoWow. That's a really cool thing to see. Thanks for sharing. So Python bindings around Fortran. Cool.
- deleted 7y ago[deleted]