Truffle makes it possible to implement a JITed dynamically-typed language simply by annotating actions on the AST. http://www.graalvm.org/docs/graalvm-as-a-platform/implement-... Here's an example of the addition operator from Graal's SimpleLanguage: @NodeInfo(shortName = "+") public abstract class SLAddNode extends SLBinaryNode { @Specialization(rewriteOn = ArithmeticException.class) protected long add(long left, lo…
GraalVM: Run Programs Faster Anywhere
31–40 of 218 posts
Re: GraalVM: Run Programs Faster Anywhere
#32Truffle makes it possible to implement a JITed dynamically-typed language simply by annotating actions on the AST. http://www.graalvm.org/docs/graalvm-as-a-platform/implement-... Here's an example of the addition operator from Graal's SimpleLanguage: @NodeInfo(shortName = "+") public abstract class SLAddNode extends SLBinaryNode { @Specialization(rewriteOn = ArithmeticException.class) protected long add(long left, lo…
Re: GraalVM: Run Programs Faster Anywhere
#33Truffle makes it possible to implement a JITed dynamically-typed language simply by annotating actions on the AST. http://www.graalvm.org/docs/graalvm-as-a-platform/implement-... Here's an example of the addition operator from Graal's SimpleLanguage: @NodeInfo(shortName = "+") public abstract class SLAddNode extends SLBinaryNode { @Specialization(rewriteOn = ArithmeticException.class) protected long add(long left, lo…
Re: GraalVM: Run Programs Faster Anywhere
#34Can someone please explain this? > Are you working on a Java application? Do you want a faster runtime? Enhance your code with JavaScript! First, the JVM already has the Nashorn JS engine. Second, if I'm "working on a Java app", that means that it's already running in a JVM. Where does the faster runtime come from? Is executing JS from Java using Graal faster than running actual Java code? Is it just faster than Nash…
Re: GraalVM: Run Programs Faster Anywhere
#35Can someone please explain this? > Are you working on a Java application? Do you want a faster runtime? Enhance your code with JavaScript! First, the JVM already has the Nashorn JS engine. Second, if I'm "working on a Java app", that means that it's already running in a JVM. Where does the faster runtime come from? Is executing JS from Java using Graal faster than running actual Java code? Is it just faster than Nash…
"Are you working on a Java application? Do you want a faster runtime?"
Graal provides an ahead of time compiler for Java, which can speed things up by removing JVM warm up time. I'm unsure how much faster Graal is compared to steady-state JVM.
"Enhance your code with JavaScript!"
Embedding Graal is an alternative to Nashorn.
Re: GraalVM: Run Programs Faster Anywhere
#36Can someone please explain this? > Are you working on a Java application? Do you want a faster runtime? Enhance your code with JavaScript! First, the JVM already has the Nashorn JS engine. Second, if I'm "working on a Java app", that means that it's already running in a JVM. Where does the faster runtime come from? Is executing JS from Java using Graal faster than running actual Java code? Is it just faster than Nash…
Here is a full list of reasons: http://www.graalvm.org/docs/why-graal/
Here are some (maybe a bit outdated, but independent) benchmarks comparing it to Nashorn: http://blog.nidi.guru/tech/javascript/2018/04/02/javascript-...
We have some way to go to beat V8.
Re: GraalVM: Run Programs Faster Anywhere
#37Truffle makes it possible to implement a JITed dynamically-typed language simply by annotating actions on the AST. http://www.graalvm.org/docs/graalvm-as-a-platform/implement-... Here's an example of the addition operator from Graal's SimpleLanguage: @NodeInfo(shortName = "+") public abstract class SLAddNode extends SLBinaryNode { @Specialization(rewriteOn = ArithmeticException.class) protected long add(long left, lo…
Someone I know wrote a Java implementation of the small VM for an open source project that had a simple C interpreter. My first thought was "wait, why?", until they mentioned that it was more than 10x faster and much, much easier to write and extend. You basically get a very good JIT engine for free. Not gonna underestimate Truffle after that.
https://github.com/oracle/graal/blob/master/truffle/docs/Lan...
If not. Please let me know.
Re: GraalVM: Run Programs Faster Anywhere
#38We changed the URL from the announcement post at https://blogs.oracle.com/developers/announcing-graalvm . Pretty sure the project page will be better for HN.
Re: GraalVM: Run Programs Faster Anywhere
#39Earlier quoted context omitted.
Someone I know wrote a Java implementation of the small VM for an open source project that had a simple C interpreter. My first thought was "wait, why?", until they mentioned that it was more than 10x faster and much, much easier to write and extend. You basically get a very good JIT engine for free. Not gonna underestimate Truffle after that.
Which one was it? Can you remember? One of these? https://github.com/oracle/graal/blob/master/truffle/docs/Lan... If not. Please let me know.
https://github.com/frodwith/jaque is the project though, which is an implementation of the Nock VM from Urbit
Re: GraalVM: Run Programs Faster Anywhere
#40I'm also curious if .net standard/c# support is being planned.