News for hackers. Stuff that matters.
Re:Faster JavaScript Calls by bastawhiz on Monday February 15, 2021 @03:48PM (#26147137)
The problem is less about the annotations (you can already infer most of this from a single pass over the code) than it is about the calls. If you have a reference to a function, you need that data handy. Unless you're copying it around with your function reference, you don't have that data (and it's prohibitively expensive to try).

JS is heavy on function references (closures are one of the most popular JS idioms), so it's not easy to know at call time how you can optimize your code.

There are no comments on this comment yet.