The numerical python ecosystem is definitely improving, but it's getting pretty complicated, particularly when heterogeneous architectures factor into your work flow.
Hope – A Python JIT for astrophysical computations
21–25 of 25 posts
Re: Hope – A Python JIT for astrophysical computations
#22This is crazy! It actually generates C++ code on the fly by translating AST nodes one to one https://github.com/cosmo-ethz/hope/blob/master/hope/_generat...
It's basically the same strategy rperl uses, compiling a restricted and typed subset of perl5 to C++11 on the fly, via Inline::CPP http://rperl.org 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?
Re: Hope – A Python JIT for astrophysical computations
#23Here's the doc page that lists the supported language features: http://pythonhosted.org/hope/lang.html 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
Re: Hope – A Python JIT for astrophysical computations
#24Does anybody know how this compares performance-wise to Numba ( http://numba.pydata.org/ ) which seems like a pretty similar effort? Numba translates to LLVM bytecode rather than C++.
Re: Hope – A Python JIT for astrophysical computations
#25Here's the doc page that lists the supported language features: http://pythonhosted.org/hope/lang.html 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).
Interesting post. It seems that everyone wants to write their own jit rather than cooperate with the on-going open source efforts. 1) Support for recursion is in a PR for Numba that has just not yet been merged. 2) optional simplification of expressions using SymPy has been contemplated and is easy to add, though it's not clear if it's the interface people will want as it slows down compilation. 3) Numba has support…
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.