brettlounsbury commented on issue #101: IO-649 - Improve the performance of the 
contentEquals() methods.
URL: https://github.com/apache/commons-io/pull/101#issuecomment-578764319
 
 
   Hi @garydgregory,
   
   I don't see any comments from you other than the request for a benchmark. 
   
   I have updated IOUtils to include a test dependency on JMH and and to 
include a benchmark that shows BufferedInputStream.read() performance compared 
to InputStream.read(byte[]) performance.  This test creates an 8MB file on disk 
once before the benchmark is ran and reads it back in.  It then just keeps a 
running sum of the bytes in the file (and ignores any overflow/underflow) and 
blackhole's the sum at the end to avoid any compiler optimization.
   
   Results look something like this:
   Benchmark                                                        Mode  Cnt   
      Score        Error  Units
   SingleByteReadVsMultiByteReadPerformanceTest.testReadMultiBytes  avgt   25   
6220618.290 ± 204562.812  ns/op
   SingleByteReadVsMultiByteReadPerformanceTest.testReadSingleByte  avgt   25  
21740409.146 ± 711294.924  ns/op
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to