gf2121 commented on pull request #602: URL: https://github.com/apache/lucene/pull/602#issuecomment-1012371355
Thanks @uschindler . > I don't fully understand the variant that supports negative values. Do we still need it as the default one again supports negative values. The code looks slightly different with the additional check at end. This is specialized because`DataInput`'s vlong uses the 10th byte to express the negative/postive while the implementation in `BlockPackedReaderIterator` uses 8th bit of 9th byte (b9 & 0x80) to express. > In general we now longer can detect invalid vlongs/vints when reading. Should we maybe add a check at end? I am not sure if this can be done without additional branching. My idea would be to use the loop till one before last and add the code at end. But this makes method longer again, possibly breaking inlining. I'd like to try to add some check for it if this version of code can work well. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
