Get nashron work in opnjdk8
Marcus Lagergren
marcus.lagergren at oracle.com
Fri Feb 8 07:45:49 PST 2013
Actually, Nashorn currently beats v8 on the splay benchmark in the Octane suite, but for pure number crunching tests like crypto we are still behind, as we don't have the luxury of our own native value representation - producing strongly typed Java byte code is rather high level for a runtime. We have several tricks up our sleeve though, both on the JVM side and in Nashorn itself, so this gap is expected to get smaller.
If you want to know more about how to implement dynamic languages on the JVM and get some performance out of it, I did a presentation at Devoxx last November that is freely available online. http://www.devoxx.com/display/DV12/Nashorn++Optimizing+JavaScript+and+Dynamic+Language+Execution+on+the+JVM
Regards
Marcus
On Feb 8, 2013, at 4:04 PM, Harsha Kumara <harsz89 at gmail.com> wrote:
> Yeap.I have build the nashron by checkout it.I'll run tests again compare
> with rhino.I went through some articles and some of articles express that
> nashorn is faster and perform well than v8 java script engine.But the
> performance of the v8 is still higher than the nashorn I guess.I did some
> bechmark test with v8 and nashorn.So far v8 perform well.Am I correct?are
> there a any ways to tune nashorn to perform faster?
>
> On Fri, Feb 8, 2013 at 8:01 PM, Hannes Wallnoefer <
> hannes.wallnoefer at oracle.com> wrote:
>
>> Am 2013-02-08 15:00, schrieb Harsha Kumara:
>>
>> I have locally build openjdk8 forest.Then I set java home to jdk8 which was
>> build from my local build.I think the way i ran jjs is not correct.Using
>> consoe I ran ./jjs then I got the console.Afterthat I manually load
>> javascript file using load function (ed:load("foo.js")) and call the
>> function.Is that correct?
>>
>>
>> If you were able to load and run JavaScript you probably did everything
>> right.
>>
>> However, if you just want to play with Nashorn the simpler option may be
>> to use an official JDK preview release from
>> http://jdk8.java.net/download.html. You can use the following command to
>> just get the Nashhorn sources:
>>
>> hg clone http://hg.openjdk.java.net/nashorn/jdk8/nashorn nashorn
>>
>> Hannes
>>
>>
>> Thanks!
>> On Fri, Feb 8, 2013 at 7:10 PM, Marcus Lagergren <marcus.lagergren at oracle.com> wrote:
>>
>>
>> Can you tell us how you run it in JJS?
>>
>> For the best current Nashorn performance, any build over Java8 b74 should
>> be used, as it contains significant fixes to the inlining in the JVM.
>> You probably need to give any microbenchmark a few warmup rounds for
>> performance to stabilize. If you only run one round, there will be too much
>> noise and warmup issues for results to be meaningful. This is especially
>> true with invoke dynamic based programs running on Java 8 now, as they
>> tend to warm up slower than standard "Java" programs.
>>
>> Running with the octane test harness in the Nashorn repo (modified to
>> provide multiple rounds for VM warmup)
>> (after doing ant externals to get the benchmarks)
>>
>> java -jar dist/nashorn.jar test/script/basic/run-octane.js --
>> test/script/external/octane/crypto.js --iterations 10 --verbose
>>
>> I get ~2000 points on my machine, where Rhino gives me ~850 points.
>>
>>
>> /M
>>
>>
>> On Feb 8, 2013, at 2:29 PM, Harsha Kumara <harsz89 at gmail.com> <harsz89 at gmail.com> wrote:
>>
>>
>> Yeah the problem is i'm not quite sure whether I have configure the
>>
>> nashorn
>>
>> correctly.I had run crypto test in v8 bench mark test suit in jjs console
>> it gives around 110ms to run the encryption operation where rhino just
>>
>> take
>>
>> around 31ms.My concern is how can I know whether I have correctly
>>
>> configure
>>
>> nashorn in my machine.
>> Thanks!
>>
>> On Fri, Feb 8, 2013 at 6:52 PM, A. Sundararajan <sundararajan.athijegannathan at oracle.com> wrote:
>>
>>
>> [Please reply to list as it will be record for similar queries from
>>
>> others
>>
>> as well]
>>
>> You said it is not as fast as rhino on your test. Is it possible to
>>
>> share
>>
>> your test or reduced version of it demonstrating performance issue?
>>
>> thanks
>> -Sundar
>>
>>
>> On Friday 08 February 2013 06:15 PM, Harsha Kumara wrote:
>>
>>
>> Hi!
>>
>> I have pull jdk8 and build it.Then I build nashron after setting java
>> home poiting to the jdk8.But ant build return with a javadoc error.I
>>
>> have
>>
>> the nashron jar which is build during the ant build.And I ran jjs
>> executable with a some test it's not fast as rhino.I wonder whether I
>>
>> need
>>
>> to other configuration to get nashron into play?
>> Thanks!
>>
>> On Fri, Feb 8, 2013 at 5:59 PM, A. Sundararajan <sundararajan.athijegannathan@**oracle.com<
>>
>> sundararajan.athijegannathan at oracle.com><mailto:
>>
>> sundararajan.**athijegannathan at oracle.com<
>>
>> sundararajan.athijegannathan at oracle.com>>>
>>
>> wrote:
>>
>> Hi,
>>
>> Nashorn has not yet hit the openjdk8 main repo. You need to pull
>> nashorn forest for now:
>>
>> http://hg.openjdk.java.net/**nashorn/jdk8<
>>
>> http://hg.openjdk.java.net/nashorn/jdk8>
>>
>> It'll be some time before nashorn hits main jdk8 repo. But, you
>> can pull the above forest in the interim and build it.
>>
>> -Sundar
>>
>>
>> On Friday 08 February 2013 02:07 PM, Harsha Kumara wrote:
>>
>> Hi!
>> I had tried to run some performance tests.But results are not
>> impressive
>> than I thought.I have build openjdk8 and set JAVA_HOME to
>> it.Then I have
>> build nashron.But when I run the jrunscript -q it still show
>> the rhino as
>> underline javascript engine.Then how can I configure it to use
>> nashron?
>> Thanks!
>>
>>
>>
>>
>>
>> --
>> /Harsha Kumara/
>> /Undergraduate/
>> /Department of Computer Science and Engineering/
>> /University of Moratuwa/
>> /Sri Lanka./
>>
>>
>> --
>> *Harsha Kumara*
>> *Undergraduate*
>> *Department of Computer Science and Engineering*
>> *University of Moratuwa*
>> *Sri Lanka.*
>>
>>
>>
>
>
> --
> *Harsha Kumara*
> *Undergraduate*
> *Department of Computer Science and Engineering*
> *University of Moratuwa*
> *Sri Lanka.*
More information about the nashorn-dev
mailing list