Performance

C++ Core Guidelines: Improved Performance with Iostreams

As easy as my title and the rules of the C++ core guidelines sound, getting more performance out of the iostreams is no no-brainer.

Read more
Views: 58028

C++ Core Guidelines: Avoid Bounds Errors

When you access an element outside a container of the STL, the result is not so promising. Your effect may be an error or undefined behavior. Undefined behavior means all bets are open.

Read more
Views: 23514

C++ Core Guidelines: std::array and std::vector are your Friends

In 99 % of your use cases for a sequential container, you are outstanding with a std::array or a std::vector. What? If you don't believe me, read this post.

Read more
Views: 115358

C++ Core Guidelines: The Remaining Rules about Performance

Today, I will write about the remaining ten rules of performance. Ten rules seem to be a lot, but only two have content.

Read more
Views: 16833

C++ Core Guidelines: More Rules about Performance

In this post, I continue my journey through the rules to performance in the C++ Core Guidelines.  I will mainly write about design for optimization.

Read more
Views: 19090

C++ Core Guidelines: Rules about Performance

Before I write about the rules of performance, I will do a straightforward job. Accessing the elements of a container one by one.

Read more
Views: 25283

My Conclusion: Summation of a Vector in three Variants

After I've calculated in three different ways the sum of a std::vector I want to draw my conclusions.

Read more
Views: 36549

Multithreaded: Summation with Minimal Synchronization

Until now, I've used two strategies to summate a std::vector. First, I did the whole math in one thread (Single Threaded: Summation of a vector); second multiple threads shared the same variable for the result (Multithreaded: Summation of a vector). In particular, the second strategy was extremely naive. In this post, I will apply my knowledge of both posts. My goal is that the thread will perform their summation as independently from each other as possible and therefore reduce the synchronization overhead. 

Read more
Views: 23991

Multithreaded: Summation of a Vector

My goal is to sum up all elements of a vector. I used in the last post a single thread. In this post, I use multiple threads and, therefore, the full power of my PC. The addition will be done on a shared variable. What, at first glance, seems like a good idea is a very naive strategy. The synchronization overhead of the summation variable is higher than the performance benefit of my four or two cores.

Read more
Views: 52447

Single Threaded: Summation of a Vector

What is the fastest way to add the elements of a std::vector? This a question that I will pursue in the following posts. I use the single-threaded addition as the reference number. In further posts, I discuss atomics, locks, and thread-local data.

Read more
Views: 29033

Stay Informed about my Mentoring

 

Mentoring

English Books

Course: Modern C++ Concurrency in Practice

Course: C++ Standard Library including C++14 & C++17

Course: Embedded Programming with Modern C++

Course: Generic Programming (Templates)

Course: C++ Fundamentals for Professionals

Course: The All-in-One Guide to C++20

Course: Master Software Design Patterns and Architecture in C++

Subscribe to the newsletter (+ pdf bundle)

All tags

Blog archive

Source Code

Visitors

Today 3476

Yesterday 5555

Week 33684

Month 55358

All 12133567

Currently are 173 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments