LinearProbeHashtable <was> Re: ClassValue perf?
Paul Sandoz
paul.sandoz at oracle.com
Fri May 27 17:28:08 UTC 2016
Hi Peter,
> On 27 May 2016, at 12:41, Peter Levart <peter.levart at gmail.com> wrote:
>
> Hi Paul,
>
> On 05/26/2016 01:20 PM, Paul Sandoz wrote:
>> Hi Peter,
>>
>> Opportunistically if your LinearProbeHashtable works out then i am wondering if we could replace the use of CHM within MethodType.ConcurrentWeakInternSet, which only uses get/putIfAbsent/remove.
>>
>> Thereby CHM can use VarHandles without inducing a circular dependency.
>>
>> Paul.
>
> It could be used, yes. LinearProbeHashtable is not scalable to multiple threads like CHM is for modifications as it is using a single lock for all modification operations including rehashing, but it is lock-free for lookups, so for usecases such as caching, where lookups dominate and modifications are mostly performed in batches from single thread (when some subsystem initializes), it could be a viable alternative to CHM.
>
Or say expunging of stale entries?
> If it is moved to some jdk.internal subpackage and made public, I could add missing Map methods, mostly to be able to include it in MOAT tests.
>
> What do you think?
>
I think moving to say jdk.internal.util.concurrent makes sense. Keeping it lean and focused to the purpose it currently serves seems appropriate, so implementing Map might an unwanted embellishment, i would be inclined to write some focused tests and also leverage the contextual testing via it’s use within ClassValue (and maybe MethodType).
I should investigate updating MethodType and running the Octane benchmark...
Paul.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20160527/6791c62a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20160527/6791c62a/signature.asc>
More information about the mlvm-dev
mailing list