Review request for JDK-8141425: Improve caching in NashornCallSiteDescriptor

Hannes Wallnoefer hannes.wallnoefer at oracle.com
Thu Nov 5 10:51:45 UTC 2015


+1


Am 2015-11-04 um 14:59 schrieb Attila Szegedi:
> Please review JDK-8141425 "Improve caching in NashornCallSiteDescriptor" at <http://cr.openjdk.java.net/~attila/8141425/webrev.jdk9> for <https://bugs.openjdk.java.net/browse/JDK-8141425>
>
> Few words on the implementation:
> - I went with one String->NamedOperation map per Nashorn operation, as this makes it unnecessary to create a NamedOperation to use as a key (and then have the map use its equals/hashCode)
> - I went with global caching, which necessitates using weak/weak synchronized maps. Alternatively, we could’ve used a per-class caching as for the call site descriptors themselves, but as one class is one function in Nashorn, that’d result in reuse of NamedOperation objects only within a single function. (But we’d get rid of both synchronization and use of weak references.)
>
> Thanks,
>    Attila.



More information about the nashorn-dev mailing list