This section lists the functions that use the Python profiler and line tracer to discover which functions it should compile. These routines are best to use if your application doesn't have a clear "slow spot" where a lot of time is spent algorithmically. If it does, the previous section is all you need.
memory=None, time=None, memorymax=None, timemax=None) |
Very efficient for small scripts and applications. Might be overkill for large applications: the memory blow-up and the time spent compiling a large amount of code could outweight the benefits.
The (optional) arguments are described in the next sections.
watermark=0.09, halflife=0.5, pollfreq=20, parentframe=0.25, memory=None, time=None, memorymax=None, timemax=None) |
As far as I can tell, the best solution for large applications. If a function takes a long time to run, it will be detected and compiled while it is still running, in the middle of its execution. Psyco takes it away from the standard interpreter.
The (optional) arguments are used for fine-tuning. They are described in the next sections.
watermark=0.09, halflife=0.5, pollfreq=100, parentframe=0.25, memory=None, time=None, memorymax=None, timemax=None) |
While quite less accurate, this method has the advantage of adding only a very small overhead to the standard execution and might be suited to large applications with an occasional algorithmically-intensive function.
The (optional) arguments are used for fine-tuning. They are described in the next sections. Try putting a "psyco.background()" call in your site.py file, with a larger watermark. Psyco will stay in the shadow and you should not notice it at all until you do some heavy work in Python.
memory=None, time=None, memorymax=None, timemax=None) |
The usefulness of this routine is unknown. See below.
) |
Calling this function prevents Psyco from compiling any new function. It will still execute the ones that have already been compiled.
Note: most comments on the performance are based on small tests and extrapolations. Just don't trust what I guess and try yourself. Any comment about which routine you found most useful or what value you often give to parameters are welcome!