Numba

http://numba.continuim.io
Numba is dead simple to get the full close to c/c++ performance improvements from dynamic compilation and works great after you have the prerequisites installed.

Numba required python packages:
argparse
numpy
llvm

Now you can import numba and use numba.autojit as a decorator or function wrapper and get the benefits of dynamic compilation without any head scratching.

I tried an example using an old version of numba and a numpy array parameter that was at the center of the calculation and it produced an over 30 times speed up. The fasted speed up for numba is supposed to be when it is compiling code that uses numpy arrays or when it can figure out how to substitute numpy arrays in. Numba should still compile the rest of the code as well giving it c/c++ like performance too.

If numba can improve the performance of my existing code by a factor of 2 to 10 times where there is no chance for a numpy speed up it will still be a significant performance boost. Jobs that take 10 minutes could go down to 5 to 1 minutes and 1 minute jobs down to 30 to 6 seconds. Maybe there is some hope for my using Python as a way to solve some of the more computationally intensive http://projecteuler.net problems without throwing cloud computing at the problems.

Advertisements

About freegnu

freegnu and other stuff too
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s