title: Nashorn performance on JDK 9 and JDK 10
body: <p>If you interpret the moment.js library using Nashorn on JDK 8, it runs in a couple of seconds:</p>
  
  <pre>
  time .../JDK8/bin/jjs moment-with-locales-2.22.2.js
  real    0m2.644s
  user    0m10.059s
  sys     0m0.287s
  </pre>
  
  <p>But do the same on JDK 9 or 10, and it's terrible:</p>
  
  <pre>
  time .../JDK10/bin/jjs moment-with-locales-2.22.2.js
  real    0m27.308s
  user    0m59.690s
  sys     0m1.353s
  </pre>
  
  <p>This is literally ten times slower. Is it just me?</p>
  
  <p>I know Nashorn is going to be deprecated, but should it not work properly while it is supported?</p>
  
  <p>Any suggestions? Workarounds?</p>