My experience optimizing CMP/WASM
The approaches I used:-
1. Zstd compressing the generated WASM binaries for smaller size transferred over the internet and faster decompression times
2. Loading the WASM and glue JS in parallel rather than the default sequential
3. Used a CDN to deliver the resources (I used AWS CloudFront, but any good CDN will do the job)
Using all these I was able to get consistent 1s load times after clearing the cache, which I think is pretty good
You can try it yourself at:
https://dxx3q4hyoo2sq.cloudfront.net/
Or the version which serves html and css from github pages but loads the binaries from CDN at:
https://taz03.github.io/matrix-calculator/
Also everything is open-source at:
https://github.com/Taz03/matrix-calculator