by dmux · 5y ago · 0 comments
I'm not saying this is the case, but isn't there a greater opportunity to optimize TypeScript code over JavaScript due to the presence of types? Isn't this the same thing as a statically typed program being compiled into assembly (untyped) ?
Also, C compilers generate efficient code by assuming undefined behavior cannot happen. (This sometimes corrupts buggy programs, because the type system can't guarantee undefined behavior isn't triggered.)