Humble benchmark (fisher's exact test)
max haughton
maxhaton at gmail.com
Sat Aug 14 16:51:11 UTC 2021
On Saturday, 14 August 2021 at 14:29:16 UTC, max haughton wrote:
> On Saturday, 14 August 2021 at 02:19:02 UTC, Ki Rill wrote:
>> It's a simple benchmark examining:
>> * execution time (sec)
>> * memory consumption (kb)
>> * binary size (kb)
>> * conciseness of a programming language (lines of code)
>>
>> [Link](https://github.com/rillki/humble-benchmarks/tree/main/fishers-exact-test)
>
> If anyone is wondering why the GDC results look a bit weird:
> It's because GDC doesn't actually inline unless you compile
> with LTO or enable whole program optimization (The rationale is
> due to the interaction of linking with templates).
>
> https://godbolt.org/z/Gj8hMjEch play with removing the
> '-fwhole-program' flag on that link.
A little more: I got the performance down to be less awful by
using LTO (and found an LTO ICE in the process...), but as far as
I can tell the limiting factor for GDC is that it's standard
library by default doesn't seem to compile with either inlining
or LTO support enabled so cycles are being wasted on (say)
calling IsNaN sadly.
I also note that X87 code is generated in Phobos, which could be
hypothetically required for the necessary precision on a generic
target, but is probably quite slow.
More information about the Digitalmars-d
mailing list