[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Performance of coroutine resume/yield
- From: Eero Pajarre <epajarre@...>
- Date: Sun, 29 Feb 2004 12:27:45 +0200
Brian Hook wrote:
But I have a related situation where the coroutine may need to be
fired every now and then, e.g. every 10 seconds. Is the cost of the
resume/yield pair high enough that the caller should check the
interval:
Not even related to Lua, I would worry about cache misses in this
case. At least on older PC platforms i got into trouble when I tried
to implement something like this by calling (mostly) stub virtual functions
in C++.
Maybe something like a priority queue keyed with the next event time
would be optimal.
Eero