easyice commented on issue #12826: URL: https://github.com/apache/lucene/issues/12826#issuecomment-1819090159
> Should we move this special encoding directly to DataInput/DataOutput? I feel we can reuse it when written more than 4 continuous var-integers(probably not very more), for instance in `Lucene90FieldInfosFormat#write()` can be change to: ``` if (fi.getPointDimensionCount() != 0) { output.writeGroupVInt( fi.getPointDimensionCount(), fi.getPointIndexDimensionCount(), fi.getPointNumBytes(), fi.getVectorDimension() ) } else { output.writeVInt(fi.getPointDimensionCount()); output.writeVInt(fi.getVectorDimension()); } ``` In addition, the object of `DataOutput` will requires an extra 17 bytes of memory. > This could help optimize the logic further on some Directory implementations? For instance, on MmapDirectory/Java 21 I can try to run a JMH benchmark for than. -- 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