Skip to content
Prev 39772 / 63424 Next

sort.int(S3object) strips class but not the is.object flag

The misleading is.object flag can also affect
the time it takes to sort objects (it looks like
xtfrm is only called when is.object reports TRUE):
  > system.time(for(i in 1:1e5) order(y)) # is.object(y) is TRUE
     user  system elapsed 
    12.07    0.00   11.28 
  > system.time(for(i in 1:1e5) order(t)) # is.object(t) is FALSE
     user  system elapsed 
     1.98    0.01    2.01

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com