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: 56245

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: 22707

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

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

Read more
Views: 112722

C++ Core Guidelines: The Remaining Rules about Performance

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

Read more
Views: 16281

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: 18349

C++ Core Guidelines: Rules about Performance

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

Read more
Views: 24431

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: 35862

Multithreaded: Summation with Minimal Synchronization

Until now, I've used two strategies for the summation of 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: 23082

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: 50789

Single Threaded: Summation of a Vector

What is the fastest way to add the elements of a std::vector?. A question which I will pursue in the next 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: 27932

Mentoring

Stay Informed about my 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

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

Subscribe to the newsletter (+ pdf bundle)

All tags

Blog archive

Source Code

Visitors

Today 5453

Yesterday 7929

Week 21270

Month 165441

All 11646595

Currently are 282 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments