dungba88 opened a new pull request, #12879:
URL: https://github.com/apache/lucene/pull/12879

   ### Description
   
   This is the same with #12624, except for a slight change in implementation 
of `ReadWriteDataOutput`. This PR keeps the original implementation that 
BytesStore did, to make sure there is no regression. My theory is that 
ReverseRandomAccessReader need to seek the correct buffer on every `readByte`, 
and reading from the ByteBuffer has some (small) overhead comparing to 
accessing from the byte array directly. But these should have insignificant 
impact on the performance. More extensive benchmark is needed.
   
   Using Test2BFST, there is some improvement over the `ByteBuffersDataInput`:
   
   ### ReverseRandomAccessReader with ByteBuffersDataInput
   
   ```
     1> TEST: now verify [fst size=4621076364; nodeCount=2252341486; 
arcCount=2264078585]
     1> 0...: took 0 seconds
     1> 1000000...: took 27 seconds
     1> 2000000...: took 54 seconds
     1> 3000000...: took 82 seconds
     1> 4000000...: took 109 seconds
     1> 5000000...: took 137 seconds
     1> 6000000...: took 165 seconds
     1> 7000000...: took 192 seconds
     1> 8000000...: took 219 seconds
     1> 9000000...: took 247 seconds
     1> 10000000...: took 275 seconds
     1> 11000000...: took 300 seconds
   ```
   
   ### This PR
   
   ```
     1> TEST: now verify [fst size=4621076364; nodeCount=2252341486; 
arcCount=2264078585]
     1> 0...: took 0 seconds
     1> 1000000...: took 22 seconds
     1> 2000000...: took 44 seconds
     1> 3000000...: took 66 seconds
     1> 4000000...: took 89 seconds
     1> 5000000...: took 111 seconds
     1> 6000000...: took 133 seconds
     1> 7000000...: took 155 seconds
     1> 8000000...: took 178 seconds
     1> 9000000...: took 200 seconds
     1> 10000000...: took 222 seconds
     1> 11000000...: took 245 seconds
   ```


-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to