Message-ID: <Pine.LNX.4.64.0610061606390.30258@tajo.ucsd.edu>
Date: 2006-10-06T23:23:37Z
From: Charles C. Berry
Subject: Extreme slowdown with named vectors. A bug?
In-Reply-To: <59d7961d0610061520g4510172bh6b7bbdf19b20b477@mail.gmail.com>
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