[R] Dramatic slowdown of R 2.7.2?

Marek Wielgosz m.wielgosz at wp.pl
Tue Aug 26 18:38:22 CEST 2008


Dear R users/developers,

simple comparison of code execution time of R 2.7.1 and R 2.7.2 shows a 
dramatic slowdown of the newer version. Rprof() identifies .Call 
function as a main cause (see the code below). What happened with R 
2.7.2?  

Kind regards
Marek Wielgosz
Bayes Consulting

######### Probably useful info ###############
### CPU: Core2Duo T 7300, 2 GB RAM
### WIN XP
### both standard Rblass.dll files
### both pre-compiled binary versions of R

######### R 2.7.1 ############################
#R version 2.7.1 (2008-06-23)
#i386-pc-mingw32
#
#locale:
#LC_COLLATE=Polish_Poland.1250;LC_CTYPE=Polish_Poland.1250;LC_MONETARY=Polish_Poland.1250;LC_NUMERIC=C;LC_TIME=Polish_Poland.1250
#
#attached base packages:
#[1] stats     graphics  grDevices utils     datasets  methods   base

######### R 2.7.2 ############################
#R version 2.7.2 (2008-08-25)
#i386-pc-mingw32
#
#locale:
#LC_COLLATE=Polish_Poland.1250;LC_CTYPE=Polish_Poland.1250;LC_MONETARY=Polish_Poland.1250;LC_NUMERIC=C;LC_TIME=Polish_Poland.1250
#
#attached base packages:
#[1] stats     graphics  grDevices utils     datasets  methods   base   

################################################

The following code has been executed (with both R 2.7.1 and R 2.7.2):

Rprof(tmp <- tempfile())
sample_size=10
f1=function(k) {solve(matrix(rnorm(4*k^2),2*k,2*k))}
out=vector(,sample_size)
for (i in 1:sample_size) {out[i]=system.time(f1(10^3))[[3]]}
summaryRprof(tmp)
out_summary=matrix(,1,6,dimnames=list("value",c("dim","min","mean","med","sd","max")))
out_summary[1,1]=sample_size
out_summary[1,2]=min(out)
out_summary[1,3]=mean(out)
out_summary[1,4]=median(out)
out_summary[1,5]=sd(out)
out_summary[1,6]=max(out)
out_summary



More information about the R-help mailing list