Live data from Hacker News

Gluon – A configurable and small virtual machine which runs Erlang BEAM bytecode

github.com

41–50 of 70 posts

Re: Gluon – A configurable and small virtual machine which runs Erlang BEAM bytecode

#41
post #27

Earlier quoted context omitted.

Given the not-all-that-great improvement of a targeted attempt to speed up Erlang with HiPE, I wouldn't hold your breath for how well a non-targeted approach would go. Unfortunately, Erlang-the-language has several features that seem to be fundamentally slow, in that I've never seen any runtime that goes quickly with them. (A lot of memory copying, for one, even after being as clever as possible with optimizations on…

HiPE was done a long time ago, and I don't think it tried to use any particularly sophisticated techniques even at the time. Modern compilation techniques such as powerful escape analysis and partial evaluation may be able to do something new. GraalVM runs Ruby about 10x faster than standard Ruby, for example.

"GraalVM runs Ruby about 10x faster than standard Ruby, for example."

Which puts it roughly up against the plateau I observe for dynamically-typed languages across the board, except LuaJIT (which AIUI compromises the dynamicness a bit to get there). Ruby is a great deal more than 10x slower than optimal (which is still roughly C, though keep an eye out on that as languages continue to challenge it).

Based on the way Erlang works, I wouldn't expect it to get much past two times faster than it already is no matter how much money is poured into it.

I remember hearing the line about how there are no slow languages, only slow implementations, back in the early 2000s, when we didn't have any implementations of dynamic scripting languages that had really had a lot of effort poured into them, by modern standards. In 2018, we have numerous such implementations with vast, vast amounts of work poured into them. They are faster than they used to be... and they are still meaningfully slower than optimal. (And eat about 10-20x times the RAM in the process.) Erlang doesn't do all the bad things that Python or Ruby do to make them slow, but it does add a lot of memory copying that Python and Ruby don't do, and which is probably not as reducible as you'd like no matter how you optimized it (the low-hanging fruit, after all, is already in current Erlang).

To be honest, if you like Erlang but you need the next step up in performance and are willing to lose a few guarantees to get there (a very common tradeoff in optimization, after all), the answer is Go, not waiting for a much faster Erlang. Go is significantly faster than Erlang, Go does not have Erlang's memory isolation, and these statements are deeply connected together, not just coincidence.

Re: Gluon – A configurable and small virtual machine which runs Erlang BEAM bytecode

#43
post #26

Greetings! Author is here. We have no idea how this blog draft escaped into HN, but here it is a few years too late. The Gluon project https://github.com/kvakvs/gluonvm1 isn't live anymore, it was using C++ and it was stopped a couple years ago giving way to other experiments ( https://github.com/kvakvs/E4VM ) and finally to ErlangRT mentioned below https://github.com/kvakvs/ErlangRT My talk with me explaining the wh…

were you ever able to feed in size savings back to Ericsson? Especially since OTP got relicensed?

Re: Gluon – A configurable and small virtual machine which runs Erlang BEAM bytecode

#44
post #26

Greetings! Author is here. We have no idea how this blog draft escaped into HN, but here it is a few years too late. The Gluon project https://github.com/kvakvs/gluonvm1 isn't live anymore, it was using C++ and it was stopped a couple years ago giving way to other experiments ( https://github.com/kvakvs/E4VM ) and finally to ErlangRT mentioned below https://github.com/kvakvs/ErlangRT My talk with me explaining the wh…

were you ever able to feed in size savings back to Ericsson? Especially since OTP got relicensed?

This would mean huge refactoring, which i'm sure they'd never accept. The only way to go was to start something my own or fork. OTP team prefers changes which do not degrade performance, as I'm essentially optimising for size, while they optimise for speed and compatibility.

Re: Gluon – A configurable and small virtual machine which runs Erlang BEAM bytecode

#45
post #26

Greetings! Author is here. We have no idea how this blog draft escaped into HN, but here it is a few years too late. The Gluon project https://github.com/kvakvs/gluonvm1 isn't live anymore, it was using C++ and it was stopped a couple years ago giving way to other experiments ( https://github.com/kvakvs/E4VM ) and finally to ErlangRT mentioned below https://github.com/kvakvs/ErlangRT My talk with me explaining the wh…

If you'd like to update the post instead of removing it altogether we can put the link back, but we've gone with the GitHub repo for now.

Re: Gluon – A configurable and small virtual machine which runs Erlang BEAM bytecode

#47
post #41

Earlier quoted context omitted.

HiPE was done a long time ago, and I don't think it tried to use any particularly sophisticated techniques even at the time. Modern compilation techniques such as powerful escape analysis and partial evaluation may be able to do something new. GraalVM runs Ruby about 10x faster than standard Ruby, for example.

"GraalVM runs Ruby about 10x faster than standard Ruby, for example." Which puts it roughly up against the plateau I observe for dynamically-typed languages across the board, except LuaJIT (which AIUI compromises the dynamicness a bit to get there). Ruby is a great deal more than 10x slower than optimal (which is still roughly C, though keep an eye out on that as languages continue to challenge it). Based on the way…

None of them had the research money that JavaScript has enjoyed though.

Also lets not forget C was quite slow in 8 and 16 bit systems, and it only became as fast thanks to the joy of UB and -O3.

Re: Gluon – A configurable and small virtual machine which runs Erlang BEAM bytecode

#48
post #28

Is the art created from the same artist that did art for the book learnyousomeerlang.com? I'm glad Erlang and Elixir are slowly getting popular and going into other spaces such as hardware apparently.

The technology for the art is called Wacom Bamboo and I was overdrawing the Erlang logo with some hand scribbles in Inkscape. In fact same technology seems to be used for the original LYSE book and I was using it to translate text in images in Russian translation for the LYSE book.

For Learn You Some Erlang, I used hand-made drawings that I would scan, and then trace over using either photoshop (initially) and then Illustrator (when I knew the book would go to print).

Re: Gluon – A configurable and small virtual machine which runs Erlang BEAM bytecode

#49
post #45
post #26

Greetings! Author is here. We have no idea how this blog draft escaped into HN, but here it is a few years too late. The Gluon project https://github.com/kvakvs/gluonvm1 isn't live anymore, it was using C++ and it was stopped a couple years ago giving way to other experiments ( https://github.com/kvakvs/E4VM ) and finally to ErlangRT mentioned below https://github.com/kvakvs/ErlangRT My talk with me explaining the wh…

If you'd like to update the post instead of removing it altogether we can put the link back, but we've gone with the GitHub repo for now.

The original gluonvm1 project link is fine, as in its description there are links to its successors. Thank you for caring!
Post reply on HN