Înapoi la articole →

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 14
  1. C++26 Pack Indexing

    C++26 pack indexing lets you select types and values from parameter packs directly with pack…[I], which removes a lot of tuple and index_sequence ceremony from metaprogramming utilities.

  2. Common Sandpiper at Nanhui

  3. Virtual Function Costs

    Measuring real performance cost of C++ virtual functions: vtable lookup overhead, branch misprediction, devirtualization, and when to avoid virtual dispatch.

  4. C++ Type Dispatch

    Techniques for type dispatch in C++: tag dispatch, if constexpr, std::variant with std::visit, and how to choose the right approach for your use case.

  5. How to Resolve Macro Name Collisions

    Practical techniques to resolve C/C++ macro name collisions between system headers and user code: undef, parenthesization, and inline function workarounds.

  6. A surprisingly valid C++ technique to access private class members using explicit template instantiation, with analysis of what the standard actually permits.

  7. How to elegantly dispatch from runtime values to compile-time types in C++ using techniques like std::variant, type lists, and template metaprogramming.

  8. Algorithms behind Popcount

    Three classical popcount algorithms: from naive bit-twiddling to the Hamming weight trick, plus how modern CPUs accelerate it with POPCNT and AVX-512.

  9. C++ Virtual Table Tables(VTT)

    A detailed walkthrough of how C++ virtual table of tables (VTT) works for classes with virtual base classes, with concrete memory layout examples.

  10. Visual walkthrough of C++ object memory layout: member ordering, padding, base class subobjects, vtable pointers, and how multiple inheritance affects layout.

  11. A Subtle Bug Before C++17

    A deep dive into a subtle C++ performance bug: why over-aligned dynamic memory allocation was undefined before C++17 and how alignas interacts with operator new.

  12. Deep dive into NanoLog, an extremely fast C++ logging library: how it achieves nanosecond-scale latency with lock-free queues and cache-line alignment.

  13. Glog Source Code Reading Notes

    Source code analysis of Google’s glog logging library: how it handles log severity, log file rotation, signal handling, and thread safety.

  14. A guide to returning values effectively in C++: RVO, NRVO, move semantics, and when to use out parameters — with benchmarks and compiler guarantees.