<div dir="ltr">Hi Levente,<div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 18, 2016 at 8:39 AM, Levente Uzonyi <span dir="ltr">&lt;<a href="mailto:leves@caesar.elte.hu" target="_blank">leves@caesar.elte.hu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
With a bit of manual tweaking I managed to build a vm using the -flto flag (from the 3666 sources). gcc managed to inline stackValue, failed, isIntegerObject, integerObjectOf, but failed to do the same for success, isKindOf, popThenPush, integerValueOf and digitCompareLargewith.<br>
<br>
The overall speedup was ~10% for SmallIntegers and ~4-5% for equal 64-bit LargeIntegers, and ~13% for unequal ones (no bytes match).<br>
<br>
I added -flto to CFLAGS and -Wl,-O1 -Wl,-flto to LDFLAGS.</blockquote><div><br></div><div>Excuse me for being lazy and asking you rather than looking, but is there a way to specify the set of functions considered?  t would be nice to only apply link-time optimisation to the plain primitive API.  For debugging I&#39;d rather /not/ apply link-time optimisation to the interface between the CoInterpreter and the Cogit.  But the plugin API is performance-critical enough that I&#39;ll put up with reduced debuggability for that part of the system.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888">Levente</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On Mon, 18 Apr 2016, Levente Uzonyi wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
You have to add -flto to both CFLAGS and LDFLAGS.<br>
<br>
I tried to compile it on Ubuntu 14.04, but there&#39;s some problem with autoconf. The -flto flag probably optimizes something away and the script to detect libdl will fail. Instead, it sets the HAVE_DYLD flag,<br>
which is Mac only, and sqUnixExternalPrims.c won&#39;t compile.<br>
<br>
Levente<br>
<br>
</blockquote>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>