Compared to numba, it looks like hope adds: (1) support for recursion, (2) automatic simplification of expressions using SymPy and (3) support for arithmetic with array broadcasting (e.g., as used in their Point Spread Function benchmark).
A C++ target for Numba would also be of interest if anyone wants to participate in the development. Numba 0.15.1 was just released this week: https://github.com/numba/numba/tree/0.15.1 http://numba.pydata.org
conda install numba
There are a lot of edge cases to nail down for these JIT compilers. Everyone writing their own is likely to end up with none of them being useful for end users.
I wouldn't call that JIT, because the term JIT is normally used for direct compilation to machine code, and all those other compile-to-c|c++-on-the-fly languages don't call it JIT neither.
Edit: I've found the culprit: believe or not, the older Opera browser can have the "down" linked area in the middle of the up arrow! On the same hight (same Y) just changing the X position of the mouse will change between the UP and DOWN vote! The down vote area extends from the down arrow up to the top of the up arrow(!) and is of the same width (a few pixels at most). Weird. I must avoid that browser for HN.
http://s4.postimg.org/nyec1bmvh/badlink.jpg
Anybody knows how this is possible?
https://docs.python.org/3/library/stdtypes.html#typesseq-ran...
As I said, this is assuming we're on Python 2.x.
It is indeed possible to do these inlining in C++ using its template machinery but it seems Hope does not to this yet. I am really curious about what Hope does and what plans do they have for the future. Inlining does give huge speedup for this application, more so if one is performing multidimensional numeric integration.
Another thing that I was curious about was how does Hope optimize away the dynamic semantics of Python. If one where to isolate one aspect of Python that makes it ridiculously hard to speed it up, it is its dynamic nature. It seems that Hope removes the dynamic aspect by analyzing the AST of the Python code. Since Python was never intended to be type inferred, it surely poses a substantial obstacle. I wonder whether Hope devs intend to add the Cython functionality of selectively removing dynamic nature of specific functions via annotations. Given the difficulty of automatic static typing of a piece of Python code, any little help afforded to the compiler should go a long way.
The other thing that I am really curious about is what does Hope do about Numpy vector expressions. Cython for example calls back into Numpy, so there is not much speed benefit to be had. In fact if this is being done in a loop, this hurts performance because of the overhead of the call. So if one really wants performance one needs to write the low level indexing code in the Cython syntax. I think it is a matter of personal taste, but if I were to write low-level C,C++; I would rather write it in C,C++ itself. The latter has the additional benefit of mature toolchains that target C, C++.
Finally, a number of tools aimed at similar use cases have been mentioned in the post and in the comments. I will add a shout out for copperhead. It isolates a subset of Python over which one can define a ML like semantics which is then used to aid compilation and parallelization, all hiding behind the familiar python syntax.
I wonder whether Hope devs intend to add the Cython functionality of selectively removing dynamic nature of specific functions via annotations.
You should definitely look at Julia.
The numerical python ecosystem is definitely improving, but it's getting pretty complicated, particularly when heterogeneous architectures factor into your work flow.