Skip to content

Instantly share code, notes, and snippets.

@nwstephens
Last active June 1, 2016 17:38
Show Gist options
  • Select an option

  • Save nwstephens/386ed60eae8d08bc545c323f2e463c6c to your computer and use it in GitHub Desktop.

Select an option

Save nwstephens/386ed60eae8d08bc545c323f2e463c6c to your computer and use it in GitHub Desktop.
library(microbenchmark)
N <- 1000
X <- matrix(rnorm(N*10), nrow = N)
y <- rnorm(N)
write.csv(X, outfile <- tempfile())
microbenchmark(
Compute = lm.fit(X, y),
Write = write.csv(X, outfile),
Read = read.csv(outfile),
times = 10
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment