Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards



Performance of Boost.Context was measured on the platforms shown in the following table. Performance measurements were taken using rdtsc and boost::chrono::high_resolution_clock, with overhead corrections, on x86 platforms. In each case, cache warm-up was accounted for, and the one running thread was pinned to a single CPU. The code was compiled using the build options, 'variant = release cxxflags = -DBOOST_DISABLE_ASSERTS'.

Table 1.1. Performance of context switch



execution_context (v1)

execution_context (v2)

x86_64 [a]

547 ns / 1433 cycles

30 ns / 80 cycles

8 ns / 25 cycles

[a] Intel Core i7-4770S 3.10GHz