[Stackless] Stackless and Psyco
Mellon Gibson
bsdbeast at yahoo.com
Mon Mar 1 21:39:02 CET 2004
--- Bob Ippolito <bob at redivi.com> wrote:
>
> 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).
I could give it a run by implementing Python wrapper
for libevent, and then use that from stackless?
/beast
> > 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
__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools
_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless
More information about the Stackless
mailing list