When we need to fill std::vector with values and the size of vector is known in advance, there are two possibilities: using emplace_back() or using operator[]. For the emplace_back() we should reserve the necessary amount of space with reserve() before emplacing into vector. This will avoid unnecessary vector regrow and benefit performance. Alternatively, if we…
All posts tagged simd
Loop Optimizations: how does the compiler do it?
Posted on Author Ivica BogosavljevićPosted in Help the Compiler, Performance, Toolchain and Performance2 Replies
We investigate what are the techniques your compiler employs to make your loop run faster.
Crash course introduction to parallelism: SIMD Parallelism
Posted on Author Ivica BogosavljevićPosted in Computational Performance, Low Level Performance, Parallelization, PerformanceLeave a Reply
This is the first article about hardware support for parallelization. We talk about SIMD, an extension almost every processor nowadays has that lets you speed up your program.
CPU Dispatching: Make your code both portable and fast
CPU dispatchingh is all about making your code portable and fast. We will talk about how to make your detect features your CPU has at is disposal and select the fastest function for that particular CPU without a need to recompile your software.