[edit: fixed a formulation which sounded like code bloat can be blamed on emscripten instead of user-code]
[edit: fixed a formulation which sounded like code bloat can be blamed on emscripten instead of user-code]
But there are some huge multimillion line codebases that you can't really reduce in size to 5MB. That's the startup time problem that the Emterpreter aims to help with.
I actually find the bytecode part more interesting then the interpreter part, are you seeing drastically better compression for a bytecode module compared to compressed ASCII asm.js?
However, it does seem likely that a binary format that is designed for compressibility could be smaller. But, it would not be as fast to execute.
SDE effectively compresses a low level syntax tree by building a dictionary that as a sort of sliding window over the tree by adding specialised nodes as well as more general nodes, and the encoding new variations of specialised sub-trees using the new elements in the dictionary and subsequently adding more specialised "instructions".
As a result you both get compression (think a tree variation of Huffman coding) and "hints" to let you re-use partially generated code as templates (e.g. one dictionary entry maps to "assign x to y"; you also add "assign x to _", and later you find a reference to the entry for "assign x to _" + z; now you copy the code for "assign x to <something>" into place and fix it up with the address of z).
The approach has always fascinated me, but it fell in the shadow of the JVM.
[1] https://en.wikipedia.org/wiki/Semantic_dictionary_encoding
Also, what makes people more cautious about performance concerns is that mobile network and hardware are still catching up to what people have on the desktop. And since about 8 years ago, mobile has been a big opportunity for many companies, which means that the desktop has been taken for a ride by the mobile devices and that is not going to stop.