Psyco Explained

Psyco
Developer:Armin Rigo, Christian Tismer
Discontinued:yes
Latest Release Version:1.6
Programming Language:C, Python
Platform:32-bit x86 only
Operating System:Cross-platform
Genre:Just-in-time compiler
License:MIT License

Psyco is an unmaintained specializing just-in-time compiler for pre-2.7 Python originally developed by Armin Rigo and further maintained and developed by Christian Tismer. Development ceased in December, 2011.[1]

Psyco ran on BSD-derived operating systems, Linux, Mac OS X and Microsoft Windows using 32-bit Intel-compatible processors. Psyco was written in C and generated only 32-bit x86-based code.

Although Tismer announced on 17 July 2009 that work was being done on a second version of Psyco,[2] a further announcement declared the project "unmaintained and dead" on 12 March 2012 and pointed visitors to PyPy instead.[3] Unlike Psyco, PyPy incorporates an interpreter and a compiler that can generate C, improving its cross-platform compatibility over Psyco.

Speed enhancement

Psyco can noticeably speed up CPU-bound applications. The actual performance depends greatly on the application and varies from a slight slowdown to a 100x speedup.[4] [5] [6] [7] The average speed improvement is typically in the 1.5-4x range, making Python performance close to languages such as Smalltalk and Scheme, but still slower than compiled languages such as Fortran, C or some other JIT languages like C# and Java.[8]

Psyco also advertises its ease of use: the simplest Psyco optimization involves adding only two lines to the top of a script:[9]

import psycopsyco.full

These commands will import the psyco module, and have Psyco optimize the entire script. This approach is best suited to shorter scripts, but demonstrates the minimal amount of work needed to begin applying Psyco optimizations to an existing program.

See also

External links

Notes and References

  1. Web site: psyco / Commits . Bitbucket . Armin Rigo.
  2. Web site: Tismer . Christian . [pypy-dev] ANN: psyco V2 ]. pypy-dev mailing list . 17 July 2009.
  3. Web site: Psyco Homepage.
  4. Web site: Python Psyco benchmarks . 2008-04-24 . dead . https://web.archive.org/web/20080606020118/http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=psyco . 2008-06-06 .
  5. Web site: Python Psyco Homepage at sourceforge . 2009-03-04 .
  6. Web site: A beginners guide to using Python for performance computing at scipy.org . 2009-03-04 . dead . https://web.archive.org/web/20090311070246/http://www.scipy.org/PerformancePython . 2009-03-11 .
  7. Web site: Charming Python: Make Python run as fast as C with Psyco. IBM. 2009-03-04 .
  8. Web site: Boxplot Summary . 2009-10-16 . dead . https://web.archive.org/web/20110603231929/http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all&d=data&gcc=on&gpp=on&java=on&csharp=on&psyco=on&mzscheme=on&vw=on&python=on&calc=calculate&box=1 . 2011-06-03 .
  9. Web site: Rigo. Armin. Quick examples. The Ultimate Psyco Guide. 3 June 2011.