[antlr-interest] Re: Java memory mapped IO is slow for big files :(

Terence Parr parrt at cs.usfca.edu
Wed Nov 17 16:01:57 PST 2004



On Nov 17, 2004, at 2:22 PM, lgcraymer wrote:
> Ter--
>
> Given the normal variations in timing, it looks like memory-mapped I/O
> and char[file] are almost identical.

Almost...mmap has a slight advantage; I can crank up n very large and 
still see it (for small files).

>   That is reasonable--they should
> be pretty close, and the figures look right:  for the large file,
> reading the entire file will be slightly faster than paging the
> mmapped file, but for the large file, mmap will page in 4K while the
> char[size-of-file] will do two separate accesses.

What do mean by two accesses?

>   What do you bet
> that the difference between those and the buffered read() is bounds
> checking?

both have to check an array though right?

Ter
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com
Cofounder, http://www.knowspam.net enjoy email again!





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the antlr-interest mailing list