4 ms·
It is unfortunate that the authors of this paper didn't reach out to experts in each programming language in order to write high-quality code against which they
by bradfordarner 12y ago
It is unfortunate that the authors of this paper didn't reach out to experts in each programming language in order to write high-quality code against which they could have run the analysis. This seems like the perfect use-case for open-source: academic study, subject-matter experts in one area who are stepping outside their areas of expertise and an interesting subject matter.
They should have crowd-sourced the code for this study with a Top Coder-like contest.
- ViralBShah 12y agoI don't know about other languages, but the authors did reach out to us to sort out performance issues with the Julia code.
- bradfordarner 12y agoThat is very good to know. That reassures me a little. I was really impressed with the speed difference they noted between Python and R and the fact that Numba wasn't too much slower than C++ implementations. However, given the state of the R code I became wary of accepting the benchmarks at face value. I haven't made the jump from R to Python for statistical applications yet. So, this article gave me something to think about. In terms of programmer happiness, I'm willing to live with a little slower performance in Python and not have to spend hours in C++.
- Fede_V 12y agoI've used Numba to speed up some tight numerical computations written on NumPy arrays and it's incredibly good - about as fast as rewriting it from scratch in Cython, but much, much faster. The flipside is that it only really results in a speed up for pure numerical code - if you have to use any Python objects, then you lose everything.
- k2enemy 12y agoFrom the paper... Second, to make the comparison as unbiased as possible, we coded the same algorithm in each language without adapting it to the peculiarities of each language (which could reflect more about our knowledge of each language than of its objective virtues). They have invited others to fork the code on github and write the fastest possible for each language.
- bradfordarner 12y agoThank you for the note. I hadn't visited the github yet. I will be interested to see whether people can whittle down the respective benchmarks.
- Alupis 12y ago^^ This is not "unbiased"... in their attempt to make it unbiased, they introduced a huge amount of bias. They wrote the code for each language based on prior knowledge about each language, and/or from likely googling how-to's... far from performant code with any language. A mild understanding of each language could yield dramatic performance improvements over not understanding it at all.
- igouy 12y agoThis is not "as unbiased as possible" -- it is biased towards the initial form of algorithm description. To make the comparison "as unbiased as possible" would be to code the same algorithm but adapt it to the peculiarities of each language implementation.
- chuto 12y agoIt is also unfortunate that several of the language developers and related dev communities have come out against compilers (python and jython in particular). This is the (religious) downside to open source fundamentalism.
- nine_k 12y agoPyPy is a counterexample: it's a JIT compiler for Python, pretty efficient. Compiling dynamic languages is not easy: their semantics of having everything dynamic and changeable at runtime resists it. Python is internally compiled into a pretty compact bytecode, but something like a method call is much more involved business in Python than even in C++, and is many times slower. WRT fundamentalism: most sane open source communities are pretty pragmatic; Python's in particular.
- rwallace 12y agoThat would answer the interesting question 'which language gives the fastest programs in the hands of someone who is an expert in that language?' In fairness to the authors, though, it seems to me they were asking the equally interesting and rather different question 'which language gives the fastest programs in the hands of someone who is an expert in something other than programming?'