[Rd] str() with attr(*, "names") is extremely slow for long vectors

Martin Maechler maechler at stat.math.ethz.ch
Sat May 13 17:16:19 CEST 2006

>>>>> "Gerhard" == Gerhard Thallinger <Gerhard.Thallinger at tugraz.at>
>>>>>     on Sat, 13 May 2006 12:54:10 +0200 writes:

>>>>> "HenrikB" == Henrik Bengtsson (max 7Mb) <hb at stat.berkeley.edu> 
>>>>> on Fri, 5 May 2006 11:58:19 -0700 writes: 

But have you looked at R 2.3.0-patched  at all?

I did acknowledge that str(<long character>) had become unacceptably slow, 
and had implemented a simple patch almost "immediately".


    HenrikB> Hi, I noticed some time ago that, for instance,
    HenrikB> named vectors that are really makes str() really
    HenrikB> slow when displaying the names attribute.

    HenrikB> I don't know exactly when this started, but it
    HenrikB> wasn't the case say 1-2 years ago. Example (on a
    HenrikB> WinXP 1.8GHz):

    Gerhard> It got slower with R 2.3.0. Comparing str() for a
    Gerhard> big exprSet object from the "Biobase" package I got
    Gerhard> the following numbers (system.time(str(anaexp)) on
    Gerhard> WinXP 1.8 GHz):

    Gerhard>   R 2.2.0

    Gerhard>     1. 14.64 0.13 14.90 NA NA 2.  4.33 0.09 4.43 NA
    Gerhard> NA 3.  4.20 0.15 4.38 NA NA

    Gerhard>   R 2.3.0

    Gerhard>     1. 65.36 0.18 66.12 NA NA 2. 51.75 0.21 52.55
    Gerhard> NA NA 3. 51.79 0.17 52.45 NA NA

    Gerhard> One can notice a considerable speed-up in the 2nd &
    Gerhard> 3rd call to str() in R 2.2.0, which is much less
    Gerhard> pronounced in R 2.3.0.
    Gerhard> Hth

    Gerhard> Gerhard

    Gerhard> ------------------------------------------------------------------------
    Gerhard> DI Gerhard Thallinger E-mail:
    Gerhard> Gerhard.Thallinger at tugraz.at Institute for Genomics
    Gerhard> and Bioinformatics Web: http://genome.tugraz.at
    Gerhard> Graz University of Technology Tel: +43 316 873 5343
    Gerhard> Petersgasse 14/V Fax: +43 316 873 5340 8010 Graz,
    Gerhard> Austria Map: http://genome.tugraz.at/Loc.html

More information about the R-devel mailing list