With-Loop scalarization – merging nested array operations

  • Authors:
  • Clemens Grelck;Sven-Bodo Scholz;Kai Trojahner

  • Affiliations:
  • Institute of Software Technology and Programming Languages, University of Lübeck;Institute of Computer Science and Applied Mathematics, University of Kiel;Institute of Software Technology and Programming Languages, University of Lübeck

  • Venue:
  • IFL'03 Proceedings of the 15th international conference on Implementation of Functional Languages
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

Construction of complex array operations by composition of more basic ones allows for abstract and concise specifications of algorithms. Unfortunately, naïve compilation of such specifications leads to creation of many temporary arrays at runtime and, consequently, to poor performance characteristics. This paper elaborates on a new compiler optimization, named with-loop-scalarization, which aims at eliminating temporary arrays in the context of nested array operations. It is based on with-loops, a versatile array comprehension construct used by the functional array language SaC both for specification as well as for internal representation of array operations. The impact of with-loop-scalarization on the runtime performance of compiled SaC code is demonstrated by several experiments involving support for arithmetic on arrays of complex numbers and the application kernel FT from the NAS benchmark suite.