Nicholas Clark <[EMAIL PROTECTED]> wrote: > On Thu, Jul 17, 2003 at 08:40:44PM -0400, Benjamin Goldberg wrote:
>> When there are no events queued, for any thread, then we change "branch >> e_handler_foo" back into "branch label_foo", for speed. > Do we need to do this last bit explicitly? Or can we do it lazily - > each time we get called to e_handler when there are no longer events, > we change back that instruction. > Or is this already done this way? Its not done in any way. Albeit I had this scheme in my talk at YAPC::EU, its not committed, lacking some kind of confirmation. WRT your question: scheduling an event puts the event handler opcode in place. If there are no events in the quueue, there are no event check opcodes executed that could slow down the operation. When there are multiple events to handle, it doesn't save anything to do these later, so the event handling code puts the original instruction back in the stream. At least my proposed scheme works like that. > Nicholas Clark leo