Hi friends,
I am right now in Reykjavik, working on Stackless and Psyco
for CCPgames. http://www.ccpgames.com
They want a 64 bit version of Psyco, and I had to do some
prototyping of stackless/psyco collaboration, to see if
it makes sense at all. I think I got this done so far.
Try out Stackless with Psyco!!!
-------------------------------
Stackless is unchanged, Psyco was enhanced to work with
all versions of Stackless. Right now, psyco for stackless
is sitting in a private subfolder on codespeak. This is
only intermediate, psyco.org will be the main site soon.
If you checked out psyco before, you only need to
svn update
and you will find a 'private' subfolder. It contains
the not yet published norman project with all the changes
from last year, and the new stackless support.
For first checkout, use this:
svn checkout http://codespeak.net/svn/psyco/v2/private/norman
build it with setup.py, or add the supplied project file
to your Visual Studio solution. In order to set it up
without an extra directory, you can copy the py-support
folder, renaming it to psyco. Adjust your python path,
to include the directory that contains the psyco folder.
Compatibility
-------------
- No softswitching
Stackless Psyco does not work with softswitching. You can
enable it, but psyco will do all compilation with
softswitching suppressed. That is, you loose the ability
to pickle tasklets when psyco is active. This will be
improved in the future. Stackless will grow a new
switching mode that is supported by psyco.
- become and capture
After you import psyco, the methods tasklet.become and tasklet.capture
become useless. They are changed into
D:\ccp\2.5\PCbuild8>lib\VC90.SP1\Win32\python_d.exe
Python 2.5.3a0 Stackless 3.1b3 060516 (release25-maint, Apr 16 2010,
00:14:17) [
MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import psyco, stackless
[34782 refs]
>>> stackless.tasklet.become
NotImplemented
[34784 refs]
>>>
Ideally, I would have removed these methods. They are going away,
and they are nearly impossible to support in Psyco. But it is
not possible, because Stackless uses flextype, a different
approach to make builtin bethods efficiently overridable.
This was years before the descriptor protocol was introduced.
flextype will go away, but until then, it needs to stay so.
- cframes
I had to tell psyco about cframes, because they show up in
the Stackless generator implementation. cframes are going away,
too. They were introduced as a speed boost. But speed is
the domain of psyco, and everything written in Python
will get sped up for free.
Future
------
Stackless will gradually morph away in a more compatible way,
and eventually become an extension module like Psyco. This
is a long path to go. It will grow a new switching mode that
is soft, but requires no rewrite of the core functions.
This switching mode will get full psyco support and acceleration.
Psyco will support 64 bit. Not sure under what license, yet ;-)
stay tuned -- chris
--
Christian Tismer :^)<mailto:tismer at stackless.com>
tismerysoft GmbH : Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/
14109 Berlin : PGP key -> http://wwwkeys.pgp.net/
work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05
PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
whom do you want to sponsor today? http://www.stackless.com/