<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Variant on My C++ Technical Blog</title><link>https://konstantd.github.io/tags/variant/</link><description>Recent content in Variant on My C++ Technical Blog</description><generator>Hugo -- 0.155.3</generator><language>en-us</language><lastBuildDate>Wed, 13 May 2026 21:55:47 +0300</lastBuildDate><atom:link href="https://konstantd.github.io/tags/variant/index.xml" rel="self" type="application/rss+xml"/><item><title>Literally Everything You Need to Know About the Cost of Runtime Dispatch And How to Avoid It</title><link>https://konstantd.github.io/posts/get-rid-of-runtime-dispatch/</link><pubDate>Wed, 13 May 2026 21:55:47 +0300</pubDate><guid>https://konstantd.github.io/posts/get-rid-of-runtime-dispatch/</guid><description>&lt;p&gt;When writing classic Object-Oriented Programming (OOP) in C++, we are taught to design our systems using polymorphism. We define a base class with virtual functions, inherit from it, and manipulate those objects using base class pointers.&lt;/p&gt;
&lt;p&gt;At runtime, the program dynamically selects the correct function execution based on the actual object type. This is known as &lt;strong&gt;dynamic (or runtime) dispatch&lt;/strong&gt;. We will see below exactly what is happening behind the scenes.&lt;/p&gt;</description></item></channel></rss>