Live data from Hacker News

GraalVM: Run Programs Faster Anywhere

graalvm.org

71–80 of 218 posts

Re: GraalVM: Run Programs Faster Anywhere

#72
post #68
post #62

Earlier quoted context omitted.

Is it Oracle Oracle, or Oracle SUN product? BTW, it sounds pretty cool, I am wondering how do you convert between complex datatypes while passing parameters between different languages and not losing much speed with it?

Me too. I’m thinking there must be some library that knows how to marshal between object representations. Surely Graal doesn’t have universal objects that suit every language.

That's the thing - there is no marshaling. The objects are passed between the languages as pointers under-the-hood. There is a standard way of invoking methods/functions on those pointers, that works across all languages.

Re: GraalVM: Run Programs Faster Anywhere

#73
post #39

Earlier quoted context omitted.

It's not listed there, and didn't reach full feature parity (and seems to be dead now). https://github.com/frodwith/jaque is the project though, which is an implementation of the Nock VM from Urbit

Ho wow, never heard of it. Will put it on the experiments list. Thanks a lot!

Hi, author of jaque here. I've been working on some other things for a little while, but I'll be getting back to jaque soon. It's quite out of date and needs to be brought up to 1.0 and cleaned up a bit before I start grousing about the stack issues I was running into on the mailing list, but when I last was working on it I was running into issues with Graal when trying to increase the java stack size. Deep but bounded head recursion is quite common in nock, and I seem to recall I needed about 8 megs of stack space (I just passed -Xss 8m or something on the command line) and Graal slowed waaaay down. That's where I left it.

Re: GraalVM: Run Programs Faster Anywhere

#74

Going to try it out, but does anyone know offhand whether GraalVM can be ran within the Linux subsystem in Windows 10?

If you can run a HotSpot JVM there then also GraalVM should work. I don't think we tested that.

Will let you know what I find out, thanks!

Edit: It works (for Ruby and Python)

Here is how to set up GraalVM for the Linux Subsystem on Windows 10:

1. Enable and Install Ubuntu for Windows 10: https://docs.microsoft.com/en-us/windows/wsl/install-win10

2. Download the EE edition of GraalVM to Windows: http://www.graalvm.org/downloads/

3. Mount the folder that has the tar file: https://stackoverflow.com/a/42586455/2548452

4. Unzip the files (tar xvfs graalvm-ee-1.0.0-rc1-linux-amd64.tar.gz)

5. Create a .bash_profile for setting the $PATH (my personal preference)

6. Follow the instructions from the following up until the "Running Programs": http://www.graalvm.org/docs/getting-started/

7. Follow instructions for installing LLVM and locales: https://github.com/oracle/truffleruby#system-compatibility

8. Follow instructions for installing libssl-dev: https://github.com/oracle/truffleruby/blob/master/doc/user/i...

9. NOW continue on with everything _after_ "Running Programs": http://www.graalvm.org/docs/getting-started/

Getting npm to work:

I could run node -v, but could not run npm and I was getting this error:

jvm library could not be loaded: /home/raj/graalvm/jre/lib/polyglot/libpolyglot.so: cannot enable executable stack as shared object requires: Invalid argument

I fixed it by running the following:

1. sudo apt-get install prelink

2. sudo execstack -c ~/graalvm/jre/lib/polyglot/libpolyglot.so

Going to do some experimenting, but so far so good!

Re: GraalVM: Run Programs Faster Anywhere

#76

Earlier quoted context omitted.

The Graal compiler is compiling Java code to faster machine code on top of the JVM. Also GraalVM's JavaScript implementation uses an entirely different approach by using Truffle for its implementation making it significantly faster. Also GraalVM ships with Node.js support, tooling and other languages. Here is a full list of reasons: http://www.graalvm.org/docs/why-graal/ Here are some (maybe a bit outdated, but indep…

From the provided link: - graal has superior compiler technology based off of a research paper [1] that: -- has superior ability to remove costly object allocations in many scenarios -- has better inlining and more aggressive speculative optimizations -- has smarter jit compilation [1] http://www.ssw.uni-linz.ac.at/Research/Papers/Stadler14/Stad... (pdf)

A few additional papers with details on Graal IR and optimizations:

http://lafo.ssw.uni-linz.ac.at/papers/2013_VMIL_GraalIR.pdf

https://dl.acm.org/citation.cfm?doid=2245276.2232084

http://aleksandar-prokopec.com/resources/docs/graal-collecti...

Re: GraalVM: Run Programs Faster Anywhere

#77

Keep in mind that while this is nice technology, it's Oracle-based, split in CE/EE (which in itself is not a problem, but CE doesn't run on macOS), and they will find a way to screw you over at some point in the future regardless of what you do, use or choose.

Oh come on, I'm no fan of Oracle but this is some FUD nonesense..

Re: GraalVM: Run Programs Faster Anywhere

#78

Can 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…

Note that Nashorn is very slow - Graal.JS is orders of magnitude faster, and its peak performance is very close to V8 (although with a somewhat slower startup, currently).

Re: GraalVM: Run Programs Faster Anywhere

#79

To what extent is this compatible with all existing libraries for allegedly supported languages? I'm also curious if .net standard/c# support is being planned.

You can check libraries here: http://www.graalvm.org/docs/reference-manual/compatibility/ We don't test all of them but many. We have considered .NET support but we are not actively working on it right now. But GraalVM is an open platform. Everyone can develop a language for it: http://www.graalvm.org/docs/graalvm-as-a-platform/

It would be hilarious to discover if C# runs better on the JVM then CLR.

Re: GraalVM: Run Programs Faster Anywhere

#80
post #64
post #7

Am I correct in reading the license in Github that this is all GPL? Albeit GPL2 but still not some Oracle proprietary license. "One VM to rule them all" reminds me of Parrot VM (for Perl 6). Looks like development slowed down a year or two ago. Back then, it got me excited as it looked like the "open source community" alternative to "Big Corporate Java". https://en.wikipedia.org/wiki/Parrot_virtual_machine

> "One VM to rule them all" Except a VM with a more liberal license could easily beat it in popularity.

Not in performance.
Post reply on HN