Specialization of Generic Array Accesses After Inlining
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 flo...
Main Authors: | , , |
---|---|
Format: | Article |
Language: | English |
Published: |
Open Publishing Association
2017-02-01
|
Series: | Electronic Proceedings in Theoretical Computer Science |
Online Access: | http://arxiv.org/pdf/1702.02283v1 |
id |
doaj-aad4d6607ac545dcb3753236e8cb9682 |
---|---|
record_format |
Article |
spelling |
doaj-aad4d6607ac545dcb3753236e8cb96822020-11-25T01:55:08ZengOpen Publishing AssociationElectronic Proceedings in Theoretical Computer Science2075-21802017-02-01241Proc. ML/OCaml 2015455310.4204/EPTCS.241.4:2Specialization of Generic Array Accesses After InliningRyohei Tokuda0Eijiro Sumii1Akinori Abe2 Graduate School of Information Sciences, Tohoku University, Sendai, Japan Graduate School of Information Sciences, Tohoku University, Sendai, Japan Graduate School of Information Sciences, Tohoku University, Sendai, Japan 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.http://arxiv.org/pdf/1702.02283v1 |
collection |
DOAJ |
language |
English |
format |
Article |
sources |
DOAJ |
author |
Ryohei Tokuda Eijiro Sumii Akinori Abe |
spellingShingle |
Ryohei Tokuda Eijiro Sumii Akinori Abe Specialization of Generic Array Accesses After Inlining Electronic Proceedings in Theoretical Computer Science |
author_facet |
Ryohei Tokuda Eijiro Sumii Akinori Abe |
author_sort |
Ryohei Tokuda |
title |
Specialization of Generic Array Accesses After Inlining |
title_short |
Specialization of Generic Array Accesses After Inlining |
title_full |
Specialization of Generic Array Accesses After Inlining |
title_fullStr |
Specialization of Generic Array Accesses After Inlining |
title_full_unstemmed |
Specialization of Generic Array Accesses After Inlining |
title_sort |
specialization of generic array accesses after inlining |
publisher |
Open Publishing Association |
series |
Electronic Proceedings in Theoretical Computer Science |
issn |
2075-2180 |
publishDate |
2017-02-01 |
description |
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. |
url |
http://arxiv.org/pdf/1702.02283v1 |
work_keys_str_mv |
AT ryoheitokuda specializationofgenericarrayaccessesafterinlining AT eijirosumii specializationofgenericarrayaccessesafterinlining AT akinoriabe specializationofgenericarrayaccessesafterinlining |
_version_ |
1724984866666184704 |