search for: jjsa3

Displaying 1 result from an estimated 1 matches for "jjsa3".

Did you mean: jjsa
2004 Mar 27
1
Re: [S] scalability
...ux with a Xeon 2.4GHz and 1G of memory: set.seed(2) jja <- array(rnorm(3000*300*3), c(3000, 300, 3)) gc() system.time(jjsa <- apply(jja, 1:2, sum)) # takes 30 seconds sumS3 <- function(x, ...) UseMethod("sumS3") sumS3.default <- function(x, ...) sum(x, ...) gc() system.time(jjsa3 <- apply(jja, 1:2, sumS3)) # takes 65 seconds sumS4 <- function(x, ...) standardGeneric("sumS4") setMethod("sumS4", signature(x="numeric"), function(x, ...) sum(x, ...)) gc() system.time(jjsa4 <- apply(jja, 1:2, sumS4)) # takes 58 seconds Questions: It look...