jprante/elasticsearch-lang-javascript-nashorn — pull request #1 by hmalphettes (2014-03-09 10:40:32+00:00)
Title: Use --global-per-engine for performance reason

This nashorn option shares the definition of the builtin Ecma script objects: Object, Function etc.
When that option is enable NashornSimpleBench completes in 1 second or so:
```
Bench Nashorn... 100000 iterations.
Execute Took: 1s
Executable Took: 14ms
Executable (vars) Took: 34ms
```
Without that option, it is about 10 times slower although I used 100 times less iterations.
```
# WITHOUT: --global-per-engine
Bench Nashorn... 1000 iterations.
Execute Took: 4.3s
Executable Took: 30ms
Executable (vars) Took: 30ms

# WITH: --global-per-engine
Bench Nashorn... 1000 iterations.
Execute Took: 33ms
Executable Took: 4ms
Executable (vars) Took: 7ms
```
I hope this helps.