Re:TeaVM: Build Fast, Modern Web Apps in Java
by paulgb on Sunday January 31, 2021 @11:04AM
(#25979756)
To piggyback on your request from someone who's tried it, I'm also curious about how this deals with the fact that Java is garbage collected but wasm (in itself) is not. Did they actually port a GC to wasm, or do they work around this in another way?
[ Parent
| on HN ]
Re:TeaVM: Build Fast, Modern Web Apps in Java
by shannah78 on Sunday January 31, 2021 @12:17PM
(#25980419)
The WASM port is experimental. The Javascript target produces better performance. For JVM languages it will always be the case that the Javascript target performance better than the WASM target, mostly because of GC.
For the WASM port the developer wrote his own GC.
Re:TeaVM: Build Fast, Modern Web Apps in Java
by pjmlp on Sunday January 31, 2021 @03:01PM
(#25982015)
Targeting WASM is just like targeting a CPU, most of them also don't have hardware support for GC algorithms.
Most anti-GC FUD regarding WASM and GC kind of stems from people not getting how GCs are implemented.
Re:TeaVM: Build Fast, Modern Web Apps in Java
by tyingq on Sunday January 31, 2021 @08:40PM
(#25984636)
They do have a GC on their roadmap, I assume to better support running languages that need a GC without having to pull their whole runtime into WASM. Isn't it fair to say WASM is somewhere in-between a CPU and a VM?
Re:TeaVM: Build Fast, Modern Web Apps in Java
by pjmlp on Monday February 01, 2021 @01:40AM
(#25986229)
There are CPUs with hardware GC support, then tagged memory is coming back into fashion as means to tame C derived languages, and most Assembly languages are actually processed by tiny runtimes (microcode), as the pure hardware based gates is long gone in most high performance CPUs.
So between a CPU and VM depends pretty much on how one looks at it.