@evanw interesting, thanks for the insight! Playing around with a similar product (from a tech perspective) and wondering if it’s better to keep the data pipelines and rendering in WASM for memory and performance.
Super interesting stuff! Cheers
@switz Generally yes. In C++ using a byte for an enum and a bit for a bool can be done without giving up good developer ergonomics, while in JS those are 32-bit or 64-bit values. Less memory means more performance (better use of cache). You can also use an arena allocators to go faster than a garbage collector if you're clever.
But that only makes sense for large amounts of data, as WASM may be an order of magnitude larger than JS. Turning trivial stuff into WASM may slow it down.
@evanw this is what I'm starting to realize. there are a huge number of rendering pipelines (essentially 2d game engines) in rust, but they're all somewhat incomplete. go isn't any better. haven't found many for JS-based wasm.
seems like keeping the rendering pipelines in wasm along with the data is a huge win, but I'm struggling to find the right engine for my problem.
I may build the rendering pipeline in pixi.js and try to use culling to only send the relevant display data over the pipe.