Tools for Accelerating Python


/ Published in: Python
Save to your folder(s)



Copy this code and paste it in your HTML
  1. If you need to speed up your Python program there are several possible approaches, with varying degree of effort needed, here is (probably not complete) overview:
  2.  
  3. 1. Rewrite your Python code by parallelizing or optimizing/replacing/tuning algorithm(s), e.g. using:
  4. * Hadoop or Disco
  5. o Open source implementations of MapReduce
  6. * Parallel Python
  7. * Message Passing Interface (MPI)
  8. o Frequently used for numerical programming
  9. * Bulk Synchronous Parallel (BSP)
  10. * RPyC
  11. o RPC for Distributed/Parallel Programming
  12. * Twisted
  13. o Network libraries for Distributed/Parallel Programming
  14. * Profiling Tools
  15. * Threading or Microthreads (Stackless)
  16. 2. Use a tool that can speed up your code more or less unchanged
  17. * Psyco
  18. o Just in time compiler, note: this is probably the easiest approach to try
  19. * Pyrex
  20. o Write and compile Python with a flavor of C data structures
  21. * Cython
  22. * PyJs
  23. o Compile (large subset of) Python to Javascript, note: probably more interesting for client development (ajax) than server side.
  24. * Rpython
  25. o Compile (large subset of) Python to native code, note: part of PyPy project
  26. * PyStream
  27. * GPULib
  28. * Shedskin
  29. o Compile (large subset of) Python to C++, some benchmarks
  30. 3. Replace (parts of) your Python code with another language
  31. * Simplified Wrapper and Interface Generator (SWIG)
  32. o Use C/C++ from Python
  33. * Fortran to Python Interface Generator (F2PY)
  34. o Use Fortran from Python
  35. * llvm-py
  36. o Code and Compile to Assembler for running on Low-Level Virtual Machine
  37. * CorePy
  38. o Write Assembly Code in Python
  39. * Weave
  40. * PyInline
  41. * Boost.Python
  42. * Cinpy
  43. o C code blended with Python (using ctypes) and runtime compilation with tcc

URL: http://amundblog.blogspot.com/2008/11/tools-for-accelerating-python.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.