Humble benchmark (fisher's exact test)

Ki Rill rill.ki at yahoo.com
Sat Aug 14 14:08:05 UTC 2021


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:
> 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.

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 `.Call` 
> yourself. If you don't do that, you're comparing Fisher's exact 
> test against a routine that does a lot more than Fisher's exact 
> test. In any event, you're not comparing against an R 
> implementation of this test.

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.


More information about the Digitalmars-d mailing list