Skip to content

Instantly share code, notes, and snippets.

@szilard
Created November 4, 2015 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save szilard/f9d3387c47c5d79aa9ab to your computer and use it in GitHub Desktop.
Save szilard/f9d3387c47c5d79aa9ab to your computer and use it in GitHub Desktop.
H2O sum 1 bn numbers
install.packages("h2o", type="source", repos=(c("http://h2o-release.s3.amazonaws.com/h2o/rel-slater/9/R")))
library(h2o)
h2oServer <- h2o.init(nthreads = -1)
system.time({
d <- h2o.createFrame(h2oServer, rows = 1e9, cols = 1, missing_fraction = 0,
categorical_fraction = 0, binary_fraction = 0, integer_fraction = 0)
})
system.time({ s <- sum(d$C1) })
system.time({ for(i in 1:10) s <- sum(d$C1) })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment