Skip to content

Instantly share code, notes, and snippets.

@fbmnds
Created July 10, 2013 19:16
Show Gist options
  • Select an option

  • Save fbmnds/5969283 to your computer and use it in GitHub Desktop.

Select an option

Save fbmnds/5969283 to your computer and use it in GitHub Desktop.
(def test-file "/path/to/datafile-4gb.tsv")
;;
;; here is the work done - iota does very fast file consumption into memory
;;
user> (time (def test-vec (iota/vec test-file)))
"Elapsed time: 21187.659866 msecs"
#'user/test-vec
user> (/ 21187.659866 81299000)
2.6061402804462543E-4
;;
;; super-fast, as it is a in-memory operation
;;
user> (time (count test-vec))
"Elapsed time: 0.047906 msecs"
81299000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment