You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/08/24 16:26:51 UTC

[GitHub] [lucene] madrob commented on pull request #11715: RamUsageEstimator properly checks for Long cache

madrob commented on PR #11715:
URL: https://github.com/apache/lucene/pull/11715#issuecomment-1225956235

   I went looking for the previous change and found it in LUCENE-9117. Adding David for review request, since he was touching this last.
   
   The JLS spec requires an Integer cache of at least `[-128, 127]`, but in practice the upper bound can be higher. The Long cache is not required to exist, in current JVMs it looks like it is also hard coded for the same range, but no possibility to grow. I don't want to rely on vendor implementation of a JVM for the size of their boxed primitive caches though.
   
   Maybe an aggressive compiler will figure out how to remove the checks that I'm adding here as well and we'll be stuck with misleading behavior again? If so, the other option is to update the comment so we're not claiming to be VM-cache-aware.


-- 
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-unsubscribe@lucene.apache.org

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


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