Live data from Hacker News

Hope – A Python JIT for astrophysical computations

github.com

21–25 of 25 posts

Re: Hope – A Python JIT for astrophysical computations

#22
post #19
post #7

This 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.

I'm sure clicked the upvote, but your comment is gray now. :( Please, other readers, try to correct, upvoting the parent comment! It's a good comment, and it deserves to be upvoted. I can't do anything more. Thanks.

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

#23
post #5

Here'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 for some array broadcasting via vectorize and is getting more in the coming 6 months.

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

#24
post #3

Does 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++.

The performance numbers they show are fairly cherry-picked and are not really showing a broad-based comparison of Numba's capability. In addition, Numba is still under active development and the version they used is a few versions older than released. Still it's good to have use-cases and examples which drive Numba improvements.

Re: Hope – A Python JIT for astrophysical computations

#25
post #5

Here'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…

Totally agreed, I am much more excited about Numba right now. Numba has some really nice tricks up its sleeve -- I especially like the ability to easily write (g)ufuncs.

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.

Post reply on HN