Re:The Productivity Blocker
by mattmanser on Monday December 19, 2022 @05:48AM
(#34050670)
> It wasn't a 1-1 port because I improved things
Hmm, I think we found the reason....
Re:The Productivity Blocker
by auggierose on Tuesday December 20, 2022 @04:29AM
(#34063619)
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.
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.