[Vm-dev] VM Maker: VMMaker.oscog-nice.1813.mcz

Levente Uzonyi leves at caesar.elte.hu
Wed Apr 20 16:33:07 UTC 2016


Hi Eliot,

On Wed, 20 Apr 2016, Eliot Miranda wrote:

>
> Hi Levente,
>
>
>> On Apr 20, 2016, at 4:17 AM, Levente Uzonyi <leves at caesar.elte.hu> wrote:
>>
>> Hi Nicolas,
>>
>> IMHO the best would still be to use macros for as many of these functions as possible.
>> The link-time optimization has its limitations, and it will not really work for the VM, at least not the way it could provide speedups comparable to macro use.
>
> +1
>
>> This is because the optimizer won't optimize everything blindly. And since these functions are not used from the main VM code, the optimizer will consider these optimizations unnecessary, which is probably why only the smallest functions were inlined in my experimental compilation.
>> However the optimizer probably inlined many other things and removed some cruft as well, because it worked on the whole VM. The size of the resulting binary was 5.1MB instead of the usual 6.3MB.
>
> Interesting.  That's a big win.  Looks like LTO should be adopted as broadly as possible.  Did you run external plugin tests?  Anything broken?

Since autoconf went nuts from the -flto flag (it couldn't correctly set 
the value of HAVE_LIBDL), I had to manually tweak the generated Makefiles 
to make the compilation work. Therefore I only added this flag to the 
Makefiles in the vm, LargeIntegers and the main build directory, because 
what I wanted to see was if this flag can speed primDigitCompare up.
So, once the flag works with autoconf, the actual gain can be bigger.

Levente

>
>>
>> Levente
>>
>


More information about the Vm-dev mailing list