Top-7 Performance Traps for Every Developer

According to the recent popular paper “There is plenty of room at the top”1, SW tuning will be one of the key drivers for performance gains in the near future. The growth of a single-threaded performance of modern HW is slowing down, that’s why SW tuning will become more important than it has been for the last 40 years.

READ MORE...

C++20 Concepts - a Quick Introduction

Concepts are a revolutionary approach for writing templates! They allow you to put constraints on template parameters that improve the readability of code, speed up compilation time, and give better error messages. Read on and learn how to use them in your code! What is a concept? In short, a concept is a set of constraints on template parameters evaluated at compile time.

READ MORE...

Strong Types in C++: A Concrete Example

When you create a model for your domain, C++ offers you flexibility and increates type-safety with so-called Strong Types. Rather than working with simple built-in types, you can create a set of well-defined classes that better suits your needs. In a new blog post, you can see one concrete example of such a design practice.

READ MORE...

constexpr Dynamic Memory Allocation, C++20

constexpr has become a major feature for compile-time programming in C++. Introduced in a simple form in C++11 evolved into almost another “sub-language”, an alternative to regular template code. In C++20 you can even use std::vector and std::string in constexpr context! In this article, I’d like to discuss constexpr memory allocations, a building block for std::vector.

READ MORE...

Improving Print Logging with Line Pos Info & Modern C++

No matter how proficient you are, I think, you might still use one of the primary methods of debugging: trace values using printf, TRACE, outputDebugString, etc… and then scan the output while debugging. Adding information about the line number and the file where the log message comes from is a very efficient method that might save you a lot of time.

READ MORE...

Implementing Parallel copy_if in C++

In a blog post about a dozen ways to filter elements, I mentioned only serial versions of the code. But how about leveraging concurrency? Maybe we can throw some more threads and async tasks and complete the copy faster? For example, I have 6 cores on my machine, so it would be nice to see, like 5x speedup over the sequential copy?

READ MORE...

C++ Lambda Story in Print

I’m happy to announce the print/paperback version of C++ Lambda Story! After more than a year of updates and smaller changes, the whole project is completed! You can now purchase the book in lots of different formats. See details of this major update and also take part in a giveaway and get the book for free :)

READ MORE...