Predictionary is manipulating around 100,000 markets in memory, so performance is a consistent bottleneck. I've already put a fair bit of effort into optimization, but there's still some lag here and there. Supposedly Javascript is slow, so rewriting it in Rust and compiling to Wasm would be the way to go.
But Wikipedia's most optimistic estimate is that Wasm is 20% faster than JS. (Presumably this is because JS's popularity has made browsers put huge amounts of work into optimizing it, so it's not actually that much slower than other languages and native code anymore?) Other sources roughly concur with this estimate. Some people even report finding it slower! And many of Predictionary's performance woes relate to updating DOM elements efficiently, which Wasm can't help with at all.
Then again, another bottleneck is working with the large (for a browser) amounts of data, and Rust is better for memory management than JS. So maybe it would help?
Resolves if I do it and notice significant gains. Roughly that's probably something like around 3x faster, but this'll be subjective.
@JTBooth Yeah probably. Then again modern JS does still have some pretty severe performance limitations in certain places.
https://manifold.markets/IsaacKing/is-there-any-way-to-performantly-me