[R] Dramatic slowdown of R 2.7.2?

From: Marek Wielgosz <m.wielgosz_at_wp.pl>
Date: Tue, 26 Aug 2008 18:38:22 +0200


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

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 26 Aug 2008 - 16:40:45 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 26 Aug 2008 - 19:34:01 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive