<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<font size="4" face="monospace">The approach seems promising. <br>
<br>
Note that the EntryMap type is fussy about hash values -- you
can't pass zero as a hash value. The `hashString(String)` method
ensured that the hash value was never zero. <br>
</font><br>
<div class="moz-cite-prefix">On 12/24/2023 11:11 AM, - wrote:<br>
</div>
<blockquote type="cite" cite="mid:CABe8uE1XP9VrdCodKY0Hv6WRiCPKVLL9hg0U-AQY7r-=WjWbtg@mail.gmail.com">
<div dir="ltr">Hi,<br>
<div>Since we are using ClassDesc quite often to represent Class
constants in Class-File API, yet it's costly to hash them (as
they are internal names in CP but descriptors in ClassDesc),
that Adam has created shortcuts to speed up fetching of Object
CE from CD_Object, I have thought of a new tactic to hash
ClassEntry by full descriptor than by internal name alone.</div>
<div><br>
</div>
<div>I have made a prototype at <a href="https://github.com/liachmodded/jdk/commit/2932a560b0029352f1309883b3c5eecfb3d2c771" moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/liachmodded/jdk/commit/2932a560b0029352f1309883b3c5eecfb3d2c771</a></div>
<div><br>
</div>
<div>The idea is that hashing CE as descriptors is easier than
creating substrings for hashing; substring hashing is hard to
compute, but appending and prepending and hash is much easier.<br>
</div>
<div><br>
</div>
<div>Does this look like a good idea? I only included a test to
confirm its correctness, but haven't got time to bench it
against, say, the port of java.lang,invoke or ProxyGenerator.</div>
<div><br>
</div>
<div>Chen</div>
</div>
</blockquote>
<br>
</body>
</html>