[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: PATCH: true C coroutines -- yield across C stack from anywhere
- From: Javier Guerra <javier@...>
- Date: Tue, 2 Nov 2004 14:58:20 -0500
On Tuesday 02 November 2004 1:52 pm, Michael Roth wrote:
> gpgkeys: WARNING: this is an *experimental* HKP interface!
> Lua coroutines are _really_ nice. They are very fast, very usefull and
> very light weight. I use coroutines in all sort of iterators.
the iterators coroutines are one of the most amazing features of Lua, at least
for someone coming from more 'procedural' side of programming. I've long
wanted a nice 'almost-functional' language. Lua can be as 'lisp without all
the parenthesis' as i want!
> However, sometimes they are a little bit limited, because they can't
> yield across a C-boundary. But in the meantime I changed my software
> layout to work around this limit. I played with C-level coroutines. But
> they are simply to expensive.
i haven't played at all with these, certainly look more expensive, at least
because the user has to choose a stack size. I'm curious about performance,
are they so much slower than lua-only?
> So the lua way is to go with lua coroutines.
i think the nice thing about the patch is that it lets you choose. but i'm
not sure if the choice is per-coroutine, or at compile time.
Description: PGP signature