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

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++.

[1]  Barbara Chapman,et al.  Using OpenMP - portable shared memory parallel programming , 2007, Scientific and engineering computation.

[2]  Antonio Carlos Schneider Beck,et al.  Investigating different general-purpose and embedded multicores to achieve optimal trade-offs between performance and energy , 2016, J. Parallel Distributed Comput..

[3]  Nisha Agrawal,et al.  Performance analysis between aparapi (a parallel API) and JAVA by implementing sobel edge detection Algorithm , 2013, 2013 National Conference on Parallel Computing Technologies (PARCOMPTECH).

[4]  Bu-Sung Lee,et al.  Evaluation of Java thread performance on two different multithreaded kernels , 1999, OPSR.

[5]  Daniele Comotti,et al.  A Java vs. C++ Performance Evaluation: A 3D Modeling Benchmark , 2012, SIMPAR.

[6]  David D. Langan,et al.  Performance Evaluation : Java vs C + + , 2001 .

[7]  Karthikeyan Sankaralingam,et al.  Power struggles: Revisiting the RISC vs. CISC debate on contemporary ARM and x86 architectures , 2013, 2013 IEEE 19th International Symposium on High Performance Computer Architecture (HPCA).

[8]  Martin D. Westhead,et al.  A methodology for benchmarking Java Grande applications , 1999, JAVA '99.

[9]  Mark S. Gordon,et al.  Performance and energy efficiency analysis of 64-bit ARM using GAMESS , 2015, Co-HPC@SC.

[10]  Michael A. Frumkin,et al.  Performance and scalability of the NAS parallel benchmarks in Java , 2003, Proceedings International Parallel and Distributed Processing Symposium.

[11]  Alexander Chatzigeorgiou,et al.  Evaluating Performance and Power of Object-Oriented Vs. Procedural Programming in Embedded Processors , 2002, Ada-Europe.

[12]  Antonio Carlos Schneider Beck,et al.  Performance and Energy Evaluation of Different Multi-Threading Interfaces in Embedded and General Purpose Systems , 2015, J. Signal Process. Syst..

[13]  Hazem Hatamleh,et al.  Time Comparing between Java and C++ Software , 2012 .

[14]  David H. Bailey,et al.  The NAS parallel benchmarks summary and preliminary results , 1991, Proceedings of the 1991 ACM/IEEE Conference on Supercomputing (Supercomputing '91).

[15]  Paul H. Lewis,et al.  Comparing programming paradigms: an evaluation of functional and object-oriented programs , 1996, Softw. Eng. J..

[16]  Dennis Ritchie,et al.  The development of the C language , 1993, HOPL-II.

[17]  Thomas J. Bergin,et al.  History of programming languages---II , 1996 .

[18]  Luigi Carro,et al.  Adaptable Embedded Systems , 2012 .

[19]  Sabela Ramos,et al.  Evaluation of Java for General Purpose GPU Computing , 2013, 2013 27th International Conference on Advanced Information Networking and Applications Workshops.

[20]  Maurice Yarrow,et al.  New Implementations and Results for the NAS Parallel Benchmarks 2 , 1997, PPSC.

[21]  Antonio Carlos Schneider Beck,et al.  Optimized Use of Parallel Programming Interfaces in Multithreaded Embedded Architectures , 2015, 2015 IEEE Computer Society Annual Symposium on VLSI.

[22]  Brent Hailpern,et al.  History of Programming Languages Conference: HOPL-III Co-Chairs Introduction: June 9, 2007 , 2007 .

[23]  Jungwon Kim,et al.  SnuCL: an OpenCL framework for heterogeneous CPU/GPU clusters , 2012, ICS '12.

[24]  Scott W. Haney,et al.  Is C++ fast enough for scientific computing? , 1994 .

[25]  Bruce W. Char,et al.  Symbolic computation in Java: an appraisement , 1999, ISSAC '99.

[26]  T. A. Lasinski,et al.  THE NAS PARALLELBENCHMARKS , 1991 .

[27]  Ian Sommerville,et al.  Software Engineering (7th Edition) , 2004 .

[28]  Michael Frumkin,et al.  Implementation of NAS Parallel Benchmarks in High Performance Fortran , 2000 .

[29]  内山 邦男 Heterogeneous multicore processor technologies for embedded systems , 2012 .

[30]  Frank Yellin,et al.  The Java Virtual Machine Specification , 1996 .

[31]  Peter Sestoft Numeric performance in C , C # and Java , 2010 .

[32]  Vivek Sarkar,et al.  JCUDA: A Programmer-Friendly Interface for Accelerating Java Programs with CUDA , 2009, Euro-Par.

[33]  Dirk Grunwald,et al.  Quantifying Behavioral Differences Between C and C++ Programs , 1994 .

[34]  Bjarne Stroustrup,et al.  The C++ Programming Language: Special Edition , 2000 .

[35]  Antonio Carlos Schneider Beck,et al.  The Impact of Virtual Machines on Embedded Systems , 2015, 2015 IEEE 39th Annual Computer Software and Applications Conference.

[36]  Arch D. Robison,et al.  C++ gets faster for scientific computing , 1996 .

[37]  Efraim Rotem,et al.  Power-Management Architecture of the Intel Microarchitecture Code-Named Sandy Bridge , 2012, IEEE Micro.