Something you might consider at some (far?) future point is utilizing WebAssembly to leverage ~native speeds.

Doing this with a garbage...