At 01:19 PM 1/5/01 -0500, Uri Guttman wrote:
> >>>>> "NI" == Nick Ing-Simmons <[EMAIL PROTECTED]> writes:
>
> >> and where is the event test call made?
>
> NI> It isn't. PL_next_op is set by C signal handler.
>
>and that has to be memory and data structure safe.
>
> NI> In practice I suspect we need the test :
>
> NI> while (PL_op = (PL_sig_op) ? PL_sig_op : PL_next_op)
> NI> {
> PL_op-> perform;
> NI> }
>
> NI> We probably need at least ONE test in the loop - let us try and
> NI> make that usable for all the "abnormal" cases.
>
>we are in violent agreement. a single test flag which is set by a
>variety of events is all that is needed. but we also should have an op
>loop with no test as the code could use an event loop to handle all
>events. then dispatching is not done inline. would it be worth it for
>the speedup to have 2 different op code loops?
Yes, it would. Even if we only save a half-dozen cycles per iteration, that
can add up. It also means the loop would be a little bit smaller, and
that's enough to be worth it as well. We'd probably take at least one fewer
cache line in that case, maybe two or three. (Depending on the processor)
>also do you want to test each time thru the loop? what about a counter?
>we could set the flag saying some event has triggered and then in the
>conditional code also deal with the counter. when the counter zeroes,
>then the event is dispatched.
No counters in the oploop. If we want to check the flag every X opcodes, we
should make sure to inject a special opcode to do it.
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk