Do any engines or optimizers product TS-specific performance gains?

This page summarizes the projects mentioned and recommended in the original post on /r/typescript

InfluxDB - Purpose built for real-time analytics at any scale.
InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • prepack

    Discontinued A JavaScript bundle optimizer.

    You can still do optimisations based purely on Javascript semantics. This is similar to the first example you give with dead function elimination, and many minifiers do some amount of this already, but you can take it to some extremes. One example of this is the (no longer maintained) Prepack project from Facebook. The core idea is to evaluate as much Javascript as possible at compile time, with the expectation that the result will probably be smaller (albeit less human readable) than the initial code.

  • InfluxDB

    Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.

    InfluxDB logo
  • assemblyscript

    A TypeScript-like language for WebAssembly.

    If you can guarantee that Typescript type hints will always be followed, you can turn it into more optimised code. Unfortunately, this means you've got to break Javascript semantics, so this means creating a new language, but people have done it. For example, AssemblyScript is a language that is designed as a strict subset of Typescript that compiles directly down to WebAssembly instead of Javascript, producing much more efficient code (most of the time). The tradeoff is that it has some slightly different semantics to Javascript, which means your existing codebase — and most of the libraries you use — will probably require some adaption before running correctly in AssemblyScript.

  • closure-compiler

    A JavaScript checker and optimizer.

    I think only Google Closure Compiler did some optimizations based on its JSDoc-style annotations (see docs). If I remember correctly, types mostly allowed renaming objects' properties across modules, but most other advanced optimizations (like dead code elimination or functions inlining) didn't rely on types. In my experience properties renaming resulted in subtle, hard to discover bugs and I'd say they didn't bring much benefit.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Can something like typescript or elm be AOT-compiled efficiently?

    5 projects | /r/node | 25 Nov 2022
  • Figma's Journey to TypeScript

    5 projects | news.ycombinator.com | 4 May 2024
  • TypeScript Might Not Be Your God: Case Study of Migration from TS to JSDoc

    4 projects | dev.to | 16 Jan 2024
  • Prettier $20k Bounty was Claimed

    16 projects | news.ycombinator.com | 27 Nov 2023
  • Gentle Introduction To Typescript Compiler API

    6 projects | dev.to | 18 Nov 2023

Did you konow that WebAssembly is
the 66th most popular programming language
based on number of metions?