An experimental approach to the performance penalty of the use of classes in Fortran 95

  • Authors:
  • Luit J. Slooten;Fransisco Batle;Jesus Carrera

  • Affiliations:
  • Hydrogeology Group, Polytechnical University of Catalonia, Jordi Girona 1-3, Edificio D2, 08034 Barcelona, Spain;Geomodels, Parc Cientific de Barcelona, Edifici Florensa, Universitat de Barcelona, C/Adolf Florensa s/n, 08028 Barcelona, Spain;Jaume Almera Institute, Llus Sol i Sabars s/n, 08028 Barcelona, Spain

  • Venue:
  • Advances in Engineering Software
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Fortran 95 is used often for ''number crunching'': scientific and engineering applications where performance is important and which operate with large datasets. The language allows the implementation of certain elements of object oriented design, which facilitate code expansion, reuse and maintenance. In this paper we discuss two series of tests to measure how different object oriented design elements of Fortran 95 affect overall performance. The first series of tests consists of several implementations for multiplying two matrices. These tests are focused exclusively on computation time, not considering other parts of the object life cycle such as construction and destruction. The second series consists of computing a finite element matrix for a diffusion term. A more complex environment with different classes is studied. Here, we consider not only the time spent doing useful computations but the integral object life cycle. Results show that object oriented design comes at a cost in all cases. However, given the right compiler, using the right compiler optimization techniques and keeping the amount of objects and method calls low, Fortran 95 designs can benefit from object oriented design techniques with a less than 10% running time increase.