Is resize + assign faster then reserve + emplace_back for vector?

published at 26.02.2026 18:06 by Jens Weller
Save to Instapaper Pocket

This question I've been asked by Farid Mehrabi on LinkedIn. And after quickly coming up with two tests for this on quick-bench, I've got interesting results with you to share!

Atomics in C++26?

published at 04.12.2025 18:05 by Jens Weller
Save to Instapaper Pocket

Did you know there is an C++26 addition to <atomic>?

Binary Trees: using unique_ptr

published at 20.11.2025 22:38 by Jens Weller
Save to Instapaper Pocket

Recently I've looked at binary trees, comparing a bare pointer version with new/delete against a binary tree that stores its nodes into a vector and uses indexes instead of pointers.

Looking at binary trees in C++

published at 22.10.2025 13:55 by Jens Weller
Save to Instapaper Pocket

I'm in the process of preparing a quick talk on trees in C++ for Meeting C++ 2025. In order to see what the web offers, I've searched exactly for this, "trees in C++".

Comparing accumulate to C++23s fold_left

published at 13.10.2025 21:34 by Jens Weller
Save to Instapaper Pocket

Recently I've used accumulate to sum up the t-shirt sizes for Meeting C++ 2025, and wondered if there as a ranges version I could use.

More Blog entries