Poor Performance gdc11 for base 64 with O3

Mahdi ubuntulove74 at gmail.com
Mon Sep 20 16:10:06 UTC 2021


On Sunday, 19 September 2021 at 19:31:27 UTC, max haughton wrote:
> On Sunday, 19 September 2021 at 19:04:28 UTC, Mahdi wrote:
>> In optimization level 3, gdc11 doesn't seem to work as well as 
>>  gdc10 for base 64 benchmark.
>> On this site:
>> https://github.com/kostya/benchmarks#base64
>>
>> [...]
>
> It's because of libphobos not being compiled with inlining due 
> to the changes to template linkage emission. If you rebuild 
> Phobos with LTO enabled (if it isn't already) you can get your 
> performance back.
>
> Compile with LTO and try that.

Thanks
I experimented with lto but it got worse:

ubuntu at ubuntu:~/dlang/benchmark/benchmarks/base64/gdc-11$ gdc-11 
-flto -O3  test.d
ubuntu at ubuntu:~/dlang/benchmark/benchmarks/base64/gdc-11$ time 
./a.out
encode aaaa... to YWFh...: 1431666688, 20.83
decode YWFh... to aaaa...: 1073741824, 69.34

real	1m30.447s
user	1m29.369s
sys	0m0.191s



More information about the D.gnu mailing list