I have a data structure that is fast to dput(), but very slow to dget(). On
disk, the file is about 35MB.

> system.time(dget("r.txt"))
   user  system elapsed 
 142.93    1.27  192.84 

The same data structure is fast to save() and fast to load(). The .RData file on
disk is about 12MB.

> system.time(load("r.RData"))
   user  system elapsed 
   4.89    0.08    7.82 

I imagine that this is a known speed issue with dget, and that the recommended
solution is to use load, which is fine with me. If so, perhaps a note to this
effect could be added to the dget help page.

All timings above using

R version 2.12.0 (2010-10-15)
Platform: i386-pc-mingw32/i386 (32-bit)

______________________________________________
R-help@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.

Reply via email to