Optimizing your WebAssembly code is partially about decision making and experimenting. It is about discovering what works for your particular game or app. When WebAssembly was designed, for instance, a decision was made to have the WebAssembly bytecode run on a virtual stack machine. The designers of WebAssembly made this choice because they felt that they could justify the small loss of performance with a significantly smaller bytecode download size. Every piece of code has a bottleneck somewhere. In OpenGL applications that bottleneck will be interfacing with the GPU. The bottleneck for your application may be the memory, or it may be CPU-bound. Optimizing code, in general, is about determining what the holdup is and deciding what trade-off you would like to make to improve things. If you optimize for download size, you may lose some runtime performance...





















































