[Stackless] Stackless and Psyco
Bob Ippolito
bob at redivi.com
Mon Mar 1 20:21:03 CET 2004
On Mar 1, 2004, at 10:09 AM, Christian Tismer wrote:
> Aaron Watters wrote:
>
>> */Mellon Gibson <bsdbeast at yahoo.com>/* wrote:
>> I can't get psyco to work with stackless, which is pretty critical
>> for my application, as it's a tad bit too slow right now (about to
>> 11% speed improvement would suffice to serve all clients instead
>> of
>> buying new hardware). Both the client and server classes are
>> designed around GadflyB5, which needs some of the 30% speed
>> improvements I had with just vanilla python and psyco, but then
>> the
>> server tasks become too slow because of the C stack fumbling that
>> vanilla python does. Are there any plans to support psyco, is it
>> too
>> much work? I'm not very fond of the idea to buy brand new SMP
>> hardware to support just 300 more clients. /beast
>
> Hmm, I appreciate that you want to use Stackless, but
> I don't see how this could make your program faster.
> The overall C stack fumbling is almost the same as in
> regular Python, just that I do less recursions.
Well, if you compare I/O bound code written in a blocking style using
Python threads, vs. I/O bound code written in a blocking style (with an
underlying asynchronous implementation) using Stackless there is
probably a GIGANTIC difference in performance and sanity. The third
option is Just To Use Twisted, which can have
effects.addCallback(lambda: on.addCallback(lambda:
your.addCallback(lambda: sanity.addCallback(lambda:
as.addCallback(well))))). A fourth option, I suppose, would be to use
yield Yet
yield Another
yield Style
yield of
yield explicitly
yield asynchronous
yield socket
yield code
but I don't there there is a good framework that supports this quite
yet (I've personally integrated such a beast with Twisted, and PEAK
events is similar, so I know this approach does work and is a bit more
sane than "raw" Twisted).
> And if you application needs 30% speedup from Psyco,
> you are still about to loose with just a bit more clients.
This is the truth :)
-bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
URL: <http://www.stackless.com/pipermail/stackless/attachments/20040301/0d42ec4d/attachment.bin>
-------------- next part --------------
_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless
More information about the Stackless
mailing list