Re: [Stackless] lua vs. stackless python

2009-04-24 Thread Richard Tew
On Fri, Apr 24, 2009 at 1:18 PM, Phoenix Sol wrote: > So I attempted to measure the memory overhead of a Stackless tasklet, with > 'Recipe 286222' from ActiveState's Cookbook: > (on Linux 2.6.27-11-generic SMP x86_64) > > def empty(): pass > b4 = memory() > print "before:", b4 > t = stackless.task

Re: [Stackless] lua vs. stackless python

2009-04-24 Thread Richard Tew
On Fri, Apr 24, 2009 at 11:52 AM, Phoenix Sol wrote: > Good question; I just picked this up somewhere, and cannot find a definitive > answer; do you have it? > And I suppose my wording glosses over the fact that it depends on what you > are doing, right? > > So is there a known 'memory overhead' f

Re: [Stackless] lua vs. stackless python

2009-04-24 Thread Andrew Francis
Hi Folks: > Whether someone would choose Lua or Stackless Python for > coroutines is probably a matter of preference for the language > itself. But one thing Stackless might provide that Lua does not, is the > ability to block C function calls as well as Python function calls > given that we shi

Re: [Stackless] lua vs. stackless python

2009-04-24 Thread Phoenix Sol
So I attempted to measure the memory overhead of a Stackless tasklet, with 'Recipe 286222' from ActiveState's Cookbook: (on Linux 2.6.27-11-generic SMP x86_64) def empty(): pass b4 = memory() print "before:", b4 t = stackless.tasklet(empty)() after = memory() print "after:", after print "differenc

Re: [Stackless] lua vs. stackless python

2009-04-24 Thread Phoenix Sol
Very nice, thanks Peter! On Fri, Apr 24, 2009 at 9:08 AM, Peter Cawley wrote: > A coroutine appears to cost around a kilobyte (20695 - 19601 = 1094 bytes): > > collectgarbage"collect" > print(collectgarbage"count" * 1024) --> 19559 > local function F() > end > print(collectgarbage"count" * 1024)

Re: [Stackless] lua vs. stackless python

2009-04-24 Thread Phoenix Sol
Good question; I just picked this up somewhere, and cannot find a definitive answer; do you have it? And I suppose my wording glosses over the fact that it depends on what you are doing, right? So is there a known 'memory overhead' for a tasklet? And is there a known overhead for a lua coro? (May

Re: [Stackless] lua vs. stackless python

2009-04-24 Thread Richard Tew
On Thu, Apr 23, 2009 at 3:27 PM, Phoenix Sol wrote: > Stackless's 'tasklets' weigh only a few kilobytes a piece; what does a lua > coroutine weigh? How do you know they are only a few kilobytes a piece? Cheers, Richard. ___ Stackless mailing list Stac

Re: [Stackless] lua vs. stackless python

2009-04-24 Thread Jeff Senn
On Apr 23, 2009, at 4:36 PM, Richard Tew wrote: Whether someone would choose Lua or Stackless Python for coroutines is probably a matter of preference for the language itself. But one thing Stackless might provide that Lua does not, is the ability to block C function calls as well as Python fu

Re: [Stackless] lua vs. stackless python

2009-04-24 Thread Phoenix Sol
Thanks, Richard. Whether someone would choose Lua or Stackless Python for coroutines is > probably a matter of preference for the language itself. But one > thing Stackless might provide that Lua does not, is the ability to > block C function calls as well as Python function calls given that we >

Re: [Stackless] lua vs. stackless python

2009-04-23 Thread Richard Tew
On Thu, Apr 23, 2009 at 9:52 AM, Phoenix Sol wrote: > Please share your opinion: How does lua 'stack up' against Stackless > Python?  (intentionally vague ;-) > > It's not my intention to stir up a 'flame war' between two 'language lists', > though I imagine that could be entertaining... > Serious

Re: [Stackless] lua vs. stackless python

2009-04-23 Thread Phoenix Sol
Stackless's 'tasklets' weigh only a few kilobytes a piece; what does a lua coroutine weigh? Stackless, going from my limited understanding here, is not 'actually stackless' at all -- but by manipulating the C stack, allows dynamic switching between (arbitrary?) frames. I have read that lua is 'li

[Stackless] lua vs. stackless python

2009-04-23 Thread Phoenix Sol
Please share your opinion: How does lua 'stack up' against Stackless Python? (intentionally vague ;-) It's not my intention to stir up a 'flame war' between two 'language lists', though I imagine that could be entertaining... Seriously though, if you have anything at all to raise here, please do.