3 ms·
From that article "and produces smaller JavaScript that performs better in the browser". Not according to my benchmarks. That may be true if you use the GWT Wi
by cromwellian 6y ago
From that article "and produces smaller JavaScript that performs better in the browser".
Not according to my benchmarks. That may be true if you use the GWT Widget library, but if you code 'to the metal' using Elemental, GWT produced substantially smaller code than TeaVM when I benchmarked it a few years ago with the Bench2D (Box2D) benchmark. Maybe it got better since then, but I doubt it given the progress GWT's successor made. Using J2CL (the successor to GWT), the following Java class
public class Main {
public static void main(String argv[]) {
window.alert("Hello World");
}
}
would actually compile down to just (JS)
window.alert("Hello World")
TeaVM doesn't support code splitting that Both GWT and Closure Compiler support, or cross-module code motion.
https://github.com/konsoletyper/teavm/issues/333 https://github.com/konsoletyper/teavm/issues/333