Comments on: Using OpenMP-ized C code with R http://stats.blogoverflow.com/2011/08/using-openmp-ized-c-code-with-r/ The Stats Stack Exchange Blog Thu, 18 Sep 2014 00:11:15 +0000 hourly 1 https://wordpress.org/?v=4.5.6 By: mbq http://stats.blogoverflow.com/2011/08/using-openmp-ized-c-code-with-r/#comment-27 Fri, 12 Aug 2011 11:12:12 +0000 http://stats.blogoverflow.com/?p=249#comment-27 As I wrote it is intentional; I was looking for a simple example that would do something easy to follow and consume a lot of CPU, just not to overwhelm the compilation/core number selection/memory part. This is also why I haven’t used Rcpp.

But I agree that it was an error to show this overuse of REAL and do not criticize it, so I have fixed that.

Oh, and feel free to post the follow-up here; it is a community blog after all. Just visit our blog editors’ chat room.

]]>
By: Dirk Eddelbuettel http://stats.blogoverflow.com/2011/08/using-openmp-ized-c-code-with-r/#comment-26 Fri, 12 Aug 2011 03:27:28 +0000 http://stats.blogoverflow.com/?p=249#comment-26 Thanks for trying to poopularize OpenMP with R! I have however a few key points I would like to take up with you: a) the example is bad: your algo for cumsum is quadratic in N (two loops) whereas a standard approach is linear; b) your use of the R API is pretty slow as you have slots of macro/function call overhead (and an Rcpp based-approach is easier, shorter and faster; c) you could have use inline to make the snippets more easily useable from R. The only merit really is that your OpenMP variants outperform the non-OpenMP ones — but then you can beat either pretty easily still. I may post a follow-up on my blog.

]]>