PeterAlfredLee commented on pull request #113:
URL: https://github.com/apache/commons-compress/pull/113#issuecomment-730879784


   I have tested using your bench on my computer and got this :
   ```
   Benchmark                                        Mode  Cnt   Score    Error  
Units
   ReadLargeTarBenchmark.readAllEntries_tarFile     avgt   10   5.601 ±  0.061  
 s/op
   ReadLargeTarBenchmark.readAllEntries_tarStream   avgt   10   6.728 ±  0.012  
 s/op
   ReadLargeTarBenchmark.readFirstEntry_tarFile     avgt   10   2.279 ±  0.017  
 s/op
   ReadLargeTarBenchmark.readFirstEntry_tarStream   avgt   10   0.001 ±  0.001  
 s/op
   ReadLargeTarBenchmark.readLastEntry_tarFile      avgt   10   2.266 ±  0.020  
 s/op
   ReadLargeTarBenchmark.readLastEntry_tarStream    avgt   10  13.068 ±  0.030  
 s/op
   ReadLargeTarBenchmark.readSecondEntry_tarFile    avgt   10   2.257 ±  0.012  
 s/op
   ReadLargeTarBenchmark.readSecondEntry_tarStream  avgt   10   0.001 ±  0.001  
 s/op
   ```
   
   The score is average time by setting `BenchmarkMode` to `Mode.AverageTime`. 
I'm testing with linux-4.4.tar, which has a size of 618MB with 55708 entries. 
I'm testing on my machine : Windows10, SSD, Java 8.
   
   The result is interesting. Seems the `tarFile` needs an extra 2.65s to read 
all entries. `readAllEntries_tarStream` is slower than 
`readAllEntries_tarFile`, and `readLastEntry_tarStream` is even slower than 
eithor. Will try to figure out what's going on here.


----------------------------------------------------------------
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:
[email protected]


Reply via email to