Simultaneous was the implementation goal for
same-cycle events -- but
since Ruby is implemented sequentially the events,
of course, actually
execute sequentially. Events in the "same cycle" are
technically
unordered, though in practice they are ordered by
the implementation of
the priority heap used by EventQueue.[Ch].
Adding magic instructions and/or callbacks will
affect the number of
observed Ruby_cycles, in the following ways:
1) Addition of a sethi instruction (eg. magic call)
changes the
execution path ( a sethi takes at least a cycle to
execute, after all),
i-cache behaviour, etc., and could (very rarely)
cause more interesting
effects (eg. perhaps by adding sethi instructions a
particular
PC-relative branch path becomes impossible to
express).
2) Magic instructions/callbacks definitely can
impact the behaviour of
Ruby (depending on what your code does in response
to them), which can
in turn affect the observed cycle count.
3) Rarely, as a corollary of #1, addition of
instructions can affect
entire dynamic executions due to changes in the
order of synchronization
events.
Regards,
Dan
Dave Z. wrote:
Hello,
Does the event queue trigger simultaneous events?
Or
everything takes place sequentially?
Would the addition of magic instructions and
callbacks
increase Ruby cycles?
Thanks,
Dave
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam
protection around
http://mail.yahoo.com
_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx