<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-04-17 22:51 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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></span><div>Ah, and this is the purpose of -flto, link-time-optimization, sorry for being slow myself ;)<br> <br></div></div></div></div></blockquote><div><br></div><div>Hmm, I&#39;m slow, but is -flto stable?<br></div><div>If I add it t CFLAGS and to LDFLAGS then I cannot compile Spur on mac, and I cannot decode the error message easily:<br><br>0  0x108ee297e  __assert_rtn + 144<br>1  0x108f709d8  ld::tool::HeaderAndLoadCommandsAtom&lt;x86&gt;::sectionFlags(ld::Internal::FinalSection*) const + 782<br>2  0x108f703a5  ld::tool::HeaderAndLoadCommandsAtom&lt;x86&gt;::copySegmentLoadCommands(unsigned char*) const + 955<br>3  0x108f6f58c  ld::tool::HeaderAndLoadCommandsAtom&lt;x86&gt;::copyRawContent(unsigned char*) const + 146<br>4  0x108f46e0f  ld::tool::OutputFile::writeAtoms(ld::Internal&amp;, unsigned char*) + 465<br>5  0x108f3fdda  ld::tool::OutputFile::writeOutputFile(ld::Internal&amp;) + 822<br>6  0x108f39e94  ld::tool::OutputFile::write(ld::Internal&amp;) + 178<br>7  0x108ee38fa  main + 1311<br>A linker snapshot was created at:<br>    /tmp/Squeak-2016-03-17-230136.ld-snapshot<br>ld: Assertion failed: (0 &amp;&amp; &quot;typeTempLTO should not make it to final linked image&quot;), function sectionFlags, file /Library/Caches/com.apple.xbs/Sources/ld64/ld64-264.3.101/src/ld/HeaderAndLoadCommands.hpp, line 780.<br>clang: error: linker command failed with exit code 1 (use -v to see invocation)<br>make: *** [build/vm/Squeak] Error 1<br><br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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><font color="#888888"><br><br></font></span></div><span><font color="#888888">Nicolas</font></span><div><div><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></span></div><br></div></div>
</blockquote></div><br></div></div>