Hacker News new | past | comments | ask | show | jobs | submit login

They forgot to mention the final speedup:

>The initial version of Sheets Wasm showed calculation performance roughly two times slower than JavaScript.

>[...]

>Implementing speculative inlining and devirtualization—two very common optimizations—sped up calculation time by roughly 40% in Chrome.

So the only numbers we get are 2x slowdown and the 1.4x speedup, which makes it sound like it's still slower. I'm sure thats probably not the case but it is a strange way to write an article advertising wasm.

Also, I'm a bit confused about which language this was actually written in before the wasm switch. Was it always written in Java and transpiled to JS? It doesn't seem that way from the article:

>Removing JavaScript-specific coding patterns.

>they had a core data structure in Sheets which was blurring the lines between arrays and maps. This is efficient in JavaScript

which doesn't make sense if they were writing it in Java and transpiling to JS.

Was it transpiled to JS only once in 2013 and then developed in JS from there? In which case why go back to Java?




My understanding is that Sheets was and remains written in Java. I interpreted "JS-specific coding patterns" to mean that they were writing some of their Java code in a particular way to please the compiler so that it generated more efficient JS.


Ok, That makes sense. Now that I think of it if they switched to JS they probably would have rewritten it by hand instead of using a tool like J2CL.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: