Earlier quoted context omitted.
> BEAM doesn't support mutation, the JVM does. that's a big plus in the BEAMs corner. The JVM supports languages with mutation or without. That x86 supports mutation doesn't hinder, say, Haskell from being efficiently compiled to it. > Also when two BEAM VM speak to each other its as if they are just one machine. no serialization de serialization of data, no protobufs, etc. It's all just primitives being sent between…
It's important to highlight some key differences between the JVM and the Erlang VM (BEAM) when it comes to accommodating language semantics, fault tolerance, and process isolation. The JVM is designed as a general-purpose VM, aiming to accommodate a wide variety of languages with different semantics. This broad scope can sometimes lead to compromises when it comes to optimizing for specific language features or use c…
Erlang/OTP: Garbage Collector
51–60 of 79 posts
Re: Erlang/OTP: Garbage Collector
#52Earlier quoted context omitted.
I really strongly doubt that GC is a bottleneck for Erlang programs on either the BEAM or the JVM - the sophistication of the scheduler, and the way various language primitives interact with it, is where the BEAM is almost certainly gaining an edge over the JVM. That said, I'm sure there are a subset of programs that _would_ be faster on the JVM, just depends on what metrics are being compared.
> the sophistication of the scheduler, and the way various language primitives interact with it That was brought over to the JDK six months ago. The JDK can now spawn millions of Erlang-like processes ("virtual threads") per second. Erlang is a great inspiration and it does incredibly well with the development resources available to it, but it's hard to compete with the level of engineering investment in the JDK and…
In my opinion, trying to replicate ERTS on top of another virtual machine either requires making that virtual machine more like the BEAM, or will end up always playing catch up with the BEAM itself in some aspect. That's just my two cents though.
Re: Erlang/OTP: Garbage Collector
#53Earlier quoted context omitted.
> BEAM doesn't support mutation, the JVM does. that's a big plus in the BEAMs corner. The JVM supports languages with mutation or without. That x86 supports mutation doesn't hinder, say, Haskell from being efficiently compiled to it. > Also when two BEAM VM speak to each other its as if they are just one machine. no serialization de serialization of data, no protobufs, etc. It's all just primitives being sent between…
It's important to highlight some key differences between the JVM and the Erlang VM (BEAM) when it comes to accommodating language semantics, fault tolerance, and process isolation. The JVM is designed as a general-purpose VM, aiming to accommodate a wide variety of languages with different semantics. This broad scope can sometimes lead to compromises when it comes to optimizing for specific language features or use c…
Re: Erlang/OTP: Garbage Collector
#54Earlier quoted context omitted.
> the sophistication of the scheduler, and the way various language primitives interact with it That was brought over to the JDK six months ago. The JDK can now spawn millions of Erlang-like processes ("virtual threads") per second. Erlang is a great inspiration and it does incredibly well with the development resources available to it, but it's hard to compete with the level of engineering investment in the JDK and…
The BEAM is so much more than just a green thread runtime - and it is not straightforward at all to just "bring it over" to another virtual machine, the entire BEAM VM is designed around the scheduler, and core features such as signals (used most notably for links/monitors, but also for a number of other system features) and messaging, are deeply integrated with the scheduler; as are system tasks, execution of NIFs (…
Re: Erlang/OTP: Garbage Collector
#55Earlier quoted context omitted.
I think you may be missing the point. What the JVM doesn't have is elaborate optimizations to support copies, e.g. a generational GC.
The JVM has a selection of four generational GCs. Two of them are the most sophisticated GCs available anywhere. It's not a matter of some unique brilliance. Java is simply in such high demand that it has the sufficient resources to have state of the art optimising compilers and GCs.
Re: Erlang/OTP: Garbage Collector
#56Earlier quoted context omitted.
I think you may be missing the point. What the JVM doesn't have is elaborate optimizations to support copies, e.g. a generational GC.
Hm? G1 is a generational GC? And so is Serial/Parallel. And work on generational ZGC is ongoing [1]. Not sure what you're referring to here. [1]: https://openjdk.org/jeps/439
Re: Erlang/OTP: Garbage Collector
#57Earlier quoted context omitted.
It's important to highlight some key differences between the JVM and the Erlang VM (BEAM) when it comes to accommodating language semantics, fault tolerance, and process isolation. The JVM is designed as a general-purpose VM, aiming to accommodate a wide variety of languages with different semantics. This broad scope can sometimes lead to compromises when it comes to optimizing for specific language features or use c…
OpenJDK's new GC doesn't require STW pauses, the JDK offers preemptive scheduling for millions of threads as well as supervision trees -- although, to be fair, these are recent changes that have, at least in part, been inspired by Erlang. All that is on top of one of the world's most capable compilers. I have long admired Erlang and its passionate community as well as how much they've been able to accomplish (and, as…
There's no world, where I'd allow for some future developer to write some Java on the same VM as my Erlang/Elixir code and risk the entire VM crashing.
JVM and Erlang's VM cater to different needs and programming paradigms. While they might share some features or learn from each other's innovations, they are not direct competitors but rather address unique use cases and development requirements.
People who want Erlang are going to reach for Erlang/OTP. People who want Scala/Akka/Java-monolith will leverage the JVM.
Replatforming, doesn't happen often.
No one is hopping from one platform for the other.
Re: Erlang/OTP: Garbage Collector
#58Earlier quoted context omitted.
OpenJDK's new GC doesn't require STW pauses, the JDK offers preemptive scheduling for millions of threads as well as supervision trees -- although, to be fair, these are recent changes that have, at least in part, been inspired by Erlang. All that is on top of one of the world's most capable compilers. I have long admired Erlang and its passionate community as well as how much they've been able to accomplish (and, as…
To be a competitor, to be fair, implies there's competition. ¯\_(ツ)_/¯. There's no world, where I'd allow for some future developer to write some Java on the same VM as my Erlang/Elixir code and risk the entire VM crashing. JVM and Erlang's VM cater to different needs and programming paradigms. While they might share some features or learn from each other's innovations, they are not direct competitors but rather addr…
BTW, my point is that can now be a very good platform for Erlang/OTP. Its performance will allow Erlang/Elixir programs to reduce their reliance on native code and to handle higher loads.
Re: Erlang/OTP: Garbage Collector
#59Earlier quoted context omitted.
The JVM has a selection of four generational GCs. Two of them are the most sophisticated GCs available anywhere. It's not a matter of some unique brilliance. Java is simply in such high demand that it has the sufficient resources to have state of the art optimising compilers and GCs.
Really? I had no idea. Can you suggest further reading?
Re: Erlang/OTP: Garbage Collector
#60Earlier quoted context omitted.
To be a competitor, to be fair, implies there's competition. ¯\_(ツ)_/¯. There's no world, where I'd allow for some future developer to write some Java on the same VM as my Erlang/Elixir code and risk the entire VM crashing. JVM and Erlang's VM cater to different needs and programming paradigms. While they might share some features or learn from each other's innovations, they are not direct competitors but rather addr…
What do you mean by "the entire VM crashing"? The JVM is no more susceptible to crashes than BEAM. BTW, my point is that can now be a very good platform for Erlang/OTP. Its performance will allow Erlang/Elixir programs to reduce their reliance on native code and to handle higher loads.