Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

Search: 

  Tutorial: Optimizing C++ - the WWW version

Imagine that you are about to finish a relatively large program, one that has taken a few weeks or months to write and debug.

Tutorial Details:

Just as you are putting the finishing touches on it, you discover that it is either too slow or runs out of memory when you feed it a realistic set of input data. You sigh, and start the task of optimizing it.

But why optimize? If your program doesn't fit in memory, you can just get more memory; if it is too slow, you can get a faster processor.

I have written Optimizing C++ because I believe that this common attitude is incorrect, and that a knowledge of optimization is essential to a professional programmer. One very important reason is that we often have little control over the hardware on which our programs are to be run. In this situation, the simplistic approach of adding more hardware is not feasible.

Optimizing C++ provides working programmers and those who intend to be working programmers with a practical, real-world approach to program optimization. Many of the optimization techniques presented are derived from my reading of academic journals that are, sadly, little known in the programming community. This book also draws on my nearly 30 years of experience as a programmer in diverse fields of application, during which I have become increasingly concerned about the amount of effort spent in reinventing optimization techniques rather than applying those already developed.

The first question you have to answer is whether your program needs optimization at all. If it does, you have to determine what part of the program is the culprit, and what resource is being overused. Chapter 1 indicates a method of attack on these problems, as well as a real-life example.

All of the examples in this book were compiled with both Microsoft's Visual C++ 5.0 and the DJGPP compiler, written and copyrighted by DJ Delorie. The latter compiler is available here. The source code for the examples is available here. If you want to use DJGPP, I recommend that you also get RHIDE, an integrated development environment for the DJGPP compiler, written and copyrighted by Robert Hoehne, which is available here.

All of the timings and profiling statistics, unless otherwise noted, were the result of running the corresponding program compiled with Visual C++ 5.0 on my Pentium II 233 Megahertz machine with 64 megabytes of memory.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Optimizing C++ - the WWW version

View Tutorial:
Optimizing C++ - the WWW version

Related Tutorials:

Displaying 1 - 50 of about 2344 Related Tutorials.

C/C++ Programming Books
; Optimizing C++ the WWW version  Imagine that you... have written Optimizing C++ because I believe that this common attitude... C/C++ Programming Books C/C++ Programming
 
EasyEclipse for C and C++
Eclipse Plugin-Language EasyEclipse for C and C...;   EasyEclipse for C and C++ is all you need to start developing C and C++ code with Eclipse. There are currently 28 comments
 
C and C++ books-page1
; The C Books This is the online version of The C Book, second... C and C++ books-page1 C and C++ books-page1... Wesley in 1991. This version is made freely available. While this book
 
C and C++ books
; Page 1 This is the online version of The C Book, second edition... C and C++ books C and C++ books... Wesley in 1991. This version is made freely available.     
 
C and C++ books
; Page 1 This is the online version of The C Book, second edition... C and C++ books C and C++ books... Wesley in 1991. This version is made freely available.     
 
Cantata++ - for testing C and C++ software
Cantata++ - for testing C and C++ software Cantata++ - for testing C and C++ software    ... is a major new version of the Cantata tool suite which has been designed around
 
C and C++ books-page11
can get a faster processor.  I have written Optimizing C++ because I... C and C++ books-page11 C and C++ books-page11...; The Industrial Strength of C++ In early 1990, C++ was chosen
 
Java example program to get the operating system's version
C:\javaexamples>java GetOSVersion Operating system version =>5.0... java example program to get the operating system's version Java example program to get the operating system's version
 
Versions of JSF, Latest Version of JSF, Latest Release of JSF
from version 1.0 and now it has come to the latest version of JSF is 1.2..... There were no specification or HTML renderkit changes. This version also works with same version of servlet 2.3 and jsp 1.2 as in the case of JSF 1.0. JSF 1.1_01
 
Why Objective C?
-to-learn, 3. Object-oriented version of C, 4. Provide dynamic binding, 5. Run... Why Objective C? Why Objective C...; In this section we will learn about the importance of Objective C
 
itext version
itext version itext version  ...; In this program we are going to find version of  the iText jar file which... for finding the iText version firstly we will make a class VersionPDF. Remember
 
Fortran Books
; Using C and C++ With Fortran The ISO Fortran committee has tried to work with the ISO C and C++ committees to standardize... this document under the terms of the GNU Free Documentation License, Version 1.1
 
Java get Version
Java get Version Java get Version...; In this section, you will learn how to obtain the java version and the OS version. We are providing you an example which will obtain the java version
 
change pdf version
change pdf versionf change pdf version...; In this program we are going to change  the version of pdf file ... the version of pdf file. To make the program for changing the pdf version
 
C and C++ books-page2
C and C++ books-page2 C and C++ books-page2...; The Advice & Warning for C Tutorials  C and C++ are widely promoted as ideal portable, fast, and - in the case of C++ - "object
 
C and C++ books-page3
C and C++ books-page3 C and C++ books-page3...; C for C++ programmers Before there was C++ there was C. Developed at Bell Laboratories in the early 1970's, C was used for over 95
 
Ask C/C++ Questions online
Ask MySQL Questions online Ask C/C++ Questions...;    C and C++ are different programming language, but both the languages are popular among programmers. C is a general
 
Open Source c++
a Linux version of Find_Orb, and not much else.) Mark Huss' C++ version... Open Source C++ Open Source c++ Open Source C... are shipped with C (sometimes Visual Basic or Pascal) interface. However, very few
 
Get Java Version
Get Java Version Get Java Version...; is Java Version Understand with Example In this Tutorial we want to describe you a code that help you in understanding in get Java Version. For this we have
 
C# Programming Books
C# Programming Books C# Programming Books...;       Dissecting a C# Application... the decisions, mistakes, problems and solutions that lead to the current version
 
C and C++ books-page8
C and C++ books-page8 C and C++ books-page8...; The ODBC from C Tutorial  In this section for example-based C tutorials that introduce you to ODBC API programming in C. Each tutorial
 
Java vs. C
Java: Java vs. C Java: Java vs. C Is Java easier or harder than C? Java is harder because ... Java is more powerful and can do much more than C. For example, C doesn't
 
Linux Books
is to explain the use of the GNU C and C++ compilers, gcc and g++. After reading... the C or C++ languages themselves, since this material can be found in many other... sections of the chapters "Compiling a C program", "Using the preprocessor
 
Objective C
Objective C, Objective C programming language, Objective C Language Objective C     ...;         Objective C
 
C and C++ books-page4
C and C++ books-page4 C and C++ books-page4... An array in C is a region of memory in which the elements (chars, ints, etc.) can...;     The UNIX System call in c programming In order
 
JSP JSTL c:if tag
JSP JSTL c:if tag JSP JSTL c:if tag... in jsp.  The c:if tag is used for a decision need, to be made in the page.../core" prefix="c" %> <html> <body> <form method="post">Guess
 
with No Body
<c:If> with No Body <c:If> with No Body... or not, then in these condition the <c:if> tag is used. The problem with <c:if>... value. The <c:if> tag is not for applicable if we want to do one thing
 
For C++ programmers
Java: For C++ programmers Java NotesFor C++ programmers Java inherited many features from C... always start with an upper case character, Methods (called functions in C
 
Objective C on Windows
Objective C on Windows, Objective C  Windows, Objective C Windows Compiler, Objective C Compiler for Windows Objective C... Objective C on Windows machine. We will download and install Objective C Windows
 
Yoxos Eclipse Distribution
solution for managing and optimizing Eclipse platforms. Whether you need an all
 
C Structure Pointer
C Structure Pointer C Structure Pointer            ...;  This section illustrates you the concept of Structure Pointer in C
 
We are providing Downloadable Version of Gentoo Linux
We are providing Downloadable Version of Gentoo Linux... downloadable version of Gentoo, which is distributed under GNU public license. You...: This product is downloadable version. Please refer GNU GENERAL PUBLIC LICENSE which
 
We are providing Downloadable Version of K12LTSP Linux
We are providing Downloadable Version of K12LTSP Linux... the free downloadable version of K12LTSP 4.1.0, which is distributed under GNU... is downloadable version. Please refer GNU GENERAL PUBLIC LICENSE which governs
 
We are providing Downloadable Version of Mandrake Move Linux
We are providing Downloadable Version of Mandrake Move Linux Mandrake Move Live Linux Now Available Linux Mandrake Move Live CD's We are providing the free downloadable version of Mandrake Official Move Live
 
Objective C Tutorial
Objective C Tutorial,Objective C Tutorials Objective C Tutorial        ...;      In this Objective C Tutorial we
 
Open Source web mail
version 1.14 from Ernie Miller. Open WebMail is designed to manage very large mail... WebMail is a www-frontend to IMAP/POP3 mailboxes. You can compare it to the systems... webmail application written in C# SharpWebMail is an ASP.NET webmail
 
Objective C Introduction
Objective C Introduction Objective C... Objective C programming language. Objective C is very old programming language and it was designed and developed in 1980. Now Objective C has become popular once
 
Objective-C keywords
Objective-C keywords, Objective C programming language, Objective C Language Objective-C keywords  ... in this section we will know about the keywords used in objective-C language
 

<c:forTokens> <c:forTokens>...;   <c:forTokens items="${requestScope.tokenising}" delims...: <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core
 
Objective C Constructors
Objective C Constructors, Objective C programming language, Objective C Language Objective C Constructors...; Objective-C enables user to define constructor with the help of self and super
 
C Pointer to a function
C Pointer to a function C Pointer to a function...; function in C. C provides a special feature of  pointer to a function. As you know  that every function defined in C language have a base address
 
C Structure example
C Structure example C Structure example...;  This section illustrates you the concept of structure in C. Structures in C defines the group of contiguous (adjacent) fields, such as records
 
We are providing Downloadable Version of K12LTSP Linux
We are providing Downloadable Version of K12LTSP Linux... downloadable version of K12LTSP 4.2.0, which is distributed under GNU public license. You... version. Please refer GNU GENERAL PUBLIC LICENSE which governs the distribution
 
Objective C Hello World
Objective C Hello World Objective C Hello World...;   In this section I will show you how to develop Objective C... and execute the Objective C Hello World example on windows machine. Create first
 
Objective C on Mac
Objective C on Mac, Objective C Mac Objective C... and run Objective C program on Mac machine. Compiling Objective C on Mac OS x To Compile Objective-C Programs on Mac OS X This is a simple process to compile
 
Compiling Objective C
Compiling Objective C Compiling Objective C...;   In this section we will show you how to compile Objective C program on windows and Max OS x machine. Compiling Objective C program
 
in JSTL
<c: out> in JSTL <c: out> in JSTL... is <c: out>. The main function of the this tag is to display the output...; Attributes of the <c: out> core action tag.  value: It specify
 
We are providing Downloadable Version of Mandrake Official 10 Linux CD's.
We are providing Downloadable Version of Mandrake Official 10 Linux CD's... Mandrake Official 10 CD's We are providing the free downloadable version of Mandrake... is downloadable version of  and not a product of Mandrake and is not endorsed
 
We are providing Downloadable Version of Slackware 9.1 Linux CD's.
We are providing Downloadable Version of Slackware 9.1 Linux CD's... We are distributing the free downloadable version of Slackware 9.1 Linux, which...: This product is downloadable version of  and not a product of Slackware
 
We are providing Downloadable Version of Dyne:bolic 1.3 Linux
We are providing Downloadable Version of Dyne:bolic 1.3 Linux... are providing the free downloadable version of Dyne:bolic, which is distributed under GNU... is downloadable version of Dyne:bolic 1.3. Please refer GNU GENERAL PUBLIC LICENSE which
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.