[R-SIG-Mac] configuring R-2.6.0 for speed

James Bullard bullard at berkeley.edu
Tue Aug 28 07:01:01 CEST 2007


Ok, so I have done a *tiny* amount of benchmarking ... I first  
thought that the problem was that I didn't compile it with --system- 
zlib (which probably was a problem), but It is clear that the "data"  
call is taking much longer in 2.6. I have seen this with "load" as  
well and on a variety of objects, note neither of these I compiled  
myself. All objects which I have tried to load were constructed with  
2.5.1, so I'll probably try to construct a couple of objects with 2.5  
and 2.6 and see if that is an issue, unless someone chimes and says:  
"thats definitely [not] an issue"

thanks for all of the help... jim

== R-2.6.0 (http://r.research.att.com/R-devel-42657.dmg) ==

 > system.time(data(davidTiling))
    user  system elapsed
135.607   2.355 138.219

 > system.time({ davidRaw <- log2(exprs(davidTiling)[,4:6]) ;
+               davidDNA <- log2(exprs(davidTiling[,1:3])) })
    user  system elapsed
11.981   2.203  24.346

 > system.time({ rm(davidTiling); gc() })
    user  system elapsed
   1.520   0.093   1.643

== R-2.5.1 (Obtained from a CRAN mirror today) ==

 > system.time(data(davidTiling))
    user  system elapsed
61.909   2.388  84.032
 > system.time({ davidRaw <- log2(exprs(davidTiling)[,4:6]) ;
+               davidDNA <- log2(exprs(davidTiling[,1:3])) })
    user  system elapsed
   8.667   2.130  27.041
 > system.time({ rm(davidTiling); gc() })
    user  system elapsed
   0.667   0.047   0.715




On Aug 27, 2007, at 2:46 PM, Simon Urbanek wrote:

> James,
>
> On Aug 27, 2007, at 5:35 PM, James Bullard wrote:
>
>> I have checked out R-devel from subversion and configured it with  
>> the following command
>>
>> ./configure --with-blas='-framework vecLib' CFLAGS="-g -O2 - 
>> march=nocona" CXXFLAGS="-g -O2 -march=nocona" FFLAGS="-g -O2 - 
>> march=nocona" FCFLAGS="-g -O2 -march=nocona"
>>
>> followed by make && make install. This works in the sense that R  
>> starts up fine. However, my session seems to be very slow compared  
>> to R-2.5.1 (which I had installed from the binaries at CRAN). Slow  
>> means for example that loading a large RData file takes much  
>> longer. Is there any configure flag I am missing? What are the  
>> exact configure command used to build the CRAN binary?
>>
>
> I don't think it should be any slower - actually is should be  
> faster, because the CRAN binary has memory profiling enabled. There  
> were some changes in R-devel that can make it slower, but not  
> noticeably I suppose. Can you test the CRAN binary of R-devel (from  
> http://r.research.att.com) to see if it exhibits the same slow-down?
>
> FWIW the full flags used for the CRAN i386 build are the following:
>
> CC="gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"  
> CXX="g++-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"  
> F77="gfortran-4.0 -arch i386  -isysroot /Developer/SDKs/ 
> MacOSX10.4u.sdk" FC="gfortran-4.0 -arch i386  -isysroot /Developer/ 
> SDKs/MacOSX10.4u.sdk" CPPFLAGS=-msse3 CFLAGS="-g -O2 -std=gnu99 - 
> march=nocona" CXXFLAGS="-g -O2 -march=nocona" FFLAGS="-g -O2 - 
> march=nocona" FCFLAGS="-g -O2 -march=nocona" --enable-BLAS-shlib -- 
> with-system-zlib --enable-memory-profiling
>
> Using the universal SDK supposedly results in faster executables,  
> but I didn't test it ...
>
> Cheers,
> Simon
>
>
>> (I am using the latest version of OS X on an Intel MacBook with the
>> newest Xcode and the gfortran from CRAN).
>>
>> Jim
>>
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>>
>



More information about the R-SIG-Mac mailing list