[R] Dramatic slowdown of R 2.7.2?
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Tue Aug 26 20:17:55 CEST 2008
Marek Wielgosz wrote:
> 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?
I don't see much of a difference, running on Linux or under Wine on
Linux though, and scaled down to 3*10^2. With a large matrix inversion
as the workhorse, it is hardly surprising that .Call eats most of the
time, but one could easily get the idea that you aren't picking up the
same BLAS in both cases(?)
> 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.
--
O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list