[Openmcl-devel] Speeding up I/O

Waldek Hebisch hebisch at math.uni.wroc.pl
Thu Jul 23 13:51:23 PDT 2009


Ron Garret wrote:
> I'm trying to crunch a semi-large file (~500MB) and just reading the  
> data via (while (read-line f nil nil)) take about seven times longer  
> than it does in, say, Python (73 seconds versus 12).  Is there some  
> low-level I/O primitive that I can call that bypasses all the high- 
> level stream stuff that would speed this up?  %ioblock-unencoded- 
> character-read-vector maybe?  Or %ioblock-tyi?  Can I call these  
> directly without screwing things up?
>

Have you tried read-sequence into array of (unsigned-byte 8)?
IME this is portable way to do fast IO in Common Lisp.

-- 
                              Waldek Hebisch
hebisch at math.uni.wroc.pl 



More information about the Openmcl-devel mailing list