FWIW (which is not much), I did a simple test comparing:

a) Streaming a file into byte[] chunks each 512 bytes long, then iterating
over the entire list of chunks and reading each one as 128
little-endian ints.

b) Memory mapping the entire file, setting order = LITTLE_ENDIAN, and
reading entire file int by int.

For a 50 MB file, (a) takes ~1350 ms and (b) takes ~550 ms.

Now go back up to the top and change a set of bytes in the middle of the first chunk with the offsets of the various chunks. Tell me how fast that is.

-Andy

I agree that saving 800 ms isn't that great, but as a bonus you also
save 50 MB of RAM! :)

-Chris

--
To unsubscribe, e-mail: <mailto:poi-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:poi-dev-help@;jakarta.apache.org>




--
To unsubscribe, e-mail:   <mailto:poi-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:poi-dev-help@;jakarta.apache.org>

Reply via email to