[Cs254f11] Faster slurp

Wm. Josiah Erikson wjerikson at hampshire.edu
Mon Oct 24 14:37:14 EDT 2011


I was having serious problems with the speed of slurp in reading MIDI 
files. I found that the mmap version, clojure.contrib.mmap, which you 
can use by doing something like:

(require '[clojure.contrib.mmap :as mmap])

and then just call it as mmap/slurp

is much faster, as in like ~5 seconds instead of ~60 seconds for the 
file I'm slurping.


-- 
-----
Wm. Josiah Erikson
Network Engineer
Hampshire College
Amherst, MA 01002



More information about the Cs254f11 mailing list