This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 4.0.0 JNI/reflection invocation 2/4/8 times as slow as in 3.3.3


On Sat, 2005-01-22 at 23:06, Tom Tromey wrote:
> >>>>> "Jost" == Jost Boekemeier <jost2345@yahoo.de> writes:
> 
> Jost> -        table = new Object[old.length << 1 + 2];
> Jost> +        table = new Object[(old.length * 2) + 2];
> Jost> Imho the new implementation is nonsense.
> 
> The new implementation is really just the original reimplementation
> resurrected.
> 
> Jost> This hash is not a "normal" hash table with a list but it is an array
> Jost> where additional entries are stored above the current entry.  The
> Jost> implementation requires that empty slots appear between the
> Jost> keys/tombstones, otherwise the hash degenerates to a linear search.
> 
> Jost> So old.length << 2 could be a good value, or, as the original author
> Jost> decided old.length << 3.
> 
> I don't follow why that would be better.  Could you elaborate on this?
> 
> Tom

Either I'm missing something or the two at the top are identical, if <<
has higher precedence than +.  << 1 is equivalent to multiplication by
2.
-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

No software patents in Europe -- http://nosoftwarepatents.com

"Value your freedom, or you will lose it, teaches history.
`Don't bother us with politics' respond those who don't want to learn."
-- Richard Stallman

"We've all been part of the biggest beta test the world has ever known --
Windows"
-- Victor Wheatman, Gartner

Attachment: signature.asc
Description: This is a digitally signed message part


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]