6 ms·
Rhino has pretty good performance. It's about 1.6x Java's performance which made it pretty darn fast for most scripting languages built on the JVM. I would ex
by chubbard 14y ago
Rhino has pretty good performance. It's about 1.6x Java's performance which made it pretty darn fast for most scripting languages built on the JVM. I would expect this new project will follow the ScriptEngine API so you could swap out a Rhino interpreter with Nasborn engine. This would make it easy to compare how much the InvokeDynamic instruction can contribute to performance boost. I wonder if it can achieve near Java performance parity.
- pbiggar 14y agoWhat does it mean to be about 1.6x Java's performance? Can you be specific - it doesn't seem to mean much since its implemented on the JVM. Also, I've been using it recently and "dog slow" is how I would describe it.
- scubaguy 14y agoIt means algorithms runs 1.6x faster within Rhino. A JVM implemented in Rhino that runs Rhino within the JS-JVM will run even faster - roughly 2.56x faster.
- Cthulhu_ 14y agoWhich algorithms, what implementations thereof?
- jhdevos 14y agoWow! So, with an infinite stack of Rhino inside JVM inside Rhine ..... you could get infinite performance! Cool....
- _quasimodo 14y agoIt's Rhinos all the way down ...
- chubbard 14y agoRoughly performance tests have shown: Java Performance (ms) * 1.6 = Compiled Rhino Performance (ms). So Rhino is about 60% slower than comparable Java code if you compile it to byte code on average.
- wmf 14y agoSetting aside what 1.6x means, Rhino is much much slower than V8 or Java. In fact, there's a bit of an elephant in the room here because people don't really care about Nashorn vs. Rhino; they care about Nashorn vs. V8.
- kybernetikos 14y agoMy sudoku solver http://dancing-links.herokuapp.com/ http://dancing-links.herokuapp.com/ in javascript takes roughly a tenth of the time to solve a particular puzzle when running in node/V8 than in Rhino.
- chubbard 14y agoThere is a big difference between interpreted rhino vs. compile rhino. The Rhino wikipedia page claims compiling to byte code "... produced the best performance, often beating the C implementation of JavaScript run with just-in-time". However, the benchmarks I've seen put Rhino compiled to byte code at about 60% slower than comparable Java code.