Review request for JDK-8141425: Improve caching in NashornCallSiteDescriptor

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


Am 2015-11-04 um 14:59 schrieb Attila Szegedi:
> Please review JDK-8141425 "Improve caching in NashornCallSiteDescriptor" at <> for <>
> 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