PDF4PRO ⚡AMP

Modern search engine that looking for books and documents around the web

Example: dental hygienist

Tips for Optimizing C/C++ Code - Clemson University

Tips for Optimizing C/C++ Ahmdal s Law:Speedup=timeoldtimenew=1(1 funccost)+funccost/funcspeedup Wheref unccostis the percentage of the program runtime used by the functionf unc, andf uncspeedupisthe factor by which you speedup the function. Thus, if you optimize the functionT riangleIntersect(), which is 40% of the runtime, so that it runstwice as fast, your program will run 25% faster (1(1 )+ ). This means infrequently used code ( , the scene loader) probably should be optimized little (if at all). This is often phrased as: make the common case fast and the rare case correct.

21. Avoid dynamic memory allocation during computation. • Dynamic memory is great for storing the scene and other data that does not change during computation. • However, on many (most) systems dynamic memory allocation requires the use of locks to control a access to the allocator.

Loading..

Tags:

  Memory

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Spam in document Broken preview Other abuse

Transcription of Tips for Optimizing C/C++ Code - Clemson University

Related search queries