May 2022

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.

Writing a Network Client with Facebook's Wangle is a Fail -- Richard Thomson

Utah C++ Programmers has released a new video.

Writing a Network Client with Facebook's Wangle is a Fail

by Richard Thomson

From the video description:

Networking is often a core requirement for modern applications, but the standard C++ library doesn't yet include any networking support. The Boost libraries have had networking components in the ASIO library, but it looks complicated and filled with details. What if we aren't experts in networking but we need to have networking to support a feature in our application, what options are available to us?

Wangle claims to be "a library that makes it easy to build protocols, application clients, and application servers." Wangle is an open source library created at Facebook and depends on the folly and fizz libraries, also from Facebook. Folly is what you might call a "support library" containing various utility components that fill gaps in the standard C++ library, or provide components similar to those in the standard library that are optimized for particular use cases. Fizz is a TLS 1.2 (transport layer security) implementation from Facebook.

This month, Richard Thomson will give us an introduction to Wangle centered around writing a network client to talk to an NNTP server. We'll look at the main abstractions provided by Wangle and how those are used to build a network client to an NNTP server. NNTP (Network News Transfer Protocol) is a stateful network protocol for reading articles from newsgroups, generally referred to as "usenet". Unlike single hosted forums or mailing lists, usenet is a distributed system with no central authority, providing redundancy and resiliency from single point failures (like the host of your favorite forum suddenly deciding they don't want to pay server costs anymore and deleting the whole thing).

https://www.youtube.com/watch?v=3_M9rV0EuZ8

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 ?

Call for talks for Meeting C++ 2022

The official call for talks for this years Meeting C++ conference. To promote this years call for talks, Meeting C++ online organizes an event about technical speaking for C++. On May 24th 8 great speakers will share some of the aspects on preparing and giving talks with you...

Call for talks for Meeting C++ 2022

by Jens Weller

From the article:

In begin of April Meeting C++ 2022 was announced, and since then also the call for talks is technically running and a first set of interesting talks has been submitted.

As Meeting C++ 2022 is a hybrid conference, taking place online and in Berlin. Likely the bigger audience will be online, and speakers are expected to be ready to give their talk online. You can submit and edit your talk until June 12th.