top | item 24513125

(no title)

pfheatwole | 5 years ago

I'm not sure if Numba is in the spirit of your question, but it does make it easy to write ufuncs without explicitly dropping into C.

https://numba.pydata.org/numba-doc/latest/user/vectorize.htm...

discuss

order

andreareina|5 years ago

Looks promising, except I'm having a devil of a time getting it installed :/

guram11|5 years ago

try Anaconda if you can

jojo2000|5 years ago

numba is a true horror to use, because supported subset of python language is an ever-moving target and overall small. cython is good but needs time to meddle with. For loop-intensive, simple function I'd advise FFI.

qfwfq_|5 years ago

I disagree that it's a "true horror to use." The set of supported built-in classes grows significantly by the day. It's not as good when used for wholly unstructured streams of data (e.g. tuples of mixed type, dicts with complex objects inside of them), but if you can spend the design time to arange things in a structured manner, it's super easy to use, and can seriously boost performance on simple algos.

I've had a ton of success using it in statistical and computational geometry applications.

datanecdote|5 years ago

FWIW I agree with you. I’ve always found cython easier than Numba. And more performant.

I think Numba has a lot of potential and will improve as they fill out remaining language coverage and finalize the API. The idea of a LLVM JIT compiler for python makes a ton of sense.