Variant Visitation V2--Michael Park

Optimising accesses.

Variant Visitation V2

by Michael Park

From the article:

In 2015, I wrote an article titled Variant Visitation which described an implementation strategy for std::visit. The approach involved a matrix of function pointers, and many have raised concerns regarding poor code-gen caused by optimization limitations of function pointers on some compilers.

This post describes the switch-based approach implemented in mpark/variant, and its benchmark results...

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.