sigh JS is imperfect but it doesn't just make everything it touches slow. I would be very surprised if in Discord for example any JS was blocking between you pressing a key and the key appearing in your text box.
In fact I took the time just now to run a few samples in Discord and it's looking like I'm getting the same 35-40ms keypress to photon latency as gVim with one 80ms outlier out of the 5 runs I did.