Javascript is getting better with at least the latter thanks to typed arrays - https://developer.mozilla.org/en-US/docs/JavaScript/Typed_ar...
It was actually memory/GC issues that got me to give up on the js implementation - it's very hard to prevent js from creating huge numbers of temporary variables, which then cause the system to freeze for several seconds while they are cleaned up.