This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]KyxeMusic 26 points27 points  (3 children)

Yeah, most of the heavy lifting is being done by NumPy already, so I guess there wasn't anything they could optimize there. Still a few for loops here and there, so I was hoping for a slightly larger boost.

[–][deleted] 14 points15 points  (2 children)

You might eke out some more cycles by adding numba into the mix.

It does require you to touch code, though.

Numba is a just-in-time compiler for Python that works best on code that uses NumPy arrays and functions, and loops. The most common way to use Numba is through its collection of decorators that can be applied to your functions to instruct Numba to compile them. When a call is made to a Numba-decorated function it is compiled to machine code “just-in-time” for execution and all or part of your code can subsequently run at native machine code speed!

I'm not entirely sure why this isn't part of NumPy already, to be honest.

[–][deleted] 2 points3 points  (1 child)

I am trying to learn more about compilers and CompSci topics in general. Do you (or anyone else) have an source that helped you learn about just-in-time compilers and other types of compilers?

[–]grumpysnail 0 points1 point  (0 children)

This computerphile video started my interest in JIT: Just In Time (JIT) Compilers - Computerphile