From maechler at stat.math.ethz.ch  Sun Dec 26 12:34:12 2004
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Sun Dec 26 12:34:15 2004
Subject: [Rd] R's IO speed
In-Reply-To: <Pine.LNX.4.61.0412260929150.14804@gannet.stats>
References: <Pine.LNX.4.61.0412260929150.14804@gannet.stats>
Message-ID: <16846.41396.421023.41407@stat.math.ethz.ch>

>>>>> "BDR" == Prof Brian Ripley <ripley@stats.ox.ac.uk>
>>>>>     on Sun, 26 Dec 2004 10:03:30 +0000 (GMT) writes:

    BDR> R-devel now has some improved versions of read.table
    BDR> and write.table.  For a million-row data frame
    BDR> containing one number, one factor with few levels and
    BDR> one logical column, a 56Mb object.

    BDR> generating it takes 4.5 secs.

    BDR> calling summary() on it takes 2.2 secs.

    BDR> writing it takes 8 secs and an additional 10Mb.

    BDR> saving it in .rda format takes 4 secs.

    BDR> reading it naively takes 28 secs and an additional
    BDR> 240Mb

    BDR> reading it carefully (using nrows, colClasses and
    BDR> comment.char) takes 16 secs and an additional 150Mb
    BDR> (56Mb of which is for the object read in).  (The
    BDR> overhead of read.table over scan was about 2 secs,
    BDR> mainly in the conversion back to a factor.)

    BDR> loading from .rda format takes 3.4 secs.

    BDR> [R 2.0.1 read in 23 secs using an additional 210Mb, and
    BDR> wrote in 50 secs using an additional 450Mb.]


Excellent!
Thanks a lot Brian (for this and much more)!

I wish you continued merry holidays!
Martin


[Rd] R's IO speed
Martin Maechler