It's a simple benchmark examining:
- execution time (sec)
- memory consumption (kb)
- binary size (kb)
- conciseness of a programming language (lines of code)
Thread overview | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
August 14, 2021 Humble benchmark (fisher's exact test) | ||||
---|---|---|---|---|
| ||||
It's a simple benchmark examining:
|
August 13, 2021 Re: Humble benchmark (fisher's exact test) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ki Rill | On 8/13/21 7:19 PM, 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) > The most obvious improvement I can see is removing the dynamic array creations in a loop. Since that array seems to be very short, using a static array would improve performance. (Ok, now I see that you already do that for the betterC and nogc versios.) Also, I wonder how disabling GC collections would affect execution time and memory consumption: https://dlang.org/spec/garbage.html#gc_config Ali |
August 14, 2021 Re: Humble benchmark (fisher's exact test) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ki Rill | On Saturday, 14 August 2021 at 02:19:02 UTC, Ki Rill wrote: >It's a simple benchmark examining:
|
August 14, 2021 Re: Humble benchmark (fisher's exact test) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ki Rill | On Saturday, 14 August 2021 at 02:19:02 UTC, Ki Rill wrote: >It's a simple benchmark examining:
Lots of things to improve there. https://github.com/rillki/humble-benchmarks/pull/4 A nice quick morning exercise :) |
August 14, 2021 Re: Humble benchmark (fisher's exact test) | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Colvin | On Saturday, 14 August 2021 at 10:26:52 UTC, John Colvin wrote: >On Saturday, 14 August 2021 at 02:19:02 UTC, Ki Rill wrote: >It's a simple benchmark examining:
Lots of things to improve there. https://github.com/rillki/humble-benchmarks/pull/4 A nice quick morning exercise :) Thanks! |
August 14, 2021 Re: Humble benchmark (fisher's exact test) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ki Rill | On Saturday, 14 August 2021 at 02:19:02 UTC, Ki Rill wrote: >
Regarding the binary size: please make sure that you're using dynamic linking for the D package, as by default it always links statically, while libc and libc++ are always linked dynamically. |
August 14, 2021 Re: Humble benchmark (fisher's exact test) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ki Rill | On Saturday, 14 August 2021 at 02:19:02 UTC, Ki Rill wrote: >It's a simple benchmark examining:
I'm skeptical that you're measuring what you think you're measuring. I say this because the R version shouldn't be that much slower than the C version. All that happens when you call More likely a chunk of your C code is being eliminated by the optimizer. Another thing is that printing to the screen is much slower in R than in C. You shouldn't benchmark printing to the screen since that is not something you would ever do in practice. If you really want performance, you can determine which case applies to your code and then make the underlying |
August 14, 2021 Re: Humble benchmark (fisher's exact test) | ||||
---|---|---|---|---|
| ||||
Posted in reply to bachmeier | On Saturday, 14 August 2021 at 12:48:05 UTC, bachmeier wrote: >On Saturday, 14 August 2021 at 02:19:02 UTC, Ki Rill wrote: It happens at the end of the program only once and takes a fraction of a second. I consider it to be irrelevant here. >If you really want performance, you can determine which case applies to your code and then make the underlying That is the point of this benchmark, to test it against Python/R implementation irrespective of what it does additionally. And to test compiled languages in general. |
August 14, 2021 Re: Humble benchmark (fisher's exact test) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ki Rill | On Saturday, 14 August 2021 at 02:19:02 UTC, Ki Rill wrote: >It's a simple benchmark examining:
Using the |
August 14, 2021 Re: Humble benchmark (fisher's exact test) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ki Rill | On Saturday, 14 August 2021 at 02:19:02 UTC, Ki Rill wrote: >It's a simple benchmark examining:
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. |