vix.ing · top · new · best · stats · spec

Specialization of Generic Array Accesses After Inlining

2017/02/07 by Ryohei Tokuda, Eijiro Sumii, Akinori Abe
Computer Science · Mathematics · #Abstraction #Arithmetic #Code (set theory) #Compiler #Computer science #Float (project management) #Integer (computer science) #Logic, programming, and type systems #Mathematics #Optimizing compiler #Parallel Computing and Optimization Techniques #Parallel computing #Program optimization #Programming language #Security and Verification in Computing #Type (biology) #cs.PL

paper · pdf · doi:10.4204/eptcs.241.4

published as EPTCS 241, 2017, pp. 45-53 · In Proceedings ML/OCaml 2015, arXiv:1702.01872

openalex publication_date 2017/02/07 · arxiv created 2017/02/08 · arxiv updated 2017/02/09 · openalex created_date 2025/10/10 · openalex updated_date 2026/08/05

Abstract

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.

Citations