[fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM
Florian Klämpfl
florian at freepascal.org
Sat Nov 17 22:28:12 CET 2018
Am 17.11.2018 um 22:10 schrieb Simon Kissel:
> Hi Florian,
>
>> With some compiler tuning and a few tricks (two changes to the code
>> and hand-simulated peephole optimizations, but I
>> think these tricks can also the compiler do):
>
> Nice - what changes did you do?
>
> Changing the code of course is cheating, but there might be something
> to learn for us, here.
I prevented the compiler to put certain variables in registers by taking their address :) But I did so only to test if
this helps and for i386 this helps as the decision which variables go into registers is not that easy, but see below.
>
> Would be great if whatever trick you did could be part of the
> compiler.
Meanwhile the compiler can do it (not yet committed). Same VM as yesterday, all rates are a little bit lower, not sure
why (probably to many VMs open :)), but this applies to all three executables.
florian at ubuntu32:~$ ./vipribenchmemcache_nodeps
VipriBenchThreaded - RunningTimeSeconds=5, TestCount=100, StartSeq=0, NumberOfChannels=6, BufferPackets=5000,
NumberOfSynchroThreads=4
.......................................................................................
Time: 5022ms = 8661888 pkts/s = 12952 MB/s
florian at ubuntu32:~$ ./vipribenchmemcache_nodeps_kylix
VipriBenchThreaded - RunningTimeSeconds=5, TestCount=100, StartSeq=0, NumberOfChannels=6, BufferPackets=5000,
NumberOfSynchroThreads=4
......................................................................................
Time: 5040ms = 8531746 pkts/s = 12758 MB/s
florian at ubuntu32:~$ ./vipribenchmemcache_nodeps_fpc
VipriBenchThreaded - RunningTimeSeconds=5, TestCount=100, StartSeq=0, NumberOfChannels=6, BufferPackets=5000,
NumberOfSynchroThreads=4
.............................................................
Time: 5058ms = 6030051 pkts/s = 9017 MB/s
More information about the fpc-devel
mailing list