Hi there! 👋

This is my technical blog, where I will focus on C++ since it is what I am mostly using. I will share my experiences from technical projects I have worked on, as well as the latest developments of C++. I will try to keep the articles short, purely technical and to the point without fluffy additions. I hope you find it useful! :)

📢 Subscribe to my technical blog to receive updates on my latest blog posts and projects.

Avoid the RAM Latency: Keeping the Cache Hot and on Linear Access is the Ultimate C++ Optimization

In this benchmark, we explore the importance of keeping data within the CPU cache to avoid expensive retrieval from RAM. By simply ensuring linear data access and accessing by blocks that fit in L1 and L2, we can achieve massive performance gains without changing the underlying algorithm.

February 24, 2026 · 13 min · 2761 words

De-Optimizing C++: How Manual Moves Kills NRVO

Returning a moved big object will actually create extra overhead for the compiler, as a zero-cost operation is traded for a cheap move operation.

January 10, 2026 · 3 min · 530 words

The Most Dangerous Pattern in C++: Why `const T&` Is Breaking Your Code

const T& binds to everything but it is dangerous

January 7, 2026 · 5 min · 871 words

C++ Move Semantics: Why 'noexcept' is mandatory for High-Performance Containers

Ideally, we should never throw on the move Constructor of an object. If a move constructor throws an exception while a vector is resizing, the vector is in a “broken” state: half of the elements are in the new memory, and half are in the old memory. Move operations often modify the source object (leaving it empty or null), making it dangerous to undo the changes. Therefore, the compiler wants to avoid this risk and uses a copy rather than a movment. We want to avoid this, and the way to do this is to declare the move constructor as noexcept. Like this, we give the promise that we do not throw, and the compiler can safely use it. ...

December 29, 2025 · 3 min · 624 words

Inheritance Downcasting is Dangerous

Converting a base-class pointer to a derived-class pointer is downcasting. We should be careful when we do that in order to avoid UBs.

November 26, 2025 · 2 min · 381 words

Advanced Template Metaprogramming: Implementing Hardware Constraints with C++20 Concepts

Templates complilation generate code at compile time, before the program is executed (compile-time vs run-time). Every different instantiation produces a separate function at compile time. This way we avoid writing duplication of the code. Also, we can avoid mistakes even on compilation time when we static assert them. As the name suggests, this checks takes place statically - on compilation. Like this, we avoid mistakes that might appear during runtime, when we should not instantiate a function of a specific type. Static-asserts was already introduced in C++11, though the we have some important imporvements in C++17 like CTAD and concepts or requires in C++20. ...

November 11, 2025 · 4 min · 739 words