2 ms·
Huh, which AOT compilers for JavaScript exist which achieve high performance? I thought JS as a language 100% depended on the runtime information available to a
by mort96 5y ago
Huh, which AOT compilers for JavaScript exist which achieve high performance? I thought JS as a language 100% depended on the runtime information available to a JIT for decent performance?
- anaisbetts 5y agofpoling is referring to a _theoretical_ TypeScript compiler that doesn't actually exist in real life but could be written, that the Flutter team would apparently summon from the aether whole-cloth then proceed to maintain feature-for-feature parity with the official TypeScript compiler
- mort96 5y agoWell, you wouldn't have to maintain feature parity with Microsoft's TS compiler. If you had some magical ES5 AOT compiler, you could just compile your TS to ES5 using the official TS compiler and then AOT-compile your ES5. No evolving spec to keep up with (at least as long as the upstream TS compiler maintains ES5 support). I'm really just curious about how one would AOT-compile a language as dynamic as JavaScript (be it TypeScript, ES3, ES5, or anything else) and achieve JIT-like performance.
- smasher164 5y agoRight, but then you miss out on the advantages of type-driven compilation. It would be hard to compete with Dart's AOT without that.