News for hackers. Stuff that matters.
Re:Love for TypeScript by isoos on Sunday July 31, 2016 @05:14AM (#12196232)
> You can't get better performance or smaller size than a manual written js solution.

Except in cases where the handwritten solution must be transformed to a different pattern (doing essentially the same thing). For example, the handwritten solution may write:

    element.innterHTML = '<div><span>x</span></div>';
While the compiler will unpack that and would use document.createElement() and would append these nodes together. The example may be lame, but most people would prefer a short string over 4+ lines of createElement() calls in their handwritten version. (Same old story with assembly vs. compiled C code).

Similar pattern may arise for various parts of the JS execution profiles and/or browser runtime quirks.

There are no comments on this comment yet.