Live data from Hacker News

Hope – A Python JIT for astrophysical computations

github.com

1–10 of 25 posts

Re: Hope – A Python JIT for astrophysical computations

#4
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++.

Full results are in the paper: http://arxiv.org/pdf/1410.4345v1.pdf

Re: Hope – A Python JIT for astrophysical computations

#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).

Re: Hope – A Python JIT for astrophysical computations

#6
post #2

Assuming this is Python 2.x (doesn't seem to be specified in the benchmark results), then the use of "range" is problematic (should be "xrange").

Not really. "range" returns a list, "xrange" returns an iterator. I assume that the list is much easier to reason about in a JIT. In python3, range is a type of its own and certainly more useful for in a JIT.

https://docs.python.org/3/library/stdtypes.html#typesseq-ran...

https://docs.python.org/2/library/functions.html#range

Re: Hope – A Python JIT for astrophysical computations

#8
post #2

Assuming this is Python 2.x (doesn't seem to be specified in the benchmark results), then the use of "range" is problematic (should be "xrange").

Based on the description in the docs (http://pythonhosted.org/hope/lang.html#loops), my guess is that "for i in range(N)" is directly translated into something like "for (i = 0; i < N; i++)" in the C++.

Re: Hope – A Python JIT for astrophysical computations

#9
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).

Thanks, exactly what I was looking for.
Post reply on HN