Expression Templates Revisited: A Performance Analysis of Current Methodologies

  • Authors:
  • Klaus Iglberger;Georg Hager;Jan Treibig;Ulrich Rüde

  • Affiliations:
  • klaus.iglberger@zisc.uni-erlangen.de;georg.hager@rrze.uni-erlangen.de and jan.treibig@rrze.uni-erlangen.de;-;ulrich.ruede@informatik.uni-erlangen.de

  • Venue:
  • SIAM Journal on Scientific Computing
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

In the last decade, expression templates (ETs) have gained a reputation as an efficient performance optimization tool for C++ codes. This reputation builds on several ET-based linear algebra frameworks focused on combining both elegant and high-performance C++ code. However, on closer examination the assumption that ETs are a performance optimization technique cannot be maintained. In this paper we compare the performance of several generations of ET-based frameworks. We analyze different ET methodologies and explain the inability of some ET implementations to deliver high performance for dense and sparse linear algebra operations. Additionally, we introduce the notion of “smart” ETs, which truly allow for a combination of high performance code with the elegance and maintainability of a domain-specific language.