A quick introduction to psyco: The Python Compiler - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

A quick introduction to psyco: The Python Compiler

Description:

Can tell psyco to compile individual functions. E.g. SpeedPack ... Editors / IDEs. Debugging tools. Plone/Zope products. Pure python products ... – PowerPoint PPT presentation

Number of Views:118
Avg rating:3.0/5.0
Slides: 8
Provided by: geoffre90
Category:

less

Transcript and Presenter's Notes

Title: A quick introduction to psyco: The Python Compiler


1
A quick introduction topsyco The Python
Compiler
  • Geoff Davis
  • Triangle ZPUG
  • December 6

2
What is psyco?
  • Open source python compiler
  • http//psyco.sourceforge.net
  • Very easy to use
  • Only works on 32-bit x86 processors
  • (or 64 bit in 32-bit compatibility mode)

3
How to use psyco
  • Quick overview
  • import psyco
  • psyco.full()
  • Thats it!
  • psyco then takes over
  • DEMO

4
Play nice with Macs
  • If distributing code for mixed platforms, put
    code in a try block
  • try
  • import psyco
  • psyco.full()
  • except
  • pass

5
Use psyco selectively
  • psyco tries to compile everything
  • Not always useful
  • Compilation overhead
  • Uses lots of memory
  • Disables pdb
  • Can use psyco more selectively

6
Precision psyco
  • Can tell psyco to compile individual functions
  • E.g. SpeedPack
  • Profiled everything in CMF, then compiled slowest
    methods with psyco
  • Can have both compiled and uncompiled versions
  • fastfunction psyco.proxy(slowfunction)
  • DEMO

7
Plug for 10 minute talks
  • Easy to put together! Took me 1 hour
  • Lots of stuff would be useful in this format
  • Editors / IDEs
  • Debugging tools
  • Plone/Zope products
  • Pure python products
  • No need for a huge, involved presentation
  • Please volunteer!
Write a Comment
User Comments (0)
About PowerShow.com