Humble benchmark (fisher's exact test)

bachmeier no at spam.net
Mon Aug 23 13:12:21 UTC 2021


On Saturday, 14 August 2021 at 14:08:05 UTC, Ki Rill wrote:

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

That might have been the point of your benchmark, but that 
doesn't mean the benchmark is meaningful, in this case for at 
least three reasons:

1. You're measuring the performance of completely different tasks 
in R and C, where the R task is much bigger.
2. What you've done is only one way to use R. Anyone that wanted 
performance would use .Call rather than what you're doing.
3. R has a JIT compiler, and you're likely not making use of it.

The comparison against R is not what you're after anyway. If you 
don't want to do it in a way that's meaningful - and that's 
perfectly understandable - it's best to delete it.


More information about the Digitalmars-d mailing list