Write certain operations (like math- or string-heavy functions) in c and bundle that as a shared library. AFAIK this is what vscode does and why it runs so fast.
I'm not quite sure how it works in javascript, but I would look up javascript cffi or electron cffi or something like that to find how to do it. As for go, it might be possible, but it'll definitely be harder. You'll have to find how to expose a c api to your go code.