Default methods for jdk8: request for code review
Keith McGuigan
keith.mcguigan at oracle.com
Wed Oct 10 17:08:48 PDT 2012
You know I think I just picked it randomly as a prime that was close to
1024. I suppose by that criteria 1021 would have worked too.
Either of those are probably overkill, though. And you're right that
using a prime isn't necessary. Maybe I should change that to 256 or
something else a little more memory-usage-friendly.
Thanks!
--
- Keith
On 10/10/2012 7:59 PM, Vitaly Davidovich wrote:
> Hi Keith,
>
> In ResourceHashtable, how did you settle on size 1019? I see it's a
> prime so presumably you're worried about collisions? I'd think a power
> of 2 would give you some speed up as you can avoid the relatively
> expensive mod operation, but just curious what your thinking is here.
>
> Nice job on the "short" :) writeup by the way.
>
> Thanks
>
> Sent from my phone
>
> On Oct 10, 2012 1:12 PM, "Keith McGuigan" <keith.mcguigan at oracle.com
> <mailto:keith.mcguigan at oracle.com>> wrote:
>
> Hello,
>
> I'd like any review of the code which implements default methods in the
> JVM. This is destined for jdk8 as part of JSR 335 (Lambdas), and
> tracked by CR 7200776.
>
> The design and implementation is described in this short document:
> http://cr.openjdk.java.net/~kamg/default_methods_in_hotspot.txt
>
> And the code is here:
> http://cr.openjdk.java.net/~kamg/default_methods/
>
> Any review (even partial) would be appreciated. Thanks!
>
> --
> - Keith
>
More information about the hotspot-dev
mailing list