t <- NULL for(i in 1:100){ # t <- c(t, system.time (d <- dens(x))[1]) t <- c(t, system.time (d2 <- cdens(x))[1]) } mean(t)