This post has a second part, the same problem is solved differently. Read more. In this post we investigate long dependency chains: when an instruction depends on the previous instruction depends on the previous instruction… We want to see how long dependency chains lower CPU performance, and we want to measure the effect of interleaving…
All posts tagged performance
Making your program run faster: the key concepts of software performance
In this post we present key concepts of software performance engineering.
Speedscope: visualize what your program is doing and where it is spending time
In this post we introduce Speescope, a useful tool to help you visualize what your program is doing and where it is spending time.
The true price of virtual functions in C++
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.
2-minute read: How is Big O notation relevant on modern systems?
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.
2-minute read: What is faster, std::endl or ‘\n’?
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:…
Use explicit data prefetching to faster process your data structure
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: a small utility to measure your program’s runtime
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,
Excessive copying in C++ and your program’s speed
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.
Make your programs run faster: avoid expensive instructions
We will talk about expensive instructions in modern CPUs and how to avoid them to speed up your program.