https://github.com/maximenajim/java-vs-node-react-rendering-microbenchmark
This benchmark is reported to exhibit a significant performance regression that was introduced between 8u31 and 8u40.
Running the benchmark with -Xprof indicates a ca. 88 % profile for java.lang.invoke.MethodHandleNatives.setCallSiteTargetNormal; a JFR run (-XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:FlightRecorderOptions=defaultrecording=true,disk=true,dumponexit=true,dumponexitpath=react.jfr,stackdepth=1024) indicates megamorphism around calls to "construct" functions from "instantiateReactComponent" functions.
In principle, this can be due to either Nashorn or java.lang.invoke changes in between 8u31 and 8u40.
JFR log is attached.