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

Levente Uzonyi leves at caesar.elte.hu
Mon Apr 18 15:39:41 UTC 2016


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.

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
>


More information about the Vm-dev mailing list