Overlapping IO with processing

2009-05-07 Thread Bradbev
I have a 25Mb CSV text file that I want to process. Simply running (time (dorun (read-lines file))) gives me about 1 second of read time, which is about as fast as you'll get (on my machine) I think. I believe that it should be possible to overlap the IO cost of reading from a file with

Re: Overlapping IO with processing

2009-05-07 Thread Laurent PETIT
2009/5/7 Bradbev brad.beveri...@gmail.com: I have a 25Mb CSV text file that I want to process.  Simply running (time (dorun (read-lines file))) gives me about 1 second of read time, which is about as fast as you'll get (on my machine) I think. I believe that it should be possible to overlap

Re: Overlapping IO with processing

2009-05-07 Thread Meikel Brandmeyer
Hi, Am 07.05.2009 um 17:19 schrieb Bradbev: This also leads me to think that it would be useful to have a function that precached a lazy seq, ie (pre-cache-seq 5 (range 1000)); returns a new lazy-seq that will keep 5 elements ahead by precaching on another thread. Maybe clojure.core/seque

Re: Overlapping IO with processing

2009-05-07 Thread Bradbev
On May 7, 9:26 am, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 07.05.2009 um 17:19 schrieb Bradbev: This also leads me to think that it would be useful to have a function that precached a lazy seq, ie (pre-cache-seq 5 (range 1000)); returns a new lazy-seq that will keep 5 elements