[Vm-dev] Re: primitiveDigitCompare is slow (was: Re: [squeak-dev] The Inbox: Kernel-dtl.1015.mcz)

Eliot Miranda eliot.miranda at gmail.com
Fri Apr 22 17:14:46 UTC 2016


Hi Levente,

On Mon, Apr 18, 2016 at 8:39 AM, Levente Uzonyi <leves at caesar.elte.hu>
wrote:

>
> 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.
>
> The overall speedup was ~10% for SmallIntegers and ~4-5% for equal 64-bit
> LargeIntegers, and ~13% for unequal ones (no bytes match).
>
> I added -flto to CFLAGS and -Wl,-O1 -Wl,-flto to LDFLAGS.


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'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'll put up with reduced debuggability for that part of the
system.

Levente
>
>
> On Mon, 18 Apr 2016, Levente Uzonyi wrote:
>
>
>> You have to add -flto to both CFLAGS and LDFLAGS.
>>
>> I tried to compile it on Ubuntu 14.04, but there'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,
>> which is Mac only, and sqUnixExternalPrims.c won't compile.
>>
>> Levente
>>
>>


-- 
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160422/a96bb158/attachment-0001.htm


More information about the Vm-dev mailing list