CMP - United Business Media TechOnline
All Articles Products Courses Papers VirtuaLabs Webinars Web



 
LoginRegister
      TechOnline > Electronics Company Directory > Technical Paper
Technical Papers
Guidelines for Writing Efficient C/C++ Code

Click to Download
pdf logo
Embedded Systems Conference Paper
38 KB (11 pages)
April 07, 2006
 

Greg Davis
Green Hills Software

With ineffective programming, even a perfect compiler can not generate efficient code. This paper focuses on the hows and whys of programming with today's modern compilers and how to get good performance out of them. Examples are given to illustrate how simple source code transformations can result in big savings regardless of the compiler used. The paper covers choice of data types, variable scopes, the restrict keyword, floating point arithmetic, assembly statements, packing, and loop optimizations. This paper has been updated to reflect trends in optimizations and the open source GNU compilers.

 
Rate this paper
WORSE | BETTER
1 2 3 4 5

submit a paper

Embedded Systems Conference (ESC)
Green Hills Software
   

TECH PAPER
1. System ACE Configuration Solution for Xilinx FPGAs

TECH PAPER
2. Use Rowley CrossWorks and the MAXQ3120 Evaluation Kit to Create a Light Meter Application

TECH PAPER
3. Interface Products Design Guide

TECH PAPER
4. Get a Grip on Multimedia PMP Demands with the Right Processor Selection