Upgrade to Pro — share decks privately, control downloads, hide ads and more …

High Performance Python (Hacker News London Oct 2013)

ianozsvald
October 24, 2013

High Performance Python (Hacker News London Oct 2013)

Short talk on ways to profile the speed and memory usage of a CPU-bound function in Python, then a short demo with Cython and Numba on ways to speed it up.

ianozsvald

October 24, 2013
Tweet

More Decks by ianozsvald

Other Decks in Technology

Transcript

  1. www.morconsulting.c High Performance Python – find your bottleneck and go

    much faster HackerNewsLondon Oct 2013 Ian Ozsvald @IanOzsvald MorConsulting.com
  2. [email protected] @IanOzsvald Hacker News London October 2013 “High Performance Python”

    • Publishing mid 2014 • Please join the mailing list via IanOzsvald.com
  3. [email protected] @IanOzsvald Hacker News London October 2013 About Ian Ozsvald

    • “Exploiter of Data” in MorConsulting.com • Teach: PyCon, EuroSciPy, EuroPython • SocialTies.com (an “exploiter of tweets”) • ShowMeDo.com • IanOzsvald.com
  4. [email protected] @IanOzsvald Hacker News London October 2013 I teach High

    Performance... • because it is embarrassingly easy to collect lots of data • turning data->actionable information is hard • Is there interest in a data science talk?
  5. [email protected] @IanOzsvald Hacker News London October 2013 Cython results Straight

    CPython (in VM): 8.9s Cython1: 5.5s (uses Python lists) Cython3: 3s (uses numpy arrays) Cython4: 0.15s (expanded math) 66* speed­up
  6. [email protected] @IanOzsvald Hacker News London October 2013 Numba results Straight

    CPython (in VM): 8.9s Numba: 1.4s (using numpy arrays – faster than Cython3 at 3s) Numba2: 0.45s (expanded math) 22* speed­up (vs 66* for Cython)
  7. [email protected] @IanOzsvald Hacker News London October 2013 Missed out... •

    Ignored PyPy, ShedSkin, Parakeet... • Didn't look at parallelisation • Didn't look at other memory profilers • This will go into the book and maybe training in London
  8. [email protected] @IanOzsvald Hacker News London October 2013 Thank you! •

    Contract around HPC? • Want to interview more CTOs • Join book mailing list (on ianozsvald.com) • [email protected] • @IanOzsvald • MorConsulting.com • GitHub/IanOzsvald