Adam Lee
Adam Lee

Reputation: 25748

Will memory mapped file be faster than BufferedStream?

Anyone has experience of performance comparison between memory mapped file and bufferedStream? Will memory mapped file be faster than BufferStream?

Upvotes: 2

Views: 666

Answers (1)

Peter Lawrey
Peter Lawrey

Reputation: 533530

Using a BufferedInput/Output will be faster and simpler for you, and often this matters more. ;)

You can get much the same throughput as the bottle neck is usually your underlying disk or storage. Even if you have a fast SSD you can get close to the maximum throughput with both ways of accessing data.

For latency of updates memory mapped files can be 10 - 100x faster. However, you rarely need this unless you also have a process attempting to read the file at a the same time.

Upvotes: 2

Related Questions