arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1807.00661cs.PL
收藏

暂时性类型(几乎)免费

Transient Typechecks are (Almost) Free

Richard Roberts, Stefan Marr, Michael Homer, James Noble

摘要:

瞬态渐进类型强制执行运行时类型测试,这通常会导致程序性能的线性下降。这种性能影响不鼓励使用类型注释,因为向程序添加类型会使程序变慢。虚拟机可以采用标准的实时优化,将瞬时检查的开销降低到接近零。这些优化可以使渐进类型语言的性能与最先进的动态语言相当,因此程序员可以在不影响程序性能的情况下向代码中添加类型。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑