All Latest C Programming related articles. to submit your articles became a membur, it's free or send your article to publisher(at)tutorialsforu(dot)info.
|
Optimizing C and C++ Code Embedded software often runs on processors with limited computation power, thus optimizing the code becomes a necessity. In this article we will explore the following optimization techniques for C and C++ code developed for Real-time and Embedded Systems. - Adjust structure sizes to power of two
- Place case labels in narrow range
- Place frequent case labels first
- Break big switch statements into nested switches
- Minimize local variables
- Declare local variables in the inner most scope
- Reduce the number of parameters
- Use references for parameter passing and return value for types bigger than 4 bytes
- Don't define a return value if not used
- Consider locality of reference for code and data
- Prefer int over char and short
- Define lightweight constructors
- Prefer initialization over assignment
- Use constructor initialization lists
- Do not declare "just in case" virtual functions
- In-line 1 to 3 line functions
|
|
Read more...
|
|
Code Optimization Using the GNU C Compiler This article describes some of the code optimization techniques used by the GNU C Compiler, in order to give the reader a feel of what code optimization is and how it can increase the efficiency of the generated object code. Contents - Introduction
- Assembly Language Code for a C Program
- Constant Folding
- Common Subexpression Elimination
- Dead Code Elimination
- Strength Reduction using Induction Variable
- Conclusion
- Acknowledgments
- References
|
|
Read more...
|
|
C optimisation tutorial This document has evolved over time and contains a number of the best ways to hand-optimise your C-code. Compilers are good, but they can't do everything, and here I hope to help you squeeze the best performance out of your code. This is not intended for beginners, but for more experienced programmers.
|
|
Read more...
|
|
Guide to Network Programming Hey! Socket programming got you down? Is this stuff just a little too difficult to figure out from the man pages? You want to do cool Internet programming, but you don't have time to wade through a gob of structs trying to figure out if you have to call bind() before you connect(), etc., etc. Well, guess what! I've already done this nasty business, and I'm dying to share the information with everyone! You've come to the right place. This document should give the average competent C programmer the edge s/he needs to get a grip on this networking noise.
|
|
Read more...
|
|
Pointers to Functions One of those things beginners in C find difficult is the concept of pointers. The purpose of this tutorial is to provide an introduction to pointers and their use to these beginners.
|
|
Read more...
|
|
Pointers and Dynamic Allocation of Memory One of those things beginners in C find difficult is the concept of pointers. The purpose of this tutorial is to provide an introduction to pointers and their use to these beginners.
|
|
Read more...
|
|
Pointers and Structures,MultiDimentional Arrays, pointer to arrays One of those things beginners in C find difficult is the concept of pointers. The purpose of this tutorial is to provide an introduction to pointers and their use to these beginners.
|
|
Read more...
|
|
A TUTORIAL ON POINTERS AND ARRAYS IN C One of those things beginners in C find difficult is the concept of pointers. The purpose of this tutorial is to provide an introduction to pointers and their use to these beginners.
|
|
Read more...
|
|
|
|
<< Start < Prev 1 2 Next > End >>
|
| Results 1 - 13 of 14 |