Reputation: 2301
Has anyone ever done a straight up apple to apple comparison between:
I am trying to get benchmarks which would be faster. I am also interested in what kind of parallalzation/multithreading designs that might make the calculate faster within C++?
Upvotes: 1
Views: 1518
Reputation: 368439
Aside from startup costs for initializing R which you only get in case 1) by your study design, the results should be identical as R itself uses the exactly same BLAS AND LAPACK libraries if built correctly.
I have a to-be updated package / vignette which proposes a benchmarking framework for exactly these questions as the issue is so easy to misunderstand -- see the CRAN page for gcbd as well as the corresponding pdf vignette.
If you build R differently (eg statically, or with its own BLAS / LAPACK sources), then you are getting different results but you are also not making an apples-to-apples comparison.
Upvotes: 1