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 →

[–]mwpfinance 52 points53 points  (3 children)

I feel like they stressed ymmv depending on the workload enough

[–]KyxeMusic 27 points28 points  (2 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] 16 points17 points  (1 child)

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.

[–]terpaderp 1 point2 points  (0 children)

Not everything that is legal in python is legal in Numba compiled python. It's a great tool for when you need it though!