gevent is based on greenlets, which is the hard switching in Stackless.

Stackless also has soft switching.

Maybe rerun your tests with it disabled:

http://stackless.readthedocs.org/en/2.7-slp/library/stackless/stackless.html#stackless.enable_softswitch

Cheers,
Richard.

On 5/31/14, Rob Galanakis <rob.galana...@gmail.com> wrote:
> I was doing some benchmarking of goless under gevent and stackless. The
> results are pretty astonishing when you do this stuff in the interpreter! I
> will put it on GitHub later today or tomorrow and also write up a blog.
> It's possible our implementation is just not a good one regarding gevent,
> but I sort of doubt it. The stackless/gevent specific code is minimal
> (goless/backends.py) and I don't see anything ugly that we're doing there.
> Maybe something is idiomatically very different, or is gevent performance
> just not very good?
> Anyway, it should be easy to profile eventually.
>
> Using backend StacklessBackend
> Benchmarking channels:
>   0.13s: Sync
>   0.14s: Async
>   0.13s: Buffered(1000)
> Benchmarking select:
>   0.29s: No default case.
>   0.15s: With default case.
>
> Using backend GeventBackend
> Benchmarking channels:
>   0.87s: Sync
>   0.83s: Async
>   0.82s: Buffered(1000)
> Benchmarking select:
>   1.12s: No default case.
>   0.16s: With default case.
>
>
> On Tue, May 27, 2014 at 7:17 AM, Kristján Valur Jónsson <
> krist...@ccpgames.com> wrote:
>
>>  Well, I started doing some documentation using sphinx the other day but
>> got sidetracked.
>>
>> The current documentation lives in the modules and in the unittests.
>>
>> I guess the only fiddly bit about it currently is to start it up.
>> Currently one has to explicitly get the main loop running.  This is
>> because
>> stackless _*used*_ to only allow stackless.run() on the main tasklet.
>> The latest versions don’t.
>>
>> Once that restriction is removed, having the main loop run implicitly
>> much
>> as the gevent library does (when the Hub singleton is requested) is easy.
>>
>> I need to put that little brick in there, and then everything will run
>> smoothly J
>>
>>
>>
>> K
>>
>>
>>
>> *From:* stackless-boun...@stackless.com [mailto:
>> stackless-boun...@stackless.com] *On Behalf Of *Aleksandar Radulovic
>> *Sent:* 23. maí 2014 11:36
>>
>> *To:* The Stackless Python Mailing List
>> *Subject:* Re: [Stackless] goless
>>
>>
>>
>> Speaking of which, when can we see some more documentation or examples on
>> stacklesslib? ;)
>>
>>
>>
>> I was fiddling with it the other day and couldn't find any good enough
>> examples of stacklesslib usage..
>>
>>
>>
>> Cheers,
>>
>> alex
>>
>>
>>
>> On Tue, May 20, 2014 at 12:13 PM, Kristján Valur Jónsson <
>> krist...@ccpgames.com> wrote:
>>
>>  You may want to take a look at the latest version of “stacklesslib”,
>> particularly the stacklesslib.wait module.  We now have “waitable”
>> channels, so that you can do similar things to
>>
>> select, e.g.
>>
>>
>>
>> c1 = stacklesslib.wait.WaitChannel()
>>
>> c2 = stacklesslib.wait.WaitChannel()
>>
>> …
>>
>> for c in stacklesslib.wait.iwait([c1, c2]):
>>
>>    if c is c1:  percolate()
>>
>>    elif c is c2: promulgate()
>>
>>
>>
>> A “WaitChannel” is ready when its balance is non-zero.
>>
>> There are also “Sendable” and “Receivable” adapters for WaitChannels to
>> in
>> order to wait for either positive or negative balance.
>>
>>
>>
>> The stacklesslib.util.QueueChannel() is a channel with a fifo queue,
>> which
>> can be either unbounded (the default) or have a maximum length.  This is,
>> I
>> believe, similar to Go’s channels.
>>
>>
>>
>> K
>>
>>
>>
>>
>>
>> *From:* stackless-boun...@stackless.com [mailto:
>> stackless-boun...@stackless.com] *On Behalf Of *Christian Tismer
>> *Sent:* 18. maí 2014 00:00
>> *To:* The Stackless Python Mailing List
>> *Subject:* Re: [Stackless] goless
>>
>>
>>
>> On 18.04.14 12:46, Kristján Valur Jónsson wrote:
>>
>> Hi, I though’t I’d mention here an experimental problem that a few of my
>> colleagues worked on during PyCon:
>>
>> Goless!
>>
>> http://goless.readthedocs.org/en/latest/index.html
>>
>>
>>
>> It also shows how more complex behavior can be built on top of the
>> relatively simple primitives that stackless provides.
>>
>>
>> (a bit late, but anyway better than never)
>>
>> Yes, quite neat thing.
>> This could be used as an interesting example for the Stackless talk.
>>
>> cheers - Chris
>>
>> p.s.: actually, I'm studying Go a bit, in order to understand
>> how they do stuff, how they lock, how they schedule, ...
>>
>> --
>>
>> Christian Tismer             :^)   tis...@stackless.com
>>
>> Software Consulting          :     http://www.stackless.com/
>>
>> Karl-Liebknecht-Str. 121     :     http://www.pydica.net/
>>
>> 14482 Potsdam                :     GPG key -> 0xFB7BEE0E
>>
>> phone +49 173 24 18 776  fax +49 (30) 700143-0023
>>
>>
>> _______________________________________________
>> Stackless mailing list
>> Stackless@stackless.com
>> http://www.stackless.com/mailman/listinfo/stackless
>>
>>
>>
>>
>>
>> --
>> a lex 13 x
>> http://a13x.net | @a13xnet
>>
>> _______________________________________________
>> Stackless mailing list
>> Stackless@stackless.com
>> http://www.stackless.com/mailman/listinfo/stackless
>>
>

_______________________________________________
Stackless mailing list
Stackless@stackless.com
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to