|
|
|
|
|
by lesuorac
717 days ago
|
|
It's not a mistake. The JS was converted to Java and at that time was _at worst_ 5% slower. This might be a shock to you that J2CL is actually good enough to get the same performance as hand-written JS but it's been measured. There was a similar effort done where the Docs Android app began to run on Java instead of J2CL output and I guess you should be surprised to learn that it was actually slower and significant work had to be put in to make Java running in the JVM faster than that Java (via J2CL) running within a JSVM. |
|
Then that's worse. Because it means that the misleading way the article is written is deliberate.
> This might be a shock to you that J2CL is actually good enough to get the same performance as hand-written JS but it's been measured.
This is such an obnoxious comment when it doesn't have to be, and it's orthogonal to the issue at hand—which is that a Java program compiled to one or more object files that are nevertheless ECMA262-compliant so that it can run on V8 is still a Java program, in the same way that a when you compile a Java program to JVM bytecode, it doesn't stop being a Java program.
There is no "the JavaScript version". There is only the Java version built for different compilation targets. It's not possible to frame it any other way and still be rigorously honest about the results presented here.
(And it's telling that nobody taking issue with my criticism here, and who have proferred a defense of the article that amounts to equivocation, is willing to defend the other passage that I called out that is exemplary of the { Confused XOR Dishonest } way that this article communicates its message. <https://news.ycombinator.com/item?id=40820423>)