> The greatest trick that javascript ever pulled was to convince the latest generation of programmers that it was fast...
By the way, JavaScript IS quite fast. I ported some code from Swift to Typescript recently, and its runtime went down from 15 seconds to 2 seconds. It wasn't a 1-1 port because I improved things, so it is not a fair comparison, but I was very positively surprised.
I don't think you did! Doing the same improvements in Swift I wouldn't expect an over seven time speedup. I suspect that the time difference has to do with data structures like hashmaps, which in Swift are defacto immutable, and in JavaScript are not.