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.
Overall, it is unclear whether our results confirm the ones reported by Richards @cite_1 , because our system is simpler. It does not introduce the polymorphism issues caused by accumulating cast information on object shapes, which could be important for performance. Considering that Richards report ca. 4 the classic Richards benchmark, while we see , further work seems necessary to understand the performance implications of their approach for a highly optimizing just-in-time compiler.
@cite_1
2762605937
The research of Richard J. Samworth was supported by an EPSRC Early Career Fellowship and a grant from the Leverhulme Trust.