top | item 40811857

(no title)

michaelothomas | 1 year ago

The WasmGC version is twice as fast as the JS version.

discuss

order

cxr|1 year ago

And by "the JS version", you mean the Java version—compiled to run in the browser by targeting its JS engine. There is no JavaScript version. This is a consistent mistake made throughout your article.

It's not an especially rigorous or intellectually honest article. It's a good example of how software development differs from other disciplines. The sleights of hand used in this piece are something that ideally would be rooted out in peer review.

You're comparing JVM bytecode as a compilation target for Java programs vs using JS as an alternative bytecode for Java programs. Unsurprisingly, the former wins. Who knew.

bedatadriven|1 year ago

The primary point of the article is to compare two compilation targets for a single codebase: JS and WasmGC.

It's an extremely timely and interesting topic.

The performance of a third compilation target - JVM bytecode provides a useful baseline.

lesuorac|1 year 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.

azakai|1 year ago

Adding a comment here to note that the post was just updated to clarify that:

https://web.dev/case-studies/google-sheets-wasmgc#the_final_...

> The final result

> After all these optimizations, the final WasmGC version of Sheets achieves a calculation performance approximately twice as fast as JavaScript, representing a fourfold improvement from the starting point of the initial WasmGC version.

leonardinius|1 year ago

Initial Js version approx 1/3 of jvm; wasm gc is 2/3 of jvm speed then?