Intel Phi Coprocessor? -> i5/i7 instruction set in R binary?
On 06/10/2013 01:53 PM, ivo welch wrote:
thx again, simon. by stock R, I mean the compiled binaries in http://cran.r-project.org/bin/linux/ . dirk e compiled it as /etc/R/Makeconf:# configure '--prefix=/usr' '--with-cairo' '--with-jpeglib' '--with-readline' '--with-tcltk' '--with-system-bzlib' '--with-system-pcre' '--with-system-zlib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share/R/share' '--includedir=/usr/share/R/include' '--with-blas' '--with-lapack' '--enable-R-profiling' '--enable-R-shlib' '--enable-memory-profiling' '--without-recommended-packages' '--build' 'x86_64-linux-gnu' 'build_alias=x86_64-linux-gnu' 'R_PRINTCMD=/usr/bin/lpr' 'R_PAPERSIZE=letter' 'R_BROWSER=xdg-open' 'LIBnn=lib' 'CC=gcc -std=gnu99' 'CFLAGS=-O2 -pipe -g' 'LDFLAGS=' 'CPPFLAGS=' 'F77=gfortran' 'FFLAGS=-O2 -pipe -g' 'CXX=g++' 'CXXFLAGS=-O2 -pipe -g' 'FC=gfortran' 'FCFLAGS=-O2 -pipe -g' /etc/R/Makeconf:CC = gcc -std=gnu99
Dirk helpfully told me that the switch to compile for your particular processor (and it's SIMD dialect) is -march=native, i.e. "-g -O2 -march=native". For my testing (with my examples) on AMD64 with Linux this produces about a 2X speedup with interpreted R. But, if you go beyond that to hand coding your functions with C/C++ via Rcpp, RcppEigen, etc. the speedups can be dramatic: 35-70X speedup from R code is routine in my experience. Rodney