Transient Typechecks are (Almost) Free
Richard Roberts, Stefan Marr, Michael Homer, James Noble

TL;DR
This paper demonstrates that with just-in-time optimizations, transient gradual typing can achieve near-zero runtime overhead, enabling performance comparable to dynamic languages while allowing type annotations.
Contribution
The paper shows how JIT optimizations can nearly eliminate the performance cost of transient type checks in gradually-typed languages.
Findings
Transient checks can be optimized to near-zero overhead.
Performance of gradually-typed languages can match dynamic languages.
Type annotations do not significantly impact program speed.
Abstract
Transient gradual typing imposes run-time type tests that typically cause a linear slowdown in programs' performance. This performance impact discourages the use of type annotations because adding types to a program makes the program slower. A virtual machine can employ standard just-in-time optimizations to reduce the overhead of transient checks to near zero. These optimizations can give gradually-typed languages performance comparable to state-of-the-art dynamic languages, so programmers can add types to their code without affecting their programs' performance.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
