TY - JOUR
T1 - Specialization of generic array accesses after inlining (system description)
AU - Tokuda, Ryohei
AU - Sumii, Eijiro
AU - Abe, Akinori
N1 - Funding Information:
We thank Jacques Garrigue for his help on hacking the OCaml compiler and the anonymous reviewers for valuable comments. This work was partially supported by JSPS KAKENHI Grant Numbers JP22300005, JP25540001, JP15H02681, JP16K12409, and by Mitsubishi Foundation Research Grants in the Natural Sciences.
Publisher Copyright:
© R. Tokuda, E. Sumii & A. Abe.
PY - 2017/2/7
Y1 - 2017/2/7
N2 - 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.
AB - 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.
UR - http://www.scopus.com/inward/record.url?scp=85018877009&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85018877009&partnerID=8YFLogxK
U2 - 10.4204/EPTCS.241.4
DO - 10.4204/EPTCS.241.4
M3 - Conference article
AN - SCOPUS:85018877009
SN - 2075-2180
VL - 241
SP - 45
EP - 53
JO - Electronic Proceedings in Theoretical Computer Science, EPTCS
JF - Electronic Proceedings in Theoretical Computer Science, EPTCS
T2 - 2015 ML Family / OCaml Users and Developers Workshops, ML 2015
Y2 - 3 September 2015 through 4 September 2015
ER -