<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-04-17 22:43 GMT+02:00 Nicolas Cellier <span dir="ltr">&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>AFAICT, cDigitCompare:with:len: is inlined by clang.<br>But the interpreterProxy messages are not inlined, but it&#39;s not really amazing, these are different units of compilation.<br></div></div></div></div></div></blockquote><div><br></div><div>Ah, and this is the purpose of -flto, link-time-optimization, sorry for being slow myself ;)<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>The procedure I used for checking was:<br><br>vim ../common/Makefile.flags (add option -S to CFLAGS)<br>touch ../../src/plugins/LargeIntegers/LargeIntegers.c<br>mvm -f<br>less build/LargeIntegers/LargeIntegers.o<br><br></div>And you are certainly right, compared to a few bit ops, the function calls/return/stack handling are expensive.<br></div>So inlining should make a measurable difference for &quot;small&quot; large integers.<br></div>I was biased by giant integers which is more what I&#39;m after (tight loops)<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">Nicolas</font></span><div><div class="h5"><br><div><div><div><br><div><div><div class="gmail_extra"><div class="gmail_quote">2016-04-17 0:59 GMT+02:00 Levente Uzonyi <span dir="ltr">&lt;<a href="mailto:leves@caesar.elte.hu" target="_blank">leves@caesar.elte.hu</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Hi Nicolas,<br>
<br>
It&#39;s been a while I optimized C programs, but I&#39;m pretty sure function calls cost a lot compared to a few direct instructions (e.g. isIntegerObject).<span><font color="#888888"><br>
<br>
Levente<br>
</font></span></blockquote></div><br></div></div></div></div></div></div></div></div></div>
</blockquote></div><br></div></div>