Please review JDK-8059321
marcus.lagergren at oracle.com
Mon Sep 29 18:45:05 UTC 2014
OK. New webrev here http://cr.openjdk.java.net/~lagergren/8059321.2/webrev/
I experimented a bit with synchronization methods, and this seems to be the one that gives the least overhead - there is actually very little difference and 95% of the original performance increase is preserved.
(I also experimented with your ‘one extra recompile’ in CompiledFunction, and applied that diff - this brings us down another ~600 ms, which is nice indeed).
Let me know if this is semantically sound. From reading the OpenJDK code, I think it is.
On 29 Sep 2014, at 11:22, Aleksey Shipilev <aleksey.shipilev at oracle.com> wrote:
> Yes, that's a simple adapter:
> See the example there.
> On 09/29/2014 10:10 PM, Marcus Lagergren wrote:
>> Aleksey - I still need the weak semantics, because I don’t want to hold on to the strings. Would that work for the WeakHashMap and preserve semantics? #iamnotajavaprogrammer.
>>> The entire shenanigan would go away if you turn the Map into Set with
>>> Collections.newSetFromMap(...), and then do add().
More information about the nashorn-dev