mikemccand opened a new issue, #12992:
URL: https://github.com/apache/lucene/issues/12992

   ### Description
   
   At read-time the FST apis must read bytes in reverse, which is perverse and 
unnatural for all stacks in modern CPUs / IO devices that do read-ahead 
optimizations for forward reading.
   
   It's quite complex to change the underlying FST format to become 
fundamentally forward only.  It'd require rewriting node addresses, which may 
then take different numbers of `vInt` bytes, causing more renumbering, etc.
   
   A simpler first step might be, at FST `freeze()` time (when the FST is done 
being compiled), reverse all bytes in the underlying storage (on disk or on 
heap), and at read time, pretend to the caller that they are still reading 
backwards, yet actually read forwards.  We could even do this separately for 
each store, e.g. start by testing on-heap read-time double reversal, or maybe 
start with on-disk where the OS's readahead optimizations may matter more.
   
   It should be relatively trivial to implement yet hard to think about, and we 
could see if it helps performance.


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