lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tatu Saloranta <t...@hypermall.net>
Subject BitVector, public byte[] bits
Date Tue, 11 Feb 2003 05:55:38 GMT
Just a quick question about BitVector implementation. Comments for
member variable 'bits' say:

  /** This is public just so that methods will inline.  Please don't touch.*/
  public byte[] bits;

I'm curious about whether this holds true generally... are JIT compilers known
not to inline methods that access protected/private fields? It seems bit 
counter-intuitive (or at least different from method handling, where private 
methods are primary candidates for inlining), but if this is the cases it's 
something good to know (for commonly used data struct classes at least).
[I tried Google search to find references, but couldn't find any... if someone 
has pointers that'd be great]

Has anyone tested performance on different JVMs to see how big the difference 
is? If there was no difference it'd be nice to properly encapsulate the 
variable. :-)

-+ Tatu +-


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


Mime
View raw message