[英]C++ with a math library like GSL, LAPACK, or CBLAS performance vs C++ with Rinside with an R function?
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++?
我还对哪种并行化/多线程设计可能会使C ++中的计算速度更快感兴趣?
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. 除了仅在研究设计中只有在情况1)中得到的用于初始化R的启动成本之外,结果应该是相同的,因为如果正确构建,R本身将使用完全相同的BLAS AND LAPACK库 。
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 . 我有一个待更新的package / vignette,它针对这些问题提出了一个基准测试框架,因为这个问题很容易让人误解-请参阅gcbd的CRAN页面以及相应的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. 如果您以不同的方式构建R(例如,以静态方式构建,或使用其自身的BLAS / LAPACK源),则得到的结果会有所不同,但是您也无法进行比较。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.