search for: p20368695

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

2008 Nov 06
3
.C(..., DUP=FALSE) memory costs depending on input size?
...size dependent latency? The only reason I can think of is that these vectors are being copied along the way. What follows is both the R and C code which I use only for testing and a plot of both measurements with DUP=TRUE and DUP=FALSE: (RED: DUP=FALSE, GREEN: DUP=TRUE) http://www.nabble.com/file/p20368695/CandR.png R code: ---------- # sequence from 512 to 2^23 with 2^17 stepsize a <- seq(512, 2^23, 2^17) # storage for wall time h <- length(a); j <- length(a) for (i in 1:length(a)) { x <- as.double(1:a[i]) y <- as.double(x) # system.time()[3] is (actual) wall time...