Boost C++ Libraries

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

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Performance

Performance of Boost.Coroutine 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.

Table 1.1. Performance of asymmetric coroutines

Platform

switch

construction (protected stack-allocator)

construction (preallocated stack-allocator)

construction (standard stack-allocator)

i386 (AMD Athlon 64 DualCore 4400+, Linux 32bit)

49 ns / 50 cycles

51 µs / 51407 cycles

14 µs / 15231 cycles

14 µs / 15216 cycles

x86_64 (Intel Core2 Q6700, Linux 64bit)

12 ns / 39 cycles

16 µs / 41802 cycles

6 µs / 10350 cycles

6 µs / 18817 cycles


Table 1.2. Performance of symmetric coroutines

Platform

switch

construction (protected stack-allocator)

construction (preallocated stack-allocator)

construction (standard stack-allocator)

i386 (AMD Athlon 64 DualCore 4400+, Linux 32bit)

47 ns / 49 cycles

27 µs / 28002 cycles

98 ns / 116 cycles

319 ns / 328 cycles

x86_64 (Intel Core2 Q6700, Linux 64bit)

10 ns / 33 cycles

10 µs / 22828 cycles

42 ns / 710 cycles

135 ns / 362 cycles



PrevUpHomeNext