[Rd] Extreme slowdown with named vectors. A bug?
Charles C. Berry
cberry at tajo.ucsd.edu
Sat Oct 7 01:23:37 CEST 2006
Another example:
> avec <- 1:55000
> names(avec) <- as.character(avec)
> system.time(avec[names(avec)[1:39045]])
[1] 0.06 0.00 0.07 NA NA
> system.time(avec[names(avec)[1:39046]])
[1] 23.89 0.00 23.94 NA NA
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor 4.0
year 2006
month 10
day 03
svn rev 39566
language R
version.string R version 2.4.0 (2006-10-03)
FWIW, this example shows similar behavior on R-2.2.0 Linux.
On Fri, 6 Oct 2006, Henrik Bengtsson wrote:
> Tried the following with R --vanilla on the Rv2.4.0 release (see
> details at the end). I think the script and its comments speaks for
> itself, but the outcome is certainly not wanted.
>
[snip]
Charles C. Berry (858) 534-2098
Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu UC San Diego
http://biostat.ucsd.edu/~cberry/ La Jolla, San Diego 92093-0717
More information about the R-devel
mailing list