1-day workshop on May 30: Safe and Efficient C++ for Embedded Environments -- Andreas Fertig

me.pngFriday, May 30th, 2025, 10:00 - 18:00 Berlin time (online)

1-day workshop on May 30: Safe and Efficient C++ for Embedded Environments

by Andeas Fertig

About the training

I'm thrilled to let you know that I'll give the workshop "Safe and Efficient C++ for Embedded Environments".

The workshop will take place on Friday, May 30th, 2025, 10:00 - 18:00 Berlin time. It is a remote workshop, so we can join from everywhere.

The course is specifically for people in the embedded domain. You'll learn about various features of modern C++, as you can see in the outline below:

  • Language features in C++
    • References
    • nullptr
    • Explicit data type conversion
    • Uniform initialization
    • Digit separator
    • auto type deduction
    • range-based for loops
    • Strongly typed enum
    • static or inline
    • Attributes
  • ROM-ability
  • Living without the heap
  • Dynamic memory management
  • alignas & alignof
  • Placement-new
  • Implementing a pool allocator
  • std::launder
  • std::unique_ptr
  • std::start_life_time_as

C++ on Sea 2025 Full Schedule, including workshops

C++ on Sea 2025 runs from 23rd-25th June, with workshops on 26th-27th.

The full 2025 schedule is now available

by C++ on Sea

From the article:

This year we are, once again, running 2-day workshops - but they will be after the main conference, at the end of the week. As usual we have a great range of timely topics from world-class instructors to help you keep ahead.

We'll kick off with [a keynote from] Herb Sutter... regroup in the middle with Timur Doumler... then round out with Kristen Shaker.

Lightning talks... conference dinner... and a C++ quiz night.

 

free performance: autobatching in my SFML fork -- Vittorio Romeo

This article shows how a very simple automatic batching strategy can be applied on top of SFML without affecting the library API, resulting in free performance for the end user!

free performance: autobatching in my SFML fork

by Vittorio Romeo

From the article:

In one of my previous articles, I discussed the design and implementation of the batching system in my fork of SFML. Wouldn’t it be nice if drawables were automatically batched, whenever possible?

AoS vs SoA in practice: particle simulation -- Vittorio Romeo

This article presents a practical benchmark of a particle simulation using both the AoS (Array of Structures) and SoA (Structure of Arrays) data layouts. How much performance can we gain by merely switching up the way our data is stored?

AoS vs SoA in practice: particle simulation

by Vittorio Romeo

From the article:

The benchmark simulates a large number of 2D particles that continuously change position, scale, opacity, and rotation. Through an ImGui-based UI1, you can choose the number of particles, toggle multithreading, and switch between AoS and SoA on the fly.

A demo is worth a thousand words, and since my fork of SFML supports Emscripten, you can try the benchmark directly in your browser. Play around with all the options – I’m curious to hear what results you get! [...]

CLion Is Now Free for Non-Commercial Use

Great news for C++ enthusiasts working on personal projects! JetBrains has announced that CLion is now available for free for non-commercial use.

CLion Is Now Free for Non-Commercial Use

by JetBrains

From the article:

"Whether you're a student, an Arduino experimenter, or someone who loves С and C++ with all your heart despite all the challenges these languages present, CLion is now available to you for free – as long as you're not using it for commercial work."

Clang 20.1.0 Release Notes - Clang 20.1.0 Documentation

Clang 20.1.0 Release Notes - Clang 20.1.0 Documentation

From the release notes:

C++ Language Changes

  • Allow single element access of GCC vector/ext_vector_type object to be constant expression. Supports the V.xyzw syntax and other tidbits as seen in OpenCL. Selecting multiple elements is left as a future work.
  • Implement CWG1815. Support lifetime extension of temporary created by aggregate initialization using a default member initializer.
  • Accept C++26 user-defined static_assert messages in C++11 as an extension.
  • Add __builtin_elementwise_popcount builtin for integer types only.
  • Add __builtin_elementwise_fmod builtin for floating point types only.
  • Add __builtin_elementwise_minimum and __builtin_elementwise_maximum builtin for floating point types only.
  • The builtin type alias __builtin_common_type has been added to improve the performance of std::common_type.

C++2c Feature Support

C++23 Feature Support

C++20 Feature Support

  • Implemented module level lookup for C++20 modules. (#90154)

Slides of the 22nd of April 2025 BeCPP Meeting

On April 22nd 2025, I organized the next Belgian C++ Users Group event. There were 2 sessions:
- "Algorithm intuition revisited" (Bruno Hendrickx)
- "Compile-Time Emulation of an 8080-Inspired System in C++" (Tom Tesch)

You can find the schedule (with abstracts), slides, and pictures on the BeCPP blog:
Schedule: https://becpp.org/blog/2025/03/16/next-becpp-ug-meeting-planned-for-april-22nd-2025/
Slides: https://becpp.org/blog/2025/05/06/slides-of-the-22nd-of-april-2025-becpp-meeting/
Pictures: https://becpp.org/blog/2025/05/06/pictures-of-the-22nd-of-april-2025-becpp-meeting/

Speeding up C++ Code with Template Lambdas -- Daniel Lemire

image-16-825x510.jpgInteger division is one of the most expensive operations in C++, but when the divisor is known at compile time, the compiler can optimize it significantly. This post explores different approaches—using templates, lambda expressions, and template metaprogramming—to speed up division while maintaining clean and efficient code.

Speeding up C++ Code with Template Lambdas

by Daniel Lemire

From the article:

Let us consider a simple C++ function which divides all values in a range of integers:

void divide(std::span<int> i, int d) {
 for (auto& value : i) {
 value /= d;
 }
}

A division between two integers is one of the most expensive operations you can do over integers: it is much slower than a multiplication which is, in turn, more expensive than an addition. If the divisor d is known at compile-time, this function can be much faster. E.g., if d is 2, the compiler might optimize away the division and use a shift and a few cheap instructions instead. The same is true with all compile-time constant: the compiler can often do better knowing the constant. (See Lemire et al., Integer Division by Constants: Optimal Bounds, 2021)

GCC 15 is now available, with support for more draft C++26 features

gccegg-65.pngGCC 15 is now available!

Here are some highlights from the release notes' C++ section:

  • C++ Modules have been greatly improved.
  • Compilation time speed ups, e.g. by improving hashing of template specializations.

... and more, see the release notes.