How Programming Languages and Paradigms Affect Performance and Energy in Multithreaded Applications

  • Guilherme Grunewald Magalhães UFRGS
  • Anderson Luis Sartor UFRGS
  • Arthur Francisco Lorenzon UFRGS
  • Philippe Olivier Alexandre Navaux UFRGS
  • Antonio Carlos Schneider Beck UFRGS

Resumo


Considering that multithreaded applications may be implemented using several programming languages and paradigms, in this work we show how they influence performance, energy consumption and energy-delay product (EDP). For that, we evaluate a subset of the NAS Parallel Benchmark, implemented in both procedural (C) and object-oriented programming languages (C++ and Java). We also investigate the overhead of Virtual Machines (VM) and the improvement that the Just-In-Time (JIT) compiler may provide. We show that the procedural language has better scalability than object-oriented ones, i.e., the improvements in performance, EDP, and energy savings are better in C than in C++ and Java as the number of threads increases; and that C can be up to 76 times faster than Java, even with the JIT mechanism enabled. We also demonstrate that the Java JIT effectiveness may vary according to the benchmark (1.16 and 23.97 times in performance and 1.19 to 19.85 times in energy consumption compared to the VM without JIT); and when it reaches good optimization levels, it can be up to 23% faster, consuming 42% less energy, and having an EDP 58% lower than C++.
Palavras-chave: Java, C languages, Benchmark testing, Programming, Energy consumption, Virtual machining, Computer architecture, Programming paradigms, performance and energy evaluation, multithreaded applications
Publicado
01/11/2016
MAGALHÃES, Guilherme Grunewald; SARTOR, Anderson Luis; LORENZON, Arthur Francisco; NAVAUX, Philippe Olivier Alexandre; BECK, Antonio Carlos Schneider. How Programming Languages and Paradigms Affect Performance and Energy in Multithreaded Applications. In: SIMPÓSIO BRASILEIRO DE ENGENHARIA DE SISTEMAS COMPUTACIONAIS (SBESC), 6. , 2016, João Pessoa/PB. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2016 . p. 71-78. ISSN 2237-5430.