3 ms·
I think if you make things consistently typed (as typescript will help enforce), then your JS will run faster already. Because a lot of techniques JS JITs use a
by nicoburns 8y ago
I think if you make things consistently typed (as typescript will help enforce), then your JS will run faster already. Because a lot of techniques JS JITs use are basically guessing the type of variables, and then bailing out into a slow path if it turns out they guessed wrong. Codebases like lodash make use of this, which is one reason why they're so fast.