A performance regression with the dust.js templating library was reported on nashorn-dev:
While the original report focuses on 8u05 vs 8u25, there is even a bigger regression to 8u40. While the reasons for the 8u25 regression are not very clear, the 8u40 regression is caused by the switch to dual fields representation. The problem here is that the '$len' and '$idx' properties switch between int and Object type a lot, and since this is a get/setAttr access the property maps are not cached in the callsite.
While it would not solve the deeper propblem with indexed access callsites, it seems we solve this particular case (and probably improve a lot of other code) by treating index nodes with string constant ids like regular property accesses.