Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Performance

Performance measurements were taken using std::chrono::highresolution_clock, with overhead corrections. The code was compiled using the build options: variant = release, optimization = speed [1].

Table 1.1. Overhead of creating and joining

thread

fiber

tbb

qthread

31 µs

1.1 µs

570 ns

620 ns


Table 1.2. Overhead of detach

thread

fiber

20 µs

3.2 µs


Table 1.3. Overhead of yield

thread

fiber

38 µs

1.3 µs


Table 1.4. Overhead of waiting on a future

thread

fiber

32 µs

3.0 µs


Table 1.5. Scaling of creating and joining

average of

thread

fiber

10

50.65 µs

4.83 µs

50

52.99 µs

4.84 µs

100

50.44 µs

5.24 µs

500

45.19 µs

4.86 µs

1000

42.59 µs

5.04 µs

5000

42.30 µs

5.07 µs

10000

41.07 µs

5.12 µs


Using internally atomics by applying BOOST_FIBER_NO_ATOMICS.

Table 1.6. Overhead of creating and joining

thread

fiber

tbb

qthread

31 µs

955 ns

570 ns

620 ns


Table 1.7. Overhead of detach

thread

fiber

20 µs

3.2 µs


Table 1.8. Overhead of yield

thread

fiber

38 µs

1.1 µs


Table 1.9. Overhead of waiting on a future

thread

fiber

32 µs

2.4 µs


Table 1.10. Scaling of creating and joining

average of

thread

fiber

10

50.65 µs

3.76 µs

50

52.99 µs

2.78 µs

100

50.44 µs

2.45 µs

500

45.19 µs

2.91 µs

1000

42.59 µs

3.60 µs

5000

42.30 µs

4.57 µs

10000

41.07 µs

4.21 µs




[1] Intel Core2 Q6700, x86_64, 3GHz


PrevUpHomeNext