Articles & Books

Technical Speaking about C++

Meeting C++ organized an event centered around sharing material on creating better talks and presentations for C++:

Technical Speaking about C++

by Jens Weller

About the article:

This event will focus on the process of creating technical talks for the C++ community. Various speakers will share their views on how to submit, prepare and give talks to the C++ community in the form of lightning talks.

 

Should I pay attention to the warning that I’m std::move‘ing from a trivial type? Part 2--Raymond Ch

The series continue.

Should I pay attention to the warning that I’m std::move‘ing from a trivial type? Part 2

by Raymond Chen

From the article:

Last time, we looked at motivations for std::move‘ing from a trivial type. Our investigation looked at the problem through the eyes of the object moved from, but there’s another way to look at the problem, and that’s from the point of view of the object being moved to...

Dawn of a new C++ cycle--Jens Weller

What do you think?

Dawn of a new C++ cycle

by Jens Weller

From the article:

It was 10 years ago when one would realize that a new era for C++ was in its beginning: C++11 was a fundamental change. Many things that one wanted to have in the language or standard library suddenly became available, if one had the right compiler in the newest version. And in this time 10 years ago, the first C++now happend in Aspen, as it has again in the beginning of May...

Speeding up Pattern Searches with Boyer-Moore Algorithm from C++17--Bartlomiej Filipek

Interested?

Speeding up Pattern Searches with Boyer-Moore Algorithm from C++17

by Bartlomiej Filipek

From the article:

With C++17, you can now use more sophisticated algorithms for pattern searches! You’ll have more control and a promising performance boost for many use cases. This article shows primary usage and runs a benchmark comparing the new techniques.

May 2022 Updates: added notes about C++20 and constexpr algorithms, updated the benchmark and compared against std::ranges::search and custom strchr versions.

Optimizing C++ Code with O(1) Operations -- Giovanni Dicanio

Continuing from the previous Adventures with string_view post, in this new article I show how you can achieve massive performance gains using code characterized by O(1) constant-time asymptotic complexity.

Adventures with string_view: Optimizing Code with O(1) Operations

by Giovanni Dicanio

From the article:

While this code works fine, it’s possible to optimize it.

As the saying goes, first make things work, then make things fast.

Replacing a O(N) operation with a O(1) operation in this case gives a performance boost of 88 ms vs. 445 ms, which is an 80% performance gain!

 

C++20 Coroutines back to basics — Restrictions and rules for legal coroutines--Gajendra Gulgulia

Surprising but useful.

C++20 Coroutines back to basics — Restrictions and rules for legal coroutines

by Gajendra Gulgulia

From the article:

In my previous articles on coroutines, I attempted to explain the mechanics of coroutine suspension, resuming it, promise_type, awaiters and awaitables. In this article, I would like to answer two very basic questions:

  • What are the restrictions on coroutines ?
  • When can a coroutine usage be legal in terms of member, non-member functions of class/structs, lambda expressions and so on ?