Am 10.02.2018 um 19:19 schrieb Artur Tarassow:
Thank you all for your replies. It's amazing to see what JIT can
actually do.
To follow up on this, I'm attaching a hansl function (plus a test case)
that internally uses (via a foreign block) a Python+Numba installation
to do the JITting, and which works for me here. BTW, to have Python's
syntax coloring in the foreign block is just great!
I think some hybrid computing like this is the way to go if in real life
you have some loop-heavy function that is slow and which can't be
accelerated by vectorization of better use of built-in functions. To put
together the necessary few lines of Python code is usually doable I'd say.
Of course there's a noticeable overhead here because some temporary
files are read and written, and you have the python startup plus the
just-in-time compilation. All this is less than 1sec and for practical
purposes this is really negligible compared to the speedup, if you don't
need to call the function too often.
I'd be interested in an analogous solution for Julia in a foreign block!
cheers,
sven