From istazahn at gmail.com  Fri Jun 20 16:37:09 2014
From: istazahn at gmail.com (Ista Zahn)
Date: Fri, 20 Jun 2014 10:37:09 -0400
Subject: [Rd] dget() much slower in recent R versions
Message-ID: <CA+vqiLFbYLec-6Afcee2fGq0R=_8=VyZAfq1nMHMgCd_ynAPhA@mail.gmail.com>

Hello,

I've noticed that dget() is much slower in the current and devel R
versions than in previous versions. In 2.15 reading a 10000-row
data.frame takes less than half a second:

> (which.r <- R.Version()$version.string)
[1] "R version 2.15.2 (2012-10-26)"
> x <- data.frame(matrix(sample(letters, 100000, replace = TRUE), ncol = 10))
> dput(x, which.r)
> system.time(y <- dget(which.r))
   user  system elapsed
  0.546   0.033   0.586

While in 3.1.0 and r-devel it takes around 7 seconds.

> (which.r <- R.Version()$version.string)
[1] "R version 3.1.0 (2014-04-10)"
> x <- data.frame(matrix(sample(letters, 100000, replace = TRUE), ncol = 10))
> dput(x, which.r)
> system.time(y <- dget(which.r))
   user  system elapsed
  6.920   0.060   7.074

> (which.r <- R.Version()$version.string)
[1] "R Under development (unstable) (2014-06-19 r65979)"
> x <- data.frame(matrix(sample(letters, 100000, replace = TRUE), ncol = 10))
> dput(x, which.r)
> system.time(y <- dget(which.r))
   user  system elapsed
  6.886   0.047   6.943
>

I know dput/dget is probably not the right tool for this job:
nevertheless the slowdown in quite dramatic so I thought it was worth
calling attention to.

Best,
Ista



[Rd] dget() much slower in recent R versions
Ista Zahn