Performance and power evaluation of C++ object-oriented programming in embedded processors

Abstract The development of high-performance and lower power portable devices relies on both the underlying hardware architecture and technology as well as on the application software that executes on embedded processor cores. One way to confront the increasing complexity and decreasing time-to-market of embedded software is by means of modular and reusable code, forcing software designers to use objected oriented programming languages such as C++ [6] . However, the object-oriented approach is known to introduce a significant performance penalty compared to classical procedural programming. In this paper, the object oriented programming style is evaluated in terms of both performance and power for embedded applications. Profiling results indicate that C++ programs apart from being slower than their corresponding C versions, consume significantly more energy. Further analysis shows that this is mainly due to the increased instruction count, larger code size and increased number of accesses to the data memory for the object-oriented versions.

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

[2]  Olivier Zendra,et al.  Efficient dynamic dispatch without virtual function tables: the SmallEiffel compiler , 1997, OOPSLA '97.

[3]  Anantha P. Chandrakasan,et al.  Low Power Digital CMOS Design , 1995 .

[4]  Johan Cockx Whole program compilation for embedded software: the ADSL experiment , 2001, Ninth International Symposium on Hardware/Software Codesign. CODES 2001 (IEEE Cat. No.01TH8571).

[5]  Steve Furber ARM System-on-Chip Architecture , 2000 .

[6]  Mark W. Davis,et al.  Measurement and Analysis of C and C++ Performance , 1998, Digit. Tech. J..

[7]  Jan M. Rabaey,et al.  Architectural power analysis: The dual bit type method , 1995, IEEE Trans. Very Large Scale Integr. Syst..

[8]  F. A. Seiler,et al.  Numerical Recipes in C: The Art of Scientific Computing , 1989 .

[9]  Luca Benini,et al.  System-level power optimization: techniques and tools , 1999, Proceedings. 1999 International Symposium on Low Power Electronics and Design (Cat. No.99TH8477).

[10]  Sharad Malik,et al.  Instruction level power analysis and optimization of software , 1996, Proceedings of 9th International Conference on VLSI Design.

[11]  Karel Driesen,et al.  The direct cost of virtual function calls in C++ , 1996, OOPSLA '96.

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

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

[14]  Luca Benini,et al.  Energy-efficient design of battery-powered embedded systems , 2001, IEEE Trans. Very Large Scale Integr. Syst..

[15]  Urs Hölzle,et al.  Eliminating Virtual Function Calls in C++ Programs , 1996, ECOOP.

[16]  Michael J. Pont Embedded C , 2002 .

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

[18]  Urs Hölzle,et al.  Dynamic vs . Static Optimization Techniques for Object-Oriented Languages , 1996 .

[19]  Sharad Malik,et al.  Power analysis of embedded software: a first step towards software power minimization , 1994, IEEE Trans. Very Large Scale Integr. Syst..

[20]  Urs Hölzle,et al.  Dynamic versus Static Optimization Techniques for Object-Oriented Languages , 1995, Theory Pract. Object Syst..

[21]  Hugo De Man,et al.  Formalized methodology for data reuse: exploration for low-power hierarchical memory mappings , 1998, IEEE Trans. Very Large Scale Integr. Syst..

[22]  Luca Benini,et al.  Energy-efficient design of battery-powered embedded systems , 1999, Proceedings. 1999 International Symposium on Low Power Electronics and Design (Cat. No.99TH8477).

[23]  Amer Diwan,et al.  Using types to analyze and optimize object-oriented programs , 2001, TOPL.