In this post we introduce Speescope, a useful tool to help you visualize what your program is doing and where it is spending time.
We talk about virtual functions, and how the performance of software with virtual functions depends on many factors: the cost of additional instructions, cache misses, branch prediction misses, instruction cache misses and compiler optimizations.
Big O notation is commonly used to describe algorithm performance. But modern hardware makes performance analysis much harder than it used to be. In this short article we give three interesting examples to illustrate the limits of big O notation.
A few days ago I wrote a small app to illustrate one of the articles I was preparing. Basically the program was loading a file from the hard disk, sorting it, and then outputting to another file only unique values (by omitting duplicates). The function for writing unique values to a file looks like this:…
When processing (searching, inserting etc) your data structure, if you are accessing it in random-access fashion, the performance will suffer due to many data cache misses. Read on how to use the explicit data prefetching to speed up access to your data structure.
Multitime is a tool that you can use to repeat a command several times, and get additional information about its runtime: mean, standard deviation etc. Read this short article to get you started,
We talk about C++ and its weakness for temporary objects and excessive copying. We also give some tips on how to avoid them and make your program faster.
We will talk about expensive instructions in modern CPUs and how to avoid them to speed up your program.
Profile guided optimizations are a compiler-supported optimization technique that is easy to use and will make your program run faster with little effort. Here you will learn how to enable it on your project and what kind of improvements you can expect.
We investigate what is the best way to store polymorphic objects in a container for fast access