[R] Efficiency of C Compiler in "R CMD SHLIB"

Sharpie chuck at sharpsteen.net
Fri Apr 16 02:38:11 CEST 2010



yehengxin wrote:
> 
> Dear R experts:
> 
> I attempted to compile c source code  into DLL using "R CMD SHLIB" but I
> found the DLL run in R is almost twice slower than the codes compiled in
> C++ 6.0 when I chose "release" option and is as fast as the situation
> where I chose "debug" option in C++ 6.0.  I wonder how to improve the
> efficiency of DLL compiled by gcc compiler in R.  Thanks in advance!
> 
> Xin 
> 

What operating system are you using?

What is "C++ 6.0"?

What do you mean by "release" and "debug".  How do these settings alter the
invocation of the compiler?

The answers to these questions can help us provide insight on your first
question.


For your last question, on UNIX/Linux platforms gcc is invoked by R CMD
SHLIB with the flags specified in $R_HOME/etc/<system architecture>/Makeconf 
.  Important entries are:

  SHLIB_CFLAGS
  SHLIB_CXXFLAGS
  SHLIB_FFLAGS


Hope this helps.

-Charlie

-----
Charlie Sharpsteen
Undergraduate-- Environmental Resources Engineering
Humboldt State University
-- 
View this message in context: http://n4.nabble.com/Efficiency-of-C-Compiler-in-R-CMD-SHLIB-tp1934429p1934478.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list