<div dir="ltr">Hi again,<div><br></div><div>I was looking at all the VM call-backs, and it's interesting to see how they're handled in the VM.</div><div><br></div><div>The following call-backs are called only from C code or interpreter code, hence they're not really optimised: #cannotReturn:. #cannotInterpret:, #aboutToReturn:through:, #run:with:in:, #unusedBytecode.</div><div><br></div><div>The following call-backs are called from machine code through a trampoline switching to C code, i.e., machine code detects if the trampoline will be called, going at full performance if it's not called, and slower if the trampoline is called: #mustBeBoolean, #attemptToAssign:withIndex:, #conditionalBranchCounterTrippedOn:, #trapTripped.</div><div><br></div><div>#doesNotUnderstand: is optimised by the JIT as a PIC case, so it's the most optimised call-back and likely the most frequent.</div><div><br></div><div>I am not sure about #invokeCallbackContext: . Is it a FFI thing ? I believed it's also called only from C code.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 21, 2016 at 10:29 AM, Denis Kudriashov <span dir="ltr"><<a href="mailto:dionisiydk@gmail.com" target="_blank">dionisiydk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2016-11-21 10:21 GMT+01:00 Clément Bera <span dir="ltr"><<a href="mailto:bera.clement@gmail.com" target="_blank">bera.clement@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2016-11-21 10:05 GMT+01:00 Clément Bera <span dir="ltr"><<a href="mailto:bera.clement@gmail.com" target="_blank">bera.clement@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>Hi.</div><div><br></div>#<span style="font-size:12.8px">doesNotUnderstand: is added to the PIC. It's a special case handled for performance. DNUs are slower than normal sends but the overhead is acceptable.</span></blockquote><div><br></div><div>But when it is in PIC it is not anymore slower? </div></div></div></div></blockquote><div><br></div><div>Well the DNU requires to create the message argument so it's always slower than normal call.</div></blockquote></div><br>Ah, yes and it means that DNU always generates garbage.</div></div>
<br></blockquote></div><br></div>