In OSX the
Java would allow only AppleScriptEngine (but that was before Nashorn and Java 8). I think OpenJDK/Oracle had port Javascript to any platform now.
As you said, the performance is much better (due new bytecode instructions) (before that there was Rhino which implements javascript for java but it might is hold compatibility with the old java versions). If I remember well, the actual implementation is based on ECMAScript 5.1 and is migrating to ECMAScript 6 (IDK which engine was before that but I would guess it might be older and outdated). The Nashorn is a key process to new tool that Oracle is building to make web application, which would make the border of the browser web page and the server side more integrated (it is named project avatar
https://avatar.java.net/ ).
Another interesting project appears after that (due the new bytecode and class definition)
Kindest regards,
Luan