内联后泛型数组访问的特殊化
Specialization of Generic Array Accesses After Inlining
摘要:
我们已经实现了一个优化,专门类型泛型数组访问后内联的多态函数在本机代码OCaml编译器。OCaml中的多态数组操作(读和写)需要运行时类型分派,因为整数和浮点数组的特殊内存表示。即使在通过内联进行单态化之后,也不能将其删除,因为中间语言大多是无类型的。因此,我们用像System F这样的显式类型应用程序扩展了它(同时通过类型变量的唯一标识符保持隐式类型抽象)。我们的优化已经实现了高达21%的数值程序的速度。
英文摘要:
We have implemented an optimization that specializes type-generic array accesses after inlining of polymorphic functions in the native-code OCaml compiler. Polymorphic array operations (read and write) in OCaml require runtime type dispatch because of ad hoc memory representations of integer and float arrays. It cannot be removed even after being monomorphized by inlining because the intermediate language is mostly untyped. We therefore extended it with explicit type application like System F (while keeping implicit type abstraction by means of unique identifiers for type variables). Our optimization has achieved up to 21% speed-up of numerical programs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。