2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-01-19 04:12:09 +00:00

add performance tests

This commit is contained in:
Oliver Kowalke
2015-10-18 09:09:05 +02:00
parent 5f5a607d87
commit d49aeb194c
35 changed files with 67356 additions and 0 deletions

44
performance/clock.hpp Normal file
View File

@@ -0,0 +1,44 @@
// Copyright Oliver Kowalke 2009.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef CLOCK_H
#define CLOCK_H
#include <algorithm>
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <numeric>
#include <vector>
#include <boost/assert.hpp>
typedef std::chrono::steady_clock clock_type;
typedef clock_type::duration duration_type;
typedef clock_type::time_point time_point_type;
struct clock_overhead
{
std::uint64_t operator()()
{
time_point_type start( clock_type::now() );
return ( clock_type::now() - start).count();
}
};
duration_type overhead_clock()
{
std::size_t iterations( 10);
std::vector< std::uint64_t > overhead( iterations, 0);
for ( std::size_t i = 0; i < iterations; ++i)
std::generate(
overhead.begin(), overhead.end(),
clock_overhead() );
BOOST_ASSERT( overhead.begin() != overhead.end() );
return duration_type( std::accumulate( overhead.begin(), overhead.end(), 0) / iterations);
}
#endif // CLOCK_H

View File

@@ -0,0 +1,54 @@
# Copyright Oliver Kowalke 2009.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# For more information, see http://www.boost.org/
import common ;
import feature ;
import indirect ;
import modules ;
import os ;
import toolset ;
project boost/fiber/performance/fiber
: requirements
<library>/boost/chrono//boost_chrono
<library>/boost/fiber//boost_fiber
<library>/boost/program_options//boost_program_options
<toolset>gcc,<segmented-stacks>on:<cxxflags>-fsplit-stack
<toolset>gcc,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS
<toolset>clang,<segmented-stacks>on:<cxxflags>-fsplit-stack
<toolset>clang,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS
<link>static
<threading>multi
<cxxflags>-DBOOST_DISABLE_ASSERTS
<optimization>speed
<variant>release
;
exe overhead_create
: overhead_create.cpp
;
exe overhead_join
: overhead_join.cpp
;
exe overhead_detach
: overhead_detach.cpp
;
exe overhead_yield
: overhead_yield.cpp
;
exe overhead_future
: overhead_future.cpp
;
#exe scale_join
# : scale_join.cpp
# ;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,500 @@
boost::fibers::fiber f1( worker);
boost::fibers::fiber f2( worker);
boost::fibers::fiber f3( worker);
boost::fibers::fiber f4( worker);
boost::fibers::fiber f5( worker);
boost::fibers::fiber f6( worker);
boost::fibers::fiber f7( worker);
boost::fibers::fiber f8( worker);
boost::fibers::fiber f9( worker);
boost::fibers::fiber f10( worker);
boost::fibers::fiber f11( worker);
boost::fibers::fiber f12( worker);
boost::fibers::fiber f13( worker);
boost::fibers::fiber f14( worker);
boost::fibers::fiber f15( worker);
boost::fibers::fiber f16( worker);
boost::fibers::fiber f17( worker);
boost::fibers::fiber f18( worker);
boost::fibers::fiber f19( worker);
boost::fibers::fiber f20( worker);
boost::fibers::fiber f21( worker);
boost::fibers::fiber f22( worker);
boost::fibers::fiber f23( worker);
boost::fibers::fiber f24( worker);
boost::fibers::fiber f25( worker);
boost::fibers::fiber f26( worker);
boost::fibers::fiber f27( worker);
boost::fibers::fiber f28( worker);
boost::fibers::fiber f29( worker);
boost::fibers::fiber f30( worker);
boost::fibers::fiber f31( worker);
boost::fibers::fiber f32( worker);
boost::fibers::fiber f33( worker);
boost::fibers::fiber f34( worker);
boost::fibers::fiber f35( worker);
boost::fibers::fiber f36( worker);
boost::fibers::fiber f37( worker);
boost::fibers::fiber f38( worker);
boost::fibers::fiber f39( worker);
boost::fibers::fiber f40( worker);
boost::fibers::fiber f41( worker);
boost::fibers::fiber f42( worker);
boost::fibers::fiber f43( worker);
boost::fibers::fiber f44( worker);
boost::fibers::fiber f45( worker);
boost::fibers::fiber f46( worker);
boost::fibers::fiber f47( worker);
boost::fibers::fiber f48( worker);
boost::fibers::fiber f49( worker);
boost::fibers::fiber f50( worker);
boost::fibers::fiber f51( worker);
boost::fibers::fiber f52( worker);
boost::fibers::fiber f53( worker);
boost::fibers::fiber f54( worker);
boost::fibers::fiber f55( worker);
boost::fibers::fiber f56( worker);
boost::fibers::fiber f57( worker);
boost::fibers::fiber f58( worker);
boost::fibers::fiber f59( worker);
boost::fibers::fiber f60( worker);
boost::fibers::fiber f61( worker);
boost::fibers::fiber f62( worker);
boost::fibers::fiber f63( worker);
boost::fibers::fiber f64( worker);
boost::fibers::fiber f65( worker);
boost::fibers::fiber f66( worker);
boost::fibers::fiber f67( worker);
boost::fibers::fiber f68( worker);
boost::fibers::fiber f69( worker);
boost::fibers::fiber f70( worker);
boost::fibers::fiber f71( worker);
boost::fibers::fiber f72( worker);
boost::fibers::fiber f73( worker);
boost::fibers::fiber f74( worker);
boost::fibers::fiber f75( worker);
boost::fibers::fiber f76( worker);
boost::fibers::fiber f77( worker);
boost::fibers::fiber f78( worker);
boost::fibers::fiber f79( worker);
boost::fibers::fiber f80( worker);
boost::fibers::fiber f81( worker);
boost::fibers::fiber f82( worker);
boost::fibers::fiber f83( worker);
boost::fibers::fiber f84( worker);
boost::fibers::fiber f85( worker);
boost::fibers::fiber f86( worker);
boost::fibers::fiber f87( worker);
boost::fibers::fiber f88( worker);
boost::fibers::fiber f89( worker);
boost::fibers::fiber f90( worker);
boost::fibers::fiber f91( worker);
boost::fibers::fiber f92( worker);
boost::fibers::fiber f93( worker);
boost::fibers::fiber f94( worker);
boost::fibers::fiber f95( worker);
boost::fibers::fiber f96( worker);
boost::fibers::fiber f97( worker);
boost::fibers::fiber f98( worker);
boost::fibers::fiber f99( worker);
boost::fibers::fiber f100( worker);
boost::fibers::fiber f101( worker);
boost::fibers::fiber f102( worker);
boost::fibers::fiber f103( worker);
boost::fibers::fiber f104( worker);
boost::fibers::fiber f105( worker);
boost::fibers::fiber f106( worker);
boost::fibers::fiber f107( worker);
boost::fibers::fiber f108( worker);
boost::fibers::fiber f109( worker);
boost::fibers::fiber f110( worker);
boost::fibers::fiber f111( worker);
boost::fibers::fiber f112( worker);
boost::fibers::fiber f113( worker);
boost::fibers::fiber f114( worker);
boost::fibers::fiber f115( worker);
boost::fibers::fiber f116( worker);
boost::fibers::fiber f117( worker);
boost::fibers::fiber f118( worker);
boost::fibers::fiber f119( worker);
boost::fibers::fiber f120( worker);
boost::fibers::fiber f121( worker);
boost::fibers::fiber f122( worker);
boost::fibers::fiber f123( worker);
boost::fibers::fiber f124( worker);
boost::fibers::fiber f125( worker);
boost::fibers::fiber f126( worker);
boost::fibers::fiber f127( worker);
boost::fibers::fiber f128( worker);
boost::fibers::fiber f129( worker);
boost::fibers::fiber f130( worker);
boost::fibers::fiber f131( worker);
boost::fibers::fiber f132( worker);
boost::fibers::fiber f133( worker);
boost::fibers::fiber f134( worker);
boost::fibers::fiber f135( worker);
boost::fibers::fiber f136( worker);
boost::fibers::fiber f137( worker);
boost::fibers::fiber f138( worker);
boost::fibers::fiber f139( worker);
boost::fibers::fiber f140( worker);
boost::fibers::fiber f141( worker);
boost::fibers::fiber f142( worker);
boost::fibers::fiber f143( worker);
boost::fibers::fiber f144( worker);
boost::fibers::fiber f145( worker);
boost::fibers::fiber f146( worker);
boost::fibers::fiber f147( worker);
boost::fibers::fiber f148( worker);
boost::fibers::fiber f149( worker);
boost::fibers::fiber f150( worker);
boost::fibers::fiber f151( worker);
boost::fibers::fiber f152( worker);
boost::fibers::fiber f153( worker);
boost::fibers::fiber f154( worker);
boost::fibers::fiber f155( worker);
boost::fibers::fiber f156( worker);
boost::fibers::fiber f157( worker);
boost::fibers::fiber f158( worker);
boost::fibers::fiber f159( worker);
boost::fibers::fiber f160( worker);
boost::fibers::fiber f161( worker);
boost::fibers::fiber f162( worker);
boost::fibers::fiber f163( worker);
boost::fibers::fiber f164( worker);
boost::fibers::fiber f165( worker);
boost::fibers::fiber f166( worker);
boost::fibers::fiber f167( worker);
boost::fibers::fiber f168( worker);
boost::fibers::fiber f169( worker);
boost::fibers::fiber f170( worker);
boost::fibers::fiber f171( worker);
boost::fibers::fiber f172( worker);
boost::fibers::fiber f173( worker);
boost::fibers::fiber f174( worker);
boost::fibers::fiber f175( worker);
boost::fibers::fiber f176( worker);
boost::fibers::fiber f177( worker);
boost::fibers::fiber f178( worker);
boost::fibers::fiber f179( worker);
boost::fibers::fiber f180( worker);
boost::fibers::fiber f181( worker);
boost::fibers::fiber f182( worker);
boost::fibers::fiber f183( worker);
boost::fibers::fiber f184( worker);
boost::fibers::fiber f185( worker);
boost::fibers::fiber f186( worker);
boost::fibers::fiber f187( worker);
boost::fibers::fiber f188( worker);
boost::fibers::fiber f189( worker);
boost::fibers::fiber f190( worker);
boost::fibers::fiber f191( worker);
boost::fibers::fiber f192( worker);
boost::fibers::fiber f193( worker);
boost::fibers::fiber f194( worker);
boost::fibers::fiber f195( worker);
boost::fibers::fiber f196( worker);
boost::fibers::fiber f197( worker);
boost::fibers::fiber f198( worker);
boost::fibers::fiber f199( worker);
boost::fibers::fiber f200( worker);
boost::fibers::fiber f201( worker);
boost::fibers::fiber f202( worker);
boost::fibers::fiber f203( worker);
boost::fibers::fiber f204( worker);
boost::fibers::fiber f205( worker);
boost::fibers::fiber f206( worker);
boost::fibers::fiber f207( worker);
boost::fibers::fiber f208( worker);
boost::fibers::fiber f209( worker);
boost::fibers::fiber f210( worker);
boost::fibers::fiber f211( worker);
boost::fibers::fiber f212( worker);
boost::fibers::fiber f213( worker);
boost::fibers::fiber f214( worker);
boost::fibers::fiber f215( worker);
boost::fibers::fiber f216( worker);
boost::fibers::fiber f217( worker);
boost::fibers::fiber f218( worker);
boost::fibers::fiber f219( worker);
boost::fibers::fiber f220( worker);
boost::fibers::fiber f221( worker);
boost::fibers::fiber f222( worker);
boost::fibers::fiber f223( worker);
boost::fibers::fiber f224( worker);
boost::fibers::fiber f225( worker);
boost::fibers::fiber f226( worker);
boost::fibers::fiber f227( worker);
boost::fibers::fiber f228( worker);
boost::fibers::fiber f229( worker);
boost::fibers::fiber f230( worker);
boost::fibers::fiber f231( worker);
boost::fibers::fiber f232( worker);
boost::fibers::fiber f233( worker);
boost::fibers::fiber f234( worker);
boost::fibers::fiber f235( worker);
boost::fibers::fiber f236( worker);
boost::fibers::fiber f237( worker);
boost::fibers::fiber f238( worker);
boost::fibers::fiber f239( worker);
boost::fibers::fiber f240( worker);
boost::fibers::fiber f241( worker);
boost::fibers::fiber f242( worker);
boost::fibers::fiber f243( worker);
boost::fibers::fiber f244( worker);
boost::fibers::fiber f245( worker);
boost::fibers::fiber f246( worker);
boost::fibers::fiber f247( worker);
boost::fibers::fiber f248( worker);
boost::fibers::fiber f249( worker);
boost::fibers::fiber f250( worker);
boost::fibers::fiber f251( worker);
boost::fibers::fiber f252( worker);
boost::fibers::fiber f253( worker);
boost::fibers::fiber f254( worker);
boost::fibers::fiber f255( worker);
boost::fibers::fiber f256( worker);
boost::fibers::fiber f257( worker);
boost::fibers::fiber f258( worker);
boost::fibers::fiber f259( worker);
boost::fibers::fiber f260( worker);
boost::fibers::fiber f261( worker);
boost::fibers::fiber f262( worker);
boost::fibers::fiber f263( worker);
boost::fibers::fiber f264( worker);
boost::fibers::fiber f265( worker);
boost::fibers::fiber f266( worker);
boost::fibers::fiber f267( worker);
boost::fibers::fiber f268( worker);
boost::fibers::fiber f269( worker);
boost::fibers::fiber f270( worker);
boost::fibers::fiber f271( worker);
boost::fibers::fiber f272( worker);
boost::fibers::fiber f273( worker);
boost::fibers::fiber f274( worker);
boost::fibers::fiber f275( worker);
boost::fibers::fiber f276( worker);
boost::fibers::fiber f277( worker);
boost::fibers::fiber f278( worker);
boost::fibers::fiber f279( worker);
boost::fibers::fiber f280( worker);
boost::fibers::fiber f281( worker);
boost::fibers::fiber f282( worker);
boost::fibers::fiber f283( worker);
boost::fibers::fiber f284( worker);
boost::fibers::fiber f285( worker);
boost::fibers::fiber f286( worker);
boost::fibers::fiber f287( worker);
boost::fibers::fiber f288( worker);
boost::fibers::fiber f289( worker);
boost::fibers::fiber f290( worker);
boost::fibers::fiber f291( worker);
boost::fibers::fiber f292( worker);
boost::fibers::fiber f293( worker);
boost::fibers::fiber f294( worker);
boost::fibers::fiber f295( worker);
boost::fibers::fiber f296( worker);
boost::fibers::fiber f297( worker);
boost::fibers::fiber f298( worker);
boost::fibers::fiber f299( worker);
boost::fibers::fiber f300( worker);
boost::fibers::fiber f301( worker);
boost::fibers::fiber f302( worker);
boost::fibers::fiber f303( worker);
boost::fibers::fiber f304( worker);
boost::fibers::fiber f305( worker);
boost::fibers::fiber f306( worker);
boost::fibers::fiber f307( worker);
boost::fibers::fiber f308( worker);
boost::fibers::fiber f309( worker);
boost::fibers::fiber f310( worker);
boost::fibers::fiber f311( worker);
boost::fibers::fiber f312( worker);
boost::fibers::fiber f313( worker);
boost::fibers::fiber f314( worker);
boost::fibers::fiber f315( worker);
boost::fibers::fiber f316( worker);
boost::fibers::fiber f317( worker);
boost::fibers::fiber f318( worker);
boost::fibers::fiber f319( worker);
boost::fibers::fiber f320( worker);
boost::fibers::fiber f321( worker);
boost::fibers::fiber f322( worker);
boost::fibers::fiber f323( worker);
boost::fibers::fiber f324( worker);
boost::fibers::fiber f325( worker);
boost::fibers::fiber f326( worker);
boost::fibers::fiber f327( worker);
boost::fibers::fiber f328( worker);
boost::fibers::fiber f329( worker);
boost::fibers::fiber f330( worker);
boost::fibers::fiber f331( worker);
boost::fibers::fiber f332( worker);
boost::fibers::fiber f333( worker);
boost::fibers::fiber f334( worker);
boost::fibers::fiber f335( worker);
boost::fibers::fiber f336( worker);
boost::fibers::fiber f337( worker);
boost::fibers::fiber f338( worker);
boost::fibers::fiber f339( worker);
boost::fibers::fiber f340( worker);
boost::fibers::fiber f341( worker);
boost::fibers::fiber f342( worker);
boost::fibers::fiber f343( worker);
boost::fibers::fiber f344( worker);
boost::fibers::fiber f345( worker);
boost::fibers::fiber f346( worker);
boost::fibers::fiber f347( worker);
boost::fibers::fiber f348( worker);
boost::fibers::fiber f349( worker);
boost::fibers::fiber f350( worker);
boost::fibers::fiber f351( worker);
boost::fibers::fiber f352( worker);
boost::fibers::fiber f353( worker);
boost::fibers::fiber f354( worker);
boost::fibers::fiber f355( worker);
boost::fibers::fiber f356( worker);
boost::fibers::fiber f357( worker);
boost::fibers::fiber f358( worker);
boost::fibers::fiber f359( worker);
boost::fibers::fiber f360( worker);
boost::fibers::fiber f361( worker);
boost::fibers::fiber f362( worker);
boost::fibers::fiber f363( worker);
boost::fibers::fiber f364( worker);
boost::fibers::fiber f365( worker);
boost::fibers::fiber f366( worker);
boost::fibers::fiber f367( worker);
boost::fibers::fiber f368( worker);
boost::fibers::fiber f369( worker);
boost::fibers::fiber f370( worker);
boost::fibers::fiber f371( worker);
boost::fibers::fiber f372( worker);
boost::fibers::fiber f373( worker);
boost::fibers::fiber f374( worker);
boost::fibers::fiber f375( worker);
boost::fibers::fiber f376( worker);
boost::fibers::fiber f377( worker);
boost::fibers::fiber f378( worker);
boost::fibers::fiber f379( worker);
boost::fibers::fiber f380( worker);
boost::fibers::fiber f381( worker);
boost::fibers::fiber f382( worker);
boost::fibers::fiber f383( worker);
boost::fibers::fiber f384( worker);
boost::fibers::fiber f385( worker);
boost::fibers::fiber f386( worker);
boost::fibers::fiber f387( worker);
boost::fibers::fiber f388( worker);
boost::fibers::fiber f389( worker);
boost::fibers::fiber f390( worker);
boost::fibers::fiber f391( worker);
boost::fibers::fiber f392( worker);
boost::fibers::fiber f393( worker);
boost::fibers::fiber f394( worker);
boost::fibers::fiber f395( worker);
boost::fibers::fiber f396( worker);
boost::fibers::fiber f397( worker);
boost::fibers::fiber f398( worker);
boost::fibers::fiber f399( worker);
boost::fibers::fiber f400( worker);
boost::fibers::fiber f401( worker);
boost::fibers::fiber f402( worker);
boost::fibers::fiber f403( worker);
boost::fibers::fiber f404( worker);
boost::fibers::fiber f405( worker);
boost::fibers::fiber f406( worker);
boost::fibers::fiber f407( worker);
boost::fibers::fiber f408( worker);
boost::fibers::fiber f409( worker);
boost::fibers::fiber f410( worker);
boost::fibers::fiber f411( worker);
boost::fibers::fiber f412( worker);
boost::fibers::fiber f413( worker);
boost::fibers::fiber f414( worker);
boost::fibers::fiber f415( worker);
boost::fibers::fiber f416( worker);
boost::fibers::fiber f417( worker);
boost::fibers::fiber f418( worker);
boost::fibers::fiber f419( worker);
boost::fibers::fiber f420( worker);
boost::fibers::fiber f421( worker);
boost::fibers::fiber f422( worker);
boost::fibers::fiber f423( worker);
boost::fibers::fiber f424( worker);
boost::fibers::fiber f425( worker);
boost::fibers::fiber f426( worker);
boost::fibers::fiber f427( worker);
boost::fibers::fiber f428( worker);
boost::fibers::fiber f429( worker);
boost::fibers::fiber f430( worker);
boost::fibers::fiber f431( worker);
boost::fibers::fiber f432( worker);
boost::fibers::fiber f433( worker);
boost::fibers::fiber f434( worker);
boost::fibers::fiber f435( worker);
boost::fibers::fiber f436( worker);
boost::fibers::fiber f437( worker);
boost::fibers::fiber f438( worker);
boost::fibers::fiber f439( worker);
boost::fibers::fiber f440( worker);
boost::fibers::fiber f441( worker);
boost::fibers::fiber f442( worker);
boost::fibers::fiber f443( worker);
boost::fibers::fiber f444( worker);
boost::fibers::fiber f445( worker);
boost::fibers::fiber f446( worker);
boost::fibers::fiber f447( worker);
boost::fibers::fiber f448( worker);
boost::fibers::fiber f449( worker);
boost::fibers::fiber f450( worker);
boost::fibers::fiber f451( worker);
boost::fibers::fiber f452( worker);
boost::fibers::fiber f453( worker);
boost::fibers::fiber f454( worker);
boost::fibers::fiber f455( worker);
boost::fibers::fiber f456( worker);
boost::fibers::fiber f457( worker);
boost::fibers::fiber f458( worker);
boost::fibers::fiber f459( worker);
boost::fibers::fiber f460( worker);
boost::fibers::fiber f461( worker);
boost::fibers::fiber f462( worker);
boost::fibers::fiber f463( worker);
boost::fibers::fiber f464( worker);
boost::fibers::fiber f465( worker);
boost::fibers::fiber f466( worker);
boost::fibers::fiber f467( worker);
boost::fibers::fiber f468( worker);
boost::fibers::fiber f469( worker);
boost::fibers::fiber f470( worker);
boost::fibers::fiber f471( worker);
boost::fibers::fiber f472( worker);
boost::fibers::fiber f473( worker);
boost::fibers::fiber f474( worker);
boost::fibers::fiber f475( worker);
boost::fibers::fiber f476( worker);
boost::fibers::fiber f477( worker);
boost::fibers::fiber f478( worker);
boost::fibers::fiber f479( worker);
boost::fibers::fiber f480( worker);
boost::fibers::fiber f481( worker);
boost::fibers::fiber f482( worker);
boost::fibers::fiber f483( worker);
boost::fibers::fiber f484( worker);
boost::fibers::fiber f485( worker);
boost::fibers::fiber f486( worker);
boost::fibers::fiber f487( worker);
boost::fibers::fiber f488( worker);
boost::fibers::fiber f489( worker);
boost::fibers::fiber f490( worker);
boost::fibers::fiber f491( worker);
boost::fibers::fiber f492( worker);
boost::fibers::fiber f493( worker);
boost::fibers::fiber f494( worker);
boost::fibers::fiber f495( worker);
boost::fibers::fiber f496( worker);
boost::fibers::fiber f497( worker);
boost::fibers::fiber f498( worker);
boost::fibers::fiber f499( worker);
boost::fibers::fiber f500( worker);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,500 @@
f1.join();
f2.join();
f3.join();
f4.join();
f5.join();
f6.join();
f7.join();
f8.join();
f9.join();
f10.join();
f11.join();
f12.join();
f13.join();
f14.join();
f15.join();
f16.join();
f17.join();
f18.join();
f19.join();
f20.join();
f21.join();
f22.join();
f23.join();
f24.join();
f25.join();
f26.join();
f27.join();
f28.join();
f29.join();
f30.join();
f31.join();
f32.join();
f33.join();
f34.join();
f35.join();
f36.join();
f37.join();
f38.join();
f39.join();
f40.join();
f41.join();
f42.join();
f43.join();
f44.join();
f45.join();
f46.join();
f47.join();
f48.join();
f49.join();
f50.join();
f51.join();
f52.join();
f53.join();
f54.join();
f55.join();
f56.join();
f57.join();
f58.join();
f59.join();
f60.join();
f61.join();
f62.join();
f63.join();
f64.join();
f65.join();
f66.join();
f67.join();
f68.join();
f69.join();
f70.join();
f71.join();
f72.join();
f73.join();
f74.join();
f75.join();
f76.join();
f77.join();
f78.join();
f79.join();
f80.join();
f81.join();
f82.join();
f83.join();
f84.join();
f85.join();
f86.join();
f87.join();
f88.join();
f89.join();
f90.join();
f91.join();
f92.join();
f93.join();
f94.join();
f95.join();
f96.join();
f97.join();
f98.join();
f99.join();
f100.join();
f101.join();
f102.join();
f103.join();
f104.join();
f105.join();
f106.join();
f107.join();
f108.join();
f109.join();
f110.join();
f111.join();
f112.join();
f113.join();
f114.join();
f115.join();
f116.join();
f117.join();
f118.join();
f119.join();
f120.join();
f121.join();
f122.join();
f123.join();
f124.join();
f125.join();
f126.join();
f127.join();
f128.join();
f129.join();
f130.join();
f131.join();
f132.join();
f133.join();
f134.join();
f135.join();
f136.join();
f137.join();
f138.join();
f139.join();
f140.join();
f141.join();
f142.join();
f143.join();
f144.join();
f145.join();
f146.join();
f147.join();
f148.join();
f149.join();
f150.join();
f151.join();
f152.join();
f153.join();
f154.join();
f155.join();
f156.join();
f157.join();
f158.join();
f159.join();
f160.join();
f161.join();
f162.join();
f163.join();
f164.join();
f165.join();
f166.join();
f167.join();
f168.join();
f169.join();
f170.join();
f171.join();
f172.join();
f173.join();
f174.join();
f175.join();
f176.join();
f177.join();
f178.join();
f179.join();
f180.join();
f181.join();
f182.join();
f183.join();
f184.join();
f185.join();
f186.join();
f187.join();
f188.join();
f189.join();
f190.join();
f191.join();
f192.join();
f193.join();
f194.join();
f195.join();
f196.join();
f197.join();
f198.join();
f199.join();
f200.join();
f201.join();
f202.join();
f203.join();
f204.join();
f205.join();
f206.join();
f207.join();
f208.join();
f209.join();
f210.join();
f211.join();
f212.join();
f213.join();
f214.join();
f215.join();
f216.join();
f217.join();
f218.join();
f219.join();
f220.join();
f221.join();
f222.join();
f223.join();
f224.join();
f225.join();
f226.join();
f227.join();
f228.join();
f229.join();
f230.join();
f231.join();
f232.join();
f233.join();
f234.join();
f235.join();
f236.join();
f237.join();
f238.join();
f239.join();
f240.join();
f241.join();
f242.join();
f243.join();
f244.join();
f245.join();
f246.join();
f247.join();
f248.join();
f249.join();
f250.join();
f251.join();
f252.join();
f253.join();
f254.join();
f255.join();
f256.join();
f257.join();
f258.join();
f259.join();
f260.join();
f261.join();
f262.join();
f263.join();
f264.join();
f265.join();
f266.join();
f267.join();
f268.join();
f269.join();
f270.join();
f271.join();
f272.join();
f273.join();
f274.join();
f275.join();
f276.join();
f277.join();
f278.join();
f279.join();
f280.join();
f281.join();
f282.join();
f283.join();
f284.join();
f285.join();
f286.join();
f287.join();
f288.join();
f289.join();
f290.join();
f291.join();
f292.join();
f293.join();
f294.join();
f295.join();
f296.join();
f297.join();
f298.join();
f299.join();
f300.join();
f301.join();
f302.join();
f303.join();
f304.join();
f305.join();
f306.join();
f307.join();
f308.join();
f309.join();
f310.join();
f311.join();
f312.join();
f313.join();
f314.join();
f315.join();
f316.join();
f317.join();
f318.join();
f319.join();
f320.join();
f321.join();
f322.join();
f323.join();
f324.join();
f325.join();
f326.join();
f327.join();
f328.join();
f329.join();
f330.join();
f331.join();
f332.join();
f333.join();
f334.join();
f335.join();
f336.join();
f337.join();
f338.join();
f339.join();
f340.join();
f341.join();
f342.join();
f343.join();
f344.join();
f345.join();
f346.join();
f347.join();
f348.join();
f349.join();
f350.join();
f351.join();
f352.join();
f353.join();
f354.join();
f355.join();
f356.join();
f357.join();
f358.join();
f359.join();
f360.join();
f361.join();
f362.join();
f363.join();
f364.join();
f365.join();
f366.join();
f367.join();
f368.join();
f369.join();
f370.join();
f371.join();
f372.join();
f373.join();
f374.join();
f375.join();
f376.join();
f377.join();
f378.join();
f379.join();
f380.join();
f381.join();
f382.join();
f383.join();
f384.join();
f385.join();
f386.join();
f387.join();
f388.join();
f389.join();
f390.join();
f391.join();
f392.join();
f393.join();
f394.join();
f395.join();
f396.join();
f397.join();
f398.join();
f399.join();
f400.join();
f401.join();
f402.join();
f403.join();
f404.join();
f405.join();
f406.join();
f407.join();
f408.join();
f409.join();
f410.join();
f411.join();
f412.join();
f413.join();
f414.join();
f415.join();
f416.join();
f417.join();
f418.join();
f419.join();
f420.join();
f421.join();
f422.join();
f423.join();
f424.join();
f425.join();
f426.join();
f427.join();
f428.join();
f429.join();
f430.join();
f431.join();
f432.join();
f433.join();
f434.join();
f435.join();
f436.join();
f437.join();
f438.join();
f439.join();
f440.join();
f441.join();
f442.join();
f443.join();
f444.join();
f445.join();
f446.join();
f447.join();
f448.join();
f449.join();
f450.join();
f451.join();
f452.join();
f453.join();
f454.join();
f455.join();
f456.join();
f457.join();
f458.join();
f459.join();
f460.join();
f461.join();
f462.join();
f463.join();
f464.join();
f465.join();
f466.join();
f467.join();
f468.join();
f469.join();
f470.join();
f471.join();
f472.join();
f473.join();
f474.join();
f475.join();
f476.join();
f477.join();
f478.join();
f479.join();
f480.join();
f481.join();
f482.join();
f483.join();
f484.join();
f485.join();
f486.join();
f487.join();
f488.join();
f489.join();
f490.join();
f491.join();
f492.join();
f493.join();
f494.join();
f495.join();
f496.join();
f497.join();
f498.join();
f499.join();
f500.join();

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,62 @@
// Copyright Oliver Kowalke 2009.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <boost/cstdint.hpp>
#include <boost/fiber/all.hpp>
#include <boost/preprocessor.hpp>
#include "../clock.hpp"
#ifndef JOBS
#define JOBS BOOST_PP_LIMIT_REPEAT
#endif
#define JOIN(z, n, _) \
{ \
time_point_type start( clock_type::now() ); \
boost::fibers::fiber f( worker); \
duration_type total = clock_type::now() - start; \
total -= overhead; \
result += total; \
f.join(); \
}
void worker() {}
duration_type measure( duration_type overhead)
{
boost::fibers::fiber( worker).join();
duration_type result = duration_type::zero();
BOOST_PP_REPEAT_FROM_TO(1, JOBS, JOIN, _)
result /= JOBS; // loops
return result;
}
int main( int argc, char * argv[])
{
try
{
duration_type overhead = overhead_clock();
std::cout << "overhead " << overhead.count() << " nano seconds" << std::endl;
boost::uint64_t res = measure( overhead).count();
std::cout << "average of " << res << " nano seconds" << std::endl;
return EXIT_SUCCESS;
}
catch ( std::exception const& e)
{ std::cerr << "exception: " << e.what() << std::endl; }
catch (...)
{ std::cerr << "unhandled exception" << std::endl; }
return EXIT_FAILURE;
}

View File

@@ -0,0 +1,62 @@
// Copyright Oliver Kowalke 2009.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <boost/cstdint.hpp>
#include <boost/fiber/all.hpp>
#include <boost/preprocessor.hpp>
#include "../clock.hpp"
#ifndef JOBS
#define JOBS BOOST_PP_LIMIT_REPEAT
#endif
#define DETACH(z, n, _) \
{ \
boost::fibers::fiber f( worker); \
time_point_type start( clock_type::now() ); \
f.detach(); \
duration_type total = clock_type::now() - start; \
total -= overhead; \
result += total; \
}
void worker() {}
duration_type measure( duration_type overhead)
{
boost::fibers::fiber( worker).join();
duration_type result = duration_type::zero();
BOOST_PP_REPEAT_FROM_TO(1, JOBS, DETACH, _)
result /= JOBS; // loops
return result;
}
int main( int argc, char * argv[])
{
try
{
duration_type overhead = overhead_clock();
std::cout << "overhead " << overhead.count() << " nano seconds" << std::endl;
boost::uint64_t res = measure( overhead).count();
std::cout << "average of " << res << " nano seconds" << std::endl;
return EXIT_SUCCESS;
}
catch ( std::exception const& e)
{ std::cerr << "exception: " << e.what() << std::endl; }
catch (...)
{ std::cerr << "unhandled exception" << std::endl; }
return EXIT_FAILURE;
}

View File

@@ -0,0 +1,64 @@
// Copyright Oliver Kowalke 2009.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <boost/cstdint.hpp>
#include <boost/fiber/all.hpp>
#include <boost/preprocessor.hpp>
#include "../clock.hpp"
#ifndef JOBS
#define JOBS BOOST_PP_LIMIT_REPEAT
#endif
#define WAIT(z, n, _) \
{ \
boost::fibers::packaged_task< void() > pt( worker); \
boost::fibers::future< void > f( pt.get_future() ); \
boost::fibers::fiber( std::move( pt) ).detach(); \
time_point_type start( clock_type::now() ); \
f.wait(); \
duration_type total = clock_type::now() - start; \
total -= overhead; \
result += total; \
}
void worker() {}
duration_type measure( duration_type overhead)
{
boost::fibers::fiber( worker).join();
duration_type result = duration_type::zero();
BOOST_PP_REPEAT_FROM_TO(1, JOBS, WAIT, _)
result /= JOBS; // loops
return result;
}
int main( int argc, char * argv[])
{
try
{
duration_type overhead = overhead_clock();
std::cout << "overhead " << overhead.count() << " nano seconds" << std::endl;
boost::uint64_t res = measure( overhead).count();
std::cout << "average of " << res << " nano seconds" << std::endl;
return EXIT_SUCCESS;
}
catch ( std::exception const& e)
{ std::cerr << "exception: " << e.what() << std::endl; }
catch (...)
{ std::cerr << "unhandled exception" << std::endl; }
return EXIT_FAILURE;
}

View File

@@ -0,0 +1,62 @@
// Copyright Oliver Kowalke 2009.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <boost/cstdint.hpp>
#include <boost/fiber/all.hpp>
#include <boost/preprocessor.hpp>
#include "../clock.hpp"
#ifndef JOBS
#define JOBS BOOST_PP_LIMIT_REPEAT
#endif
#define JOIN(z, n, _) \
{ \
boost::fibers::fiber f( worker); \
time_point_type start( clock_type::now() ); \
f.join(); \
duration_type total = clock_type::now() - start; \
total -= overhead; \
result += total; \
}
void worker() {}
duration_type measure( duration_type overhead)
{
boost::fibers::fiber( worker).join();
duration_type result = duration_type::zero();
BOOST_PP_REPEAT_FROM_TO(1, JOBS, JOIN, _)
result /= JOBS; // loops
return result;
}
int main( int argc, char * argv[])
{
try
{
duration_type overhead = overhead_clock();
std::cout << "overhead " << overhead.count() << " nano seconds" << std::endl;
boost::uint64_t res = measure( overhead).count();
std::cout << "average of " << res << " nano seconds" << std::endl;
return EXIT_SUCCESS;
}
catch ( std::exception const& e)
{ std::cerr << "exception: " << e.what() << std::endl; }
catch (...)
{ std::cerr << "unhandled exception" << std::endl; }
return EXIT_FAILURE;
}

View File

@@ -0,0 +1,64 @@
// Copyright Oliver Kowalke 2009.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <boost/cstdint.hpp>
#include <boost/fiber/all.hpp>
#include <boost/preprocessor.hpp>
#include "../clock.hpp"
#ifndef JOBS
#define JOBS BOOST_PP_LIMIT_REPEAT
#endif
#define JOIN(z, n, _) \
boost::fibers::fiber( worker, overhead, & result).join();
void worker( duration_type overhead, duration_type * result)
{
time_point_type start( clock_type::now() );
boost::this_fiber::yield();
duration_type total = clock_type::now() - start;
total -= overhead;
* result += total;
}
duration_type measure( duration_type overhead)
{
duration_type result = duration_type::zero();
boost::fibers::fiber( worker, overhead, & result).join();
result = duration_type::zero();
BOOST_PP_REPEAT_FROM_TO(1, JOBS, JOIN, _)
result /= JOBS; // loops
return result;
}
int main( int argc, char * argv[])
{
try
{
duration_type overhead = overhead_clock();
std::cout << "overhead " << overhead.count() << " nano seconds" << std::endl;
boost::uint64_t res = measure( overhead).count();
std::cout << "average of " << res << " nano seconds" << std::endl;
return EXIT_SUCCESS;
}
catch ( std::exception const& e)
{ std::cerr << "exception: " << e.what() << std::endl; }
catch (...)
{ std::cerr << "unhandled exception" << std::endl; }
return EXIT_FAILURE;
}

View File

@@ -0,0 +1,165 @@
// Copyright Oliver Kowalke 2009.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <boost/cstdint.hpp>
#include <boost/fiber/all.hpp>
#include <boost/preprocessor.hpp>
#include "../clock.hpp"
#define CREATE(z, n, _) \
boost::fibers::fiber BOOST_PP_CAT(f,n) (worker);
#define JOIN(z, n, _) \
BOOST_PP_CAT(f,n) .join();
void worker() {}
duration_type measure10( duration_type overhead)
{
boost::fibers::fiber( worker).join();
BOOST_PP_REPEAT_FROM_TO(1, 10, CREATE, _);
time_point_type start( clock_type::now() );
BOOST_PP_REPEAT_FROM_TO(1, 10, JOIN, _);
duration_type total = clock_type::now() - start;
total -= overhead_clock(); // overhead of measurement
total /= 10; // loops
return total;
}
duration_type measure50( duration_type overhead)
{
boost::fibers::fiber( worker).join();
BOOST_PP_REPEAT_FROM_TO(1, 50, CREATE, _);
time_point_type start( clock_type::now() );
BOOST_PP_REPEAT_FROM_TO(1, 50, JOIN, _);
duration_type total = clock_type::now() - start;
total -= overhead_clock(); // overhead of measurement
total /= 50; // loops
return total;
}
duration_type measure100( duration_type overhead)
{
boost::fibers::fiber( worker).join();
BOOST_PP_REPEAT_FROM_TO(1, 100, CREATE, _);
time_point_type start( clock_type::now() );
BOOST_PP_REPEAT_FROM_TO(1, 100, JOIN, _);
duration_type total = clock_type::now() - start;
total -= overhead_clock(); // overhead of measurement
total /= 100; // loops
return total;
}
duration_type measure500( duration_type overhead)
{
boost::fibers::fiber( worker).join();
#include "fiber_create_500.ipp"
time_point_type start( clock_type::now() );
#include "fiber_join_500.ipp"
duration_type total = clock_type::now() - start;
total -= overhead_clock(); // overhead of measurement
total /= 500; // loops
return total;
}
duration_type measure1000( duration_type overhead)
{
boost::fibers::fiber( worker).join();
#include "fiber_create_1000.ipp"
time_point_type start( clock_type::now() );
#include "fiber_join_1000.ipp"
duration_type total = clock_type::now() - start;
total -= overhead_clock(); // overhead of measurement
total /= 1000; // loops
return total;
}
duration_type measure5000( duration_type overhead)
{
boost::fibers::fiber( worker).join();
#include "fiber_create_5000.ipp"
time_point_type start( clock_type::now() );
#include "fiber_join_5000.ipp"
duration_type total = clock_type::now() - start;
total -= overhead_clock(); // overhead of measurement
total /= 5000; // loops
return total;
}
duration_type measure10000( duration_type overhead)
{
boost::fibers::fiber( worker).join();
#include "fiber_create_10000.ipp"
time_point_type start( clock_type::now() );
#include "fiber_join_10000.ipp"
duration_type total = clock_type::now() - start;
total -= overhead_clock(); // overhead of measurement
total /= 10000; // loops
return total;
}
int main( int argc, char * argv[])
{
try
{
duration_type overhead = overhead_clock();
std::cout << "overhead " << overhead.count() << " nano seconds" << std::endl;
boost::uint64_t res = measure10( overhead).count();
std::cout << "10 jobs: average of " << res << " nano seconds" << std::endl;
res = measure50( overhead).count();
std::cout << "50 jobs: average of " << res << " nano seconds" << std::endl;
res = measure100( overhead).count();
std::cout << "100 jobs: average of " << res << " nano seconds" << std::endl;
res = measure500( overhead).count();
std::cout << "500 jobs: average of " << res << " nano seconds" << std::endl;
res = measure1000( overhead).count();
std::cout << "1000 jobs: average of " << res << " nano seconds" << std::endl;
res = measure5000( overhead).count();
std::cout << "5000 jobs: average of " << res << " nano seconds" << std::endl;
res = measure10000( overhead).count();
std::cout << "10000 jobs: average of " << res << " nano seconds" << std::endl;
return EXIT_SUCCESS;
}
catch ( std::exception const& e)
{ std::cerr << "exception: " << e.what() << std::endl; }
catch (...)
{ std::cerr << "unhandled exception" << std::endl; }
return EXIT_FAILURE;
}

View File

@@ -0,0 +1,30 @@
# Copyright Oliver Kowalke 2009.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# For more information, see http://www.boost.org/
import common ;
import feature ;
import indirect ;
import modules ;
import os ;
import toolset ;
project boost/fiber/performance/qthread
: requirements
<library>/boost/chrono//boost_chrono
<library>/boost/coroutine//boost_coroutine
<library>/boost/program_options//boost_program_options
<linkflags>"-lqthread"
<link>static
<optimization>speed
<threading>multi
<variant>release
;
exe overhead_join
: overhead_join.cpp
;

View File

@@ -0,0 +1,92 @@
// Copyright Oliver Kowalke 2009.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <string>
#include <boost/atomic.hpp>
#include <boost/chrono.hpp>
#include <boost/cstdint.hpp>
#include <boost/preprocessor.hpp>
#include <boost/program_options.hpp>
#include <qthread/qthread.h>
#include "../clock.hpp"
#ifndef JOBS
#define JOBS BOOST_PP_LIMIT_REPEAT
#endif
boost::atomic< boost::uint64_t > counter( 0);
extern "C" aligned_t worker( void *)
{
++counter;
return aligned_t();
}
duration_type measure( duration_type overhead)
{
time_point_type start( clock_type::now() );
for ( std::size_t i = 0; i < JOBS; ++i) {
qthread_fork( & worker, 0, 0);
}
do
{
qthread_yield();
} while ( counter != JOBS);
duration_type total = clock_type::now() - start;
total -= overhead_clock(); // overhead of measurement
total /= JOBS; // loops
return total;
}
int main( int argc, char * argv[])
{
try
{
boost::program_options::options_description desc("allowed options");
desc.add_options()
("help", "help message");
boost::program_options::variables_map vm;
boost::program_options::store(
boost::program_options::parse_command_line(
argc,
argv,
desc),
vm);
boost::program_options::notify( vm);
if ( vm.count("help") ) {
std::cout << desc << std::endl;
return EXIT_SUCCESS;
}
setenv("QT_NUM_SHEPHERDS", "1", 1);
setenv("QT_NUM_WORKERS_PER_SHEPHERD", "1", 1);
// Setup the qthreads environment.
if ( 0 != qthread_initialize() )
throw std::runtime_error("qthreads failed to initialize\n");
duration_type overhead = overhead_clock();
std::cout << "overhead " << overhead.count() << " nano seconds" << std::endl;
boost::uint64_t res = measure( overhead).count();
std::cout << JOBS << " jobs: average of " << res << " nano seconds" << std::endl;
return EXIT_SUCCESS;
}
catch ( std::exception const& e)
{ std::cerr << "exception: " << e.what() << std::endl; }
catch (...)
{ std::cerr << "unhandled exception" << std::endl; }
return EXIT_FAILURE;
}

View File

@@ -0,0 +1,28 @@
# Copyright Oliver Kowalke 2009.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# For more information, see http://www.boost.org/
import common ;
import feature ;
import indirect ;
import modules ;
import os ;
import toolset ;
project boost/fiber/performance/tbb
: requirements
<library>/boost/chrono//boost_chrono
<library>/boost/coroutine//boost_coroutine
<library>/boost/program_options//boost_program_options
<linkflags>"-ltbb"
<link>static
<threading>multi
;
exe overhead_join
: overhead_join.cpp
;

View File

@@ -0,0 +1,101 @@
// Copyright Oliver Kowalke 2009.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <string>
#include <boost/atomic.hpp>
#include <boost/chrono.hpp>
#include <boost/cstdint.hpp>
#include <boost/preprocessor.hpp>
#include <boost/program_options.hpp>
#include <tbb/task.h>
#include <tbb/task_scheduler_init.h>
#include "../clock.hpp"
#ifndef JOBS
#define JOBS BOOST_PP_LIMIT_REPEAT
#endif
struct worker: public tbb::task
{
tbb::task * execute()
{ return 0; }
};
struct spawner : public tbb::task
{
tbb::task * execute()
{
set_ref_count( static_cast< int >( JOBS + 1) );
for ( boost::uint64_t i = 0; i < JOBS; ++i)
{
worker & wrk = *new ( tbb::task::allocate_child() ) worker();
if ( i == ( JOBS - 1) )
spawn_and_wait_for_all( wrk);
else
spawn( wrk);
}
return 0;
}
};
duration_type measure( duration_type overhead)
{
time_point_type start( clock_type::now() );
spawner & spw = *new ( tbb::task::allocate_root() ) spawner();
tbb::task::spawn_root_and_wait( spw);
duration_type total = clock_type::now() - start;
total -= overhead_clock(); // overhead of measurement
total /= JOBS; // loops
return total;
}
int main( int argc, char * argv[])
{
try
{
boost::program_options::options_description desc("allowed options");
desc.add_options()
("help", "help message");
boost::program_options::variables_map vm;
boost::program_options::store(
boost::program_options::parse_command_line(
argc,
argv,
desc),
vm);
boost::program_options::notify( vm);
if ( vm.count("help") ) {
std::cout << desc << std::endl;
return EXIT_SUCCESS;
}
tbb::task_scheduler_init init( 1);
duration_type overhead = overhead_clock();
std::cout << "overhead " << overhead.count() << " nano seconds" << std::endl;
boost::uint64_t res = measure( overhead).count();
std::cout << JOBS << " jobs: average of " << res << " nano seconds" << std::endl;
return EXIT_SUCCESS;
}
catch ( std::exception const& e)
{ std::cerr << "exception: " << e.what() << std::endl; }
catch (...)
{ std::cerr << "unhandled exception" << std::endl; }
return EXIT_FAILURE;
}

View File

@@ -0,0 +1,46 @@
# Copyright Oliver Kowalke 2009.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# For more information, see http://www.boost.org/
import common ;
import feature ;
import indirect ;
import modules ;
import os ;
import toolset ;
project boost/fiber/performance/thread
: requirements
<link>static
<optimization>speed
<threading>multi
<variant>release
;
exe overhead_create
: overhead_create.cpp
;
exe overhead_join
: overhead_join.cpp
;
exe overhead_detach
: overhead_detach.cpp
;
exe overhead_yield
: overhead_yield.cpp
;
exe overhead_future
: overhead_future.cpp
;
#exe scale_join
# : scale_join.cpp
# ;

View File

@@ -0,0 +1,62 @@
// Copyright Oliver Kowalke 2009.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <thread>
#include <boost/cstdint.hpp>
#include <boost/preprocessor.hpp>
#include "../clock.hpp"
#ifndef JOBS
#define JOBS BOOST_PP_LIMIT_REPEAT
#endif
#define JOIN(z, n, _) \
{ \
time_point_type start( clock_type::now() ); \
std::thread t( worker); \
duration_type total = clock_type::now() - start; \
total -= overhead; \
result += total; \
t.join(); \
}
void worker() {}
duration_type measure( duration_type overhead)
{
std::thread( worker).join();
duration_type result = duration_type::zero();
BOOST_PP_REPEAT_FROM_TO(1, JOBS, JOIN, _)
result /= JOBS; // loops
return result;
}
int main( int argc, char * argv[])
{
try
{
duration_type overhead = overhead_clock();
std::cout << "overhead " << overhead.count() << " nano seconds" << std::endl;
boost::uint64_t res = measure( overhead).count();
std::cout << "average of " << res << " nano seconds" << std::endl;
return EXIT_SUCCESS;
}
catch ( std::exception const& e)
{ std::cerr << "exception: " << e.what() << std::endl; }
catch (...)
{ std::cerr << "unhandled exception" << std::endl; }
return EXIT_FAILURE;
}

View File

@@ -0,0 +1,64 @@
// Copyright Oliver Kowalke 2009.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <string>
#include <thread>
#include <boost/cstdint.hpp>
#include <boost/preprocessor.hpp>
#include <boost/program_options.hpp>
#include "../clock.hpp"
#ifndef JOBS
#define JOBS BOOST_PP_LIMIT_REPEAT
#endif
#define DETACH(z, n, _) \
{ \
std::thread t( worker); \
time_point_type start( clock_type::now() ); \
t.detach(); \
duration_type total = clock_type::now() - start; \
total -= overhead; \
result += total; \
}
void worker() {}
duration_type measure( duration_type overhead)
{
std::thread( worker).join();
duration_type result = duration_type::zero();
BOOST_PP_REPEAT_FROM_TO(1, JOBS, DETACH, _)
result /= JOBS; // loops
return result;
}
int main( int argc, char * argv[])
{
try
{
duration_type overhead = overhead_clock();
std::cout << "overhead " << overhead.count() << " nano seconds" << std::endl;
boost::uint64_t res = measure( overhead).count();
std::cout << "average of " << res << " nano seconds" << std::endl;
return EXIT_SUCCESS;
}
catch ( std::exception const& e)
{ std::cerr << "exception: " << e.what() << std::endl; }
catch (...)
{ std::cerr << "unhandled exception" << std::endl; }
return EXIT_FAILURE;
}

View File

@@ -0,0 +1,65 @@
// Copyright Oliver Kowalke 2009.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <cstdlib>
#include <future>
#include <iostream>
#include <stdexcept>
#include <thread>
#include <boost/cstdint.hpp>
#include <boost/preprocessor.hpp>
#include "../clock.hpp"
#ifndef JOBS
#define JOBS BOOST_PP_LIMIT_REPEAT
#endif
#define WAIT(z, n, _) \
{ \
std::packaged_task< void() > pt( worker); \
std::future< void > f( pt.get_future() ); \
std::thread( std::move( pt) ).detach(); \
time_point_type start( clock_type::now() ); \
f.wait(); \
duration_type total = clock_type::now() - start; \
total -= overhead; \
result += total; \
}
void worker() {}
duration_type measure( duration_type overhead)
{
std::thread( worker).join();
duration_type result = duration_type::zero();
BOOST_PP_REPEAT_FROM_TO(1, JOBS, WAIT, _)
result /= JOBS; // loops
return result;
}
int main( int argc, char * argv[])
{
try
{
duration_type overhead = overhead_clock();
std::cout << "overhead " << overhead.count() << " nano seconds" << std::endl;
boost::uint64_t res = measure( overhead).count();
std::cout << "average of " << res << " nano seconds" << std::endl;
return EXIT_SUCCESS;
}
catch ( std::exception const& e)
{ std::cerr << "exception: " << e.what() << std::endl; }
catch (...)
{ std::cerr << "unhandled exception" << std::endl; }
return EXIT_FAILURE;
}

View File

@@ -0,0 +1,62 @@
// Copyright Oliver Kowalke 2009.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <thread>
#include <boost/cstdint.hpp>
#include <boost/preprocessor.hpp>
#include "../clock.hpp"
#ifndef JOBS
#define JOBS BOOST_PP_LIMIT_REPEAT
#endif
#define JOIN(z, n, _) \
{ \
std::thread t( worker); \
time_point_type start( clock_type::now() ); \
t.join(); \
duration_type total = clock_type::now() - start; \
total -= overhead; \
result += total; \
}
void worker() {}
duration_type measure( duration_type overhead)
{
std::thread( worker).join();
duration_type result = duration_type::zero();
BOOST_PP_REPEAT_FROM_TO(1, JOBS, JOIN, _)
result /= JOBS; // loops
return result;
}
int main( int argc, char * argv[])
{
try
{
duration_type overhead = overhead_clock();
std::cout << "overhead " << overhead.count() << " nano seconds" << std::endl;
boost::uint64_t res = measure( overhead).count();
std::cout << "average of " << res << " nano seconds" << std::endl;
return EXIT_SUCCESS;
}
catch ( std::exception const& e)
{ std::cerr << "exception: " << e.what() << std::endl; }
catch (...)
{ std::cerr << "unhandled exception" << std::endl; }
return EXIT_FAILURE;
}

View File

@@ -0,0 +1,64 @@
// Copyright Oliver Kowalke 2009.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <thread>
#include <boost/cstdint.hpp>
#include <boost/preprocessor.hpp>
#include "../clock.hpp"
#ifndef JOBS
#define JOBS BOOST_PP_LIMIT_REPEAT
#endif
#define JOIN(z, n, _) \
std::thread( worker, overhead, & result).join();
void worker( duration_type overhead, duration_type * result)
{
time_point_type start( clock_type::now() );
std::this_thread::yield();
duration_type total = clock_type::now() - start;
total -= overhead;
* result += total;
}
duration_type measure( duration_type overhead)
{
duration_type result = duration_type::zero();
std::thread( worker, overhead, & result).join();
result = duration_type::zero();
BOOST_PP_REPEAT_FROM_TO(1, JOBS, JOIN, _)
result /= JOBS; // loops
return result;
}
int main( int argc, char * argv[])
{
try
{
duration_type overhead = overhead_clock();
std::cout << "overhead " << overhead.count() << " nano seconds" << std::endl;
boost::uint64_t res = measure( overhead).count();
std::cout << "average of " << res << " nano seconds" << std::endl;
return EXIT_SUCCESS;
}
catch ( std::exception const& e)
{ std::cerr << "exception: " << e.what() << std::endl; }
catch (...)
{ std::cerr << "unhandled exception" << std::endl; }
return EXIT_FAILURE;
}

View File

@@ -0,0 +1,165 @@
// Copyright Oliver Kowalke 2009.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <thread>
#include <boost/cstdint.hpp>
#include <boost/preprocessor.hpp>
#include "../clock.hpp"
#define CREATE(z, n, _) \
std::thread BOOST_PP_CAT(t,n) (worker);
#define JOIN(z, n, _) \
BOOST_PP_CAT(t,n) .join();
void worker() {}
duration_type measure10( duration_type overhead)
{
std::thread( worker).join();
BOOST_PP_REPEAT_FROM_TO(1, 10, CREATE, _);
time_point_type start( clock_type::now() );
BOOST_PP_REPEAT_FROM_TO(1, 10, JOIN, _);
duration_type total = clock_type::now() - start;
total -= overhead_clock(); // overhead of measurement
total /= 10; // loops
return total;
}
duration_type measure50( duration_type overhead)
{
std::thread( worker).join();
BOOST_PP_REPEAT_FROM_TO(1, 50, CREATE, _);
time_point_type start( clock_type::now() );
BOOST_PP_REPEAT_FROM_TO(1, 50, JOIN, _);
duration_type total = clock_type::now() - start;
total -= overhead_clock(); // overhead of measurement
total /= 50; // loops
return total;
}
duration_type measure100( duration_type overhead)
{
std::thread( worker).join();
BOOST_PP_REPEAT_FROM_TO(1, 100, CREATE, _);
time_point_type start( clock_type::now() );
BOOST_PP_REPEAT_FROM_TO(1, 100, JOIN, _);
duration_type total = clock_type::now() - start;
total -= overhead_clock(); // overhead of measurement
total /= 100; // loops
return total;
}
duration_type measure500( duration_type overhead)
{
std::thread( worker).join();
#include "thread_create_500.ipp"
time_point_type start( clock_type::now() );
#include "thread_join_500.ipp"
duration_type total = clock_type::now() - start;
total -= overhead_clock(); // overhead of measurement
total /= 500; // loops
return total;
}
duration_type measure1000( duration_type overhead)
{
std::thread( worker).join();
#include "thread_create_1000.ipp"
time_point_type start( clock_type::now() );
#include "thread_join_1000.ipp"
duration_type total = clock_type::now() - start;
total -= overhead_clock(); // overhead of measurement
total /= 1000; // loops
return total;
}
duration_type measure5000( duration_type overhead)
{
std::thread( worker).join();
#include "thread_create_5000.ipp"
time_point_type start( clock_type::now() );
#include "thread_join_5000.ipp"
duration_type total = clock_type::now() - start;
total -= overhead_clock(); // overhead of measurement
total /= 5000; // loops
return total;
}
duration_type measure10000( duration_type overhead)
{
std::thread( worker).join();
#include "thread_create_10000.ipp"
time_point_type start( clock_type::now() );
#include "thread_join_10000.ipp"
duration_type total = clock_type::now() - start;
total -= overhead_clock(); // overhead of measurement
total /= 10000; // loops
return total;
}
int main( int argc, char * argv[])
{
try
{
duration_type overhead = overhead_clock();
std::cout << "overhead " << overhead.count() << " nano seconds" << std::endl;
boost::uint64_t res = measure10( overhead).count();
std::cout << "10 jobs: average of " << res << " nano seconds" << std::endl;
res = measure50( overhead).count();
std::cout << "50 jobs: average of " << res << " nano seconds" << std::endl;
res = measure100( overhead).count();
std::cout << "100 jobs: average of " << res << " nano seconds" << std::endl;
res = measure500( overhead).count();
std::cout << "500 jobs: average of " << res << " nano seconds" << std::endl;
res = measure1000( overhead).count();
std::cout << "1000 jobs: average of " << res << " nano seconds" << std::endl;
res = measure5000( overhead).count();
std::cout << "5000 jobs: average of " << res << " nano seconds" << std::endl;
res = measure10000( overhead).count();
std::cout << "10000 jobs: average of " << res << " nano seconds" << std::endl;
return EXIT_SUCCESS;
}
catch ( std::exception const& e)
{ std::cerr << "exception: " << e.what() << std::endl; }
catch (...)
{ std::cerr << "unhandled exception" << std::endl; }
return EXIT_FAILURE;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,500 @@
std::thread t1( worker);
std::thread t2( worker);
std::thread t3( worker);
std::thread t4( worker);
std::thread t5( worker);
std::thread t6( worker);
std::thread t7( worker);
std::thread t8( worker);
std::thread t9( worker);
std::thread t10( worker);
std::thread t11( worker);
std::thread t12( worker);
std::thread t13( worker);
std::thread t14( worker);
std::thread t15( worker);
std::thread t16( worker);
std::thread t17( worker);
std::thread t18( worker);
std::thread t19( worker);
std::thread t20( worker);
std::thread t21( worker);
std::thread t22( worker);
std::thread t23( worker);
std::thread t24( worker);
std::thread t25( worker);
std::thread t26( worker);
std::thread t27( worker);
std::thread t28( worker);
std::thread t29( worker);
std::thread t30( worker);
std::thread t31( worker);
std::thread t32( worker);
std::thread t33( worker);
std::thread t34( worker);
std::thread t35( worker);
std::thread t36( worker);
std::thread t37( worker);
std::thread t38( worker);
std::thread t39( worker);
std::thread t40( worker);
std::thread t41( worker);
std::thread t42( worker);
std::thread t43( worker);
std::thread t44( worker);
std::thread t45( worker);
std::thread t46( worker);
std::thread t47( worker);
std::thread t48( worker);
std::thread t49( worker);
std::thread t50( worker);
std::thread t51( worker);
std::thread t52( worker);
std::thread t53( worker);
std::thread t54( worker);
std::thread t55( worker);
std::thread t56( worker);
std::thread t57( worker);
std::thread t58( worker);
std::thread t59( worker);
std::thread t60( worker);
std::thread t61( worker);
std::thread t62( worker);
std::thread t63( worker);
std::thread t64( worker);
std::thread t65( worker);
std::thread t66( worker);
std::thread t67( worker);
std::thread t68( worker);
std::thread t69( worker);
std::thread t70( worker);
std::thread t71( worker);
std::thread t72( worker);
std::thread t73( worker);
std::thread t74( worker);
std::thread t75( worker);
std::thread t76( worker);
std::thread t77( worker);
std::thread t78( worker);
std::thread t79( worker);
std::thread t80( worker);
std::thread t81( worker);
std::thread t82( worker);
std::thread t83( worker);
std::thread t84( worker);
std::thread t85( worker);
std::thread t86( worker);
std::thread t87( worker);
std::thread t88( worker);
std::thread t89( worker);
std::thread t90( worker);
std::thread t91( worker);
std::thread t92( worker);
std::thread t93( worker);
std::thread t94( worker);
std::thread t95( worker);
std::thread t96( worker);
std::thread t97( worker);
std::thread t98( worker);
std::thread t99( worker);
std::thread t100( worker);
std::thread t101( worker);
std::thread t102( worker);
std::thread t103( worker);
std::thread t104( worker);
std::thread t105( worker);
std::thread t106( worker);
std::thread t107( worker);
std::thread t108( worker);
std::thread t109( worker);
std::thread t110( worker);
std::thread t111( worker);
std::thread t112( worker);
std::thread t113( worker);
std::thread t114( worker);
std::thread t115( worker);
std::thread t116( worker);
std::thread t117( worker);
std::thread t118( worker);
std::thread t119( worker);
std::thread t120( worker);
std::thread t121( worker);
std::thread t122( worker);
std::thread t123( worker);
std::thread t124( worker);
std::thread t125( worker);
std::thread t126( worker);
std::thread t127( worker);
std::thread t128( worker);
std::thread t129( worker);
std::thread t130( worker);
std::thread t131( worker);
std::thread t132( worker);
std::thread t133( worker);
std::thread t134( worker);
std::thread t135( worker);
std::thread t136( worker);
std::thread t137( worker);
std::thread t138( worker);
std::thread t139( worker);
std::thread t140( worker);
std::thread t141( worker);
std::thread t142( worker);
std::thread t143( worker);
std::thread t144( worker);
std::thread t145( worker);
std::thread t146( worker);
std::thread t147( worker);
std::thread t148( worker);
std::thread t149( worker);
std::thread t150( worker);
std::thread t151( worker);
std::thread t152( worker);
std::thread t153( worker);
std::thread t154( worker);
std::thread t155( worker);
std::thread t156( worker);
std::thread t157( worker);
std::thread t158( worker);
std::thread t159( worker);
std::thread t160( worker);
std::thread t161( worker);
std::thread t162( worker);
std::thread t163( worker);
std::thread t164( worker);
std::thread t165( worker);
std::thread t166( worker);
std::thread t167( worker);
std::thread t168( worker);
std::thread t169( worker);
std::thread t170( worker);
std::thread t171( worker);
std::thread t172( worker);
std::thread t173( worker);
std::thread t174( worker);
std::thread t175( worker);
std::thread t176( worker);
std::thread t177( worker);
std::thread t178( worker);
std::thread t179( worker);
std::thread t180( worker);
std::thread t181( worker);
std::thread t182( worker);
std::thread t183( worker);
std::thread t184( worker);
std::thread t185( worker);
std::thread t186( worker);
std::thread t187( worker);
std::thread t188( worker);
std::thread t189( worker);
std::thread t190( worker);
std::thread t191( worker);
std::thread t192( worker);
std::thread t193( worker);
std::thread t194( worker);
std::thread t195( worker);
std::thread t196( worker);
std::thread t197( worker);
std::thread t198( worker);
std::thread t199( worker);
std::thread t200( worker);
std::thread t201( worker);
std::thread t202( worker);
std::thread t203( worker);
std::thread t204( worker);
std::thread t205( worker);
std::thread t206( worker);
std::thread t207( worker);
std::thread t208( worker);
std::thread t209( worker);
std::thread t210( worker);
std::thread t211( worker);
std::thread t212( worker);
std::thread t213( worker);
std::thread t214( worker);
std::thread t215( worker);
std::thread t216( worker);
std::thread t217( worker);
std::thread t218( worker);
std::thread t219( worker);
std::thread t220( worker);
std::thread t221( worker);
std::thread t222( worker);
std::thread t223( worker);
std::thread t224( worker);
std::thread t225( worker);
std::thread t226( worker);
std::thread t227( worker);
std::thread t228( worker);
std::thread t229( worker);
std::thread t230( worker);
std::thread t231( worker);
std::thread t232( worker);
std::thread t233( worker);
std::thread t234( worker);
std::thread t235( worker);
std::thread t236( worker);
std::thread t237( worker);
std::thread t238( worker);
std::thread t239( worker);
std::thread t240( worker);
std::thread t241( worker);
std::thread t242( worker);
std::thread t243( worker);
std::thread t244( worker);
std::thread t245( worker);
std::thread t246( worker);
std::thread t247( worker);
std::thread t248( worker);
std::thread t249( worker);
std::thread t250( worker);
std::thread t251( worker);
std::thread t252( worker);
std::thread t253( worker);
std::thread t254( worker);
std::thread t255( worker);
std::thread t256( worker);
std::thread t257( worker);
std::thread t258( worker);
std::thread t259( worker);
std::thread t260( worker);
std::thread t261( worker);
std::thread t262( worker);
std::thread t263( worker);
std::thread t264( worker);
std::thread t265( worker);
std::thread t266( worker);
std::thread t267( worker);
std::thread t268( worker);
std::thread t269( worker);
std::thread t270( worker);
std::thread t271( worker);
std::thread t272( worker);
std::thread t273( worker);
std::thread t274( worker);
std::thread t275( worker);
std::thread t276( worker);
std::thread t277( worker);
std::thread t278( worker);
std::thread t279( worker);
std::thread t280( worker);
std::thread t281( worker);
std::thread t282( worker);
std::thread t283( worker);
std::thread t284( worker);
std::thread t285( worker);
std::thread t286( worker);
std::thread t287( worker);
std::thread t288( worker);
std::thread t289( worker);
std::thread t290( worker);
std::thread t291( worker);
std::thread t292( worker);
std::thread t293( worker);
std::thread t294( worker);
std::thread t295( worker);
std::thread t296( worker);
std::thread t297( worker);
std::thread t298( worker);
std::thread t299( worker);
std::thread t300( worker);
std::thread t301( worker);
std::thread t302( worker);
std::thread t303( worker);
std::thread t304( worker);
std::thread t305( worker);
std::thread t306( worker);
std::thread t307( worker);
std::thread t308( worker);
std::thread t309( worker);
std::thread t310( worker);
std::thread t311( worker);
std::thread t312( worker);
std::thread t313( worker);
std::thread t314( worker);
std::thread t315( worker);
std::thread t316( worker);
std::thread t317( worker);
std::thread t318( worker);
std::thread t319( worker);
std::thread t320( worker);
std::thread t321( worker);
std::thread t322( worker);
std::thread t323( worker);
std::thread t324( worker);
std::thread t325( worker);
std::thread t326( worker);
std::thread t327( worker);
std::thread t328( worker);
std::thread t329( worker);
std::thread t330( worker);
std::thread t331( worker);
std::thread t332( worker);
std::thread t333( worker);
std::thread t334( worker);
std::thread t335( worker);
std::thread t336( worker);
std::thread t337( worker);
std::thread t338( worker);
std::thread t339( worker);
std::thread t340( worker);
std::thread t341( worker);
std::thread t342( worker);
std::thread t343( worker);
std::thread t344( worker);
std::thread t345( worker);
std::thread t346( worker);
std::thread t347( worker);
std::thread t348( worker);
std::thread t349( worker);
std::thread t350( worker);
std::thread t351( worker);
std::thread t352( worker);
std::thread t353( worker);
std::thread t354( worker);
std::thread t355( worker);
std::thread t356( worker);
std::thread t357( worker);
std::thread t358( worker);
std::thread t359( worker);
std::thread t360( worker);
std::thread t361( worker);
std::thread t362( worker);
std::thread t363( worker);
std::thread t364( worker);
std::thread t365( worker);
std::thread t366( worker);
std::thread t367( worker);
std::thread t368( worker);
std::thread t369( worker);
std::thread t370( worker);
std::thread t371( worker);
std::thread t372( worker);
std::thread t373( worker);
std::thread t374( worker);
std::thread t375( worker);
std::thread t376( worker);
std::thread t377( worker);
std::thread t378( worker);
std::thread t379( worker);
std::thread t380( worker);
std::thread t381( worker);
std::thread t382( worker);
std::thread t383( worker);
std::thread t384( worker);
std::thread t385( worker);
std::thread t386( worker);
std::thread t387( worker);
std::thread t388( worker);
std::thread t389( worker);
std::thread t390( worker);
std::thread t391( worker);
std::thread t392( worker);
std::thread t393( worker);
std::thread t394( worker);
std::thread t395( worker);
std::thread t396( worker);
std::thread t397( worker);
std::thread t398( worker);
std::thread t399( worker);
std::thread t400( worker);
std::thread t401( worker);
std::thread t402( worker);
std::thread t403( worker);
std::thread t404( worker);
std::thread t405( worker);
std::thread t406( worker);
std::thread t407( worker);
std::thread t408( worker);
std::thread t409( worker);
std::thread t410( worker);
std::thread t411( worker);
std::thread t412( worker);
std::thread t413( worker);
std::thread t414( worker);
std::thread t415( worker);
std::thread t416( worker);
std::thread t417( worker);
std::thread t418( worker);
std::thread t419( worker);
std::thread t420( worker);
std::thread t421( worker);
std::thread t422( worker);
std::thread t423( worker);
std::thread t424( worker);
std::thread t425( worker);
std::thread t426( worker);
std::thread t427( worker);
std::thread t428( worker);
std::thread t429( worker);
std::thread t430( worker);
std::thread t431( worker);
std::thread t432( worker);
std::thread t433( worker);
std::thread t434( worker);
std::thread t435( worker);
std::thread t436( worker);
std::thread t437( worker);
std::thread t438( worker);
std::thread t439( worker);
std::thread t440( worker);
std::thread t441( worker);
std::thread t442( worker);
std::thread t443( worker);
std::thread t444( worker);
std::thread t445( worker);
std::thread t446( worker);
std::thread t447( worker);
std::thread t448( worker);
std::thread t449( worker);
std::thread t450( worker);
std::thread t451( worker);
std::thread t452( worker);
std::thread t453( worker);
std::thread t454( worker);
std::thread t455( worker);
std::thread t456( worker);
std::thread t457( worker);
std::thread t458( worker);
std::thread t459( worker);
std::thread t460( worker);
std::thread t461( worker);
std::thread t462( worker);
std::thread t463( worker);
std::thread t464( worker);
std::thread t465( worker);
std::thread t466( worker);
std::thread t467( worker);
std::thread t468( worker);
std::thread t469( worker);
std::thread t470( worker);
std::thread t471( worker);
std::thread t472( worker);
std::thread t473( worker);
std::thread t474( worker);
std::thread t475( worker);
std::thread t476( worker);
std::thread t477( worker);
std::thread t478( worker);
std::thread t479( worker);
std::thread t480( worker);
std::thread t481( worker);
std::thread t482( worker);
std::thread t483( worker);
std::thread t484( worker);
std::thread t485( worker);
std::thread t486( worker);
std::thread t487( worker);
std::thread t488( worker);
std::thread t489( worker);
std::thread t490( worker);
std::thread t491( worker);
std::thread t492( worker);
std::thread t493( worker);
std::thread t494( worker);
std::thread t495( worker);
std::thread t496( worker);
std::thread t497( worker);
std::thread t498( worker);
std::thread t499( worker);
std::thread t500( worker);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,500 @@
t1.join();
t2.join();
t3.join();
t4.join();
t5.join();
t6.join();
t7.join();
t8.join();
t9.join();
t10.join();
t11.join();
t12.join();
t13.join();
t14.join();
t15.join();
t16.join();
t17.join();
t18.join();
t19.join();
t20.join();
t21.join();
t22.join();
t23.join();
t24.join();
t25.join();
t26.join();
t27.join();
t28.join();
t29.join();
t30.join();
t31.join();
t32.join();
t33.join();
t34.join();
t35.join();
t36.join();
t37.join();
t38.join();
t39.join();
t40.join();
t41.join();
t42.join();
t43.join();
t44.join();
t45.join();
t46.join();
t47.join();
t48.join();
t49.join();
t50.join();
t51.join();
t52.join();
t53.join();
t54.join();
t55.join();
t56.join();
t57.join();
t58.join();
t59.join();
t60.join();
t61.join();
t62.join();
t63.join();
t64.join();
t65.join();
t66.join();
t67.join();
t68.join();
t69.join();
t70.join();
t71.join();
t72.join();
t73.join();
t74.join();
t75.join();
t76.join();
t77.join();
t78.join();
t79.join();
t80.join();
t81.join();
t82.join();
t83.join();
t84.join();
t85.join();
t86.join();
t87.join();
t88.join();
t89.join();
t90.join();
t91.join();
t92.join();
t93.join();
t94.join();
t95.join();
t96.join();
t97.join();
t98.join();
t99.join();
t100.join();
t101.join();
t102.join();
t103.join();
t104.join();
t105.join();
t106.join();
t107.join();
t108.join();
t109.join();
t110.join();
t111.join();
t112.join();
t113.join();
t114.join();
t115.join();
t116.join();
t117.join();
t118.join();
t119.join();
t120.join();
t121.join();
t122.join();
t123.join();
t124.join();
t125.join();
t126.join();
t127.join();
t128.join();
t129.join();
t130.join();
t131.join();
t132.join();
t133.join();
t134.join();
t135.join();
t136.join();
t137.join();
t138.join();
t139.join();
t140.join();
t141.join();
t142.join();
t143.join();
t144.join();
t145.join();
t146.join();
t147.join();
t148.join();
t149.join();
t150.join();
t151.join();
t152.join();
t153.join();
t154.join();
t155.join();
t156.join();
t157.join();
t158.join();
t159.join();
t160.join();
t161.join();
t162.join();
t163.join();
t164.join();
t165.join();
t166.join();
t167.join();
t168.join();
t169.join();
t170.join();
t171.join();
t172.join();
t173.join();
t174.join();
t175.join();
t176.join();
t177.join();
t178.join();
t179.join();
t180.join();
t181.join();
t182.join();
t183.join();
t184.join();
t185.join();
t186.join();
t187.join();
t188.join();
t189.join();
t190.join();
t191.join();
t192.join();
t193.join();
t194.join();
t195.join();
t196.join();
t197.join();
t198.join();
t199.join();
t200.join();
t201.join();
t202.join();
t203.join();
t204.join();
t205.join();
t206.join();
t207.join();
t208.join();
t209.join();
t210.join();
t211.join();
t212.join();
t213.join();
t214.join();
t215.join();
t216.join();
t217.join();
t218.join();
t219.join();
t220.join();
t221.join();
t222.join();
t223.join();
t224.join();
t225.join();
t226.join();
t227.join();
t228.join();
t229.join();
t230.join();
t231.join();
t232.join();
t233.join();
t234.join();
t235.join();
t236.join();
t237.join();
t238.join();
t239.join();
t240.join();
t241.join();
t242.join();
t243.join();
t244.join();
t245.join();
t246.join();
t247.join();
t248.join();
t249.join();
t250.join();
t251.join();
t252.join();
t253.join();
t254.join();
t255.join();
t256.join();
t257.join();
t258.join();
t259.join();
t260.join();
t261.join();
t262.join();
t263.join();
t264.join();
t265.join();
t266.join();
t267.join();
t268.join();
t269.join();
t270.join();
t271.join();
t272.join();
t273.join();
t274.join();
t275.join();
t276.join();
t277.join();
t278.join();
t279.join();
t280.join();
t281.join();
t282.join();
t283.join();
t284.join();
t285.join();
t286.join();
t287.join();
t288.join();
t289.join();
t290.join();
t291.join();
t292.join();
t293.join();
t294.join();
t295.join();
t296.join();
t297.join();
t298.join();
t299.join();
t300.join();
t301.join();
t302.join();
t303.join();
t304.join();
t305.join();
t306.join();
t307.join();
t308.join();
t309.join();
t310.join();
t311.join();
t312.join();
t313.join();
t314.join();
t315.join();
t316.join();
t317.join();
t318.join();
t319.join();
t320.join();
t321.join();
t322.join();
t323.join();
t324.join();
t325.join();
t326.join();
t327.join();
t328.join();
t329.join();
t330.join();
t331.join();
t332.join();
t333.join();
t334.join();
t335.join();
t336.join();
t337.join();
t338.join();
t339.join();
t340.join();
t341.join();
t342.join();
t343.join();
t344.join();
t345.join();
t346.join();
t347.join();
t348.join();
t349.join();
t350.join();
t351.join();
t352.join();
t353.join();
t354.join();
t355.join();
t356.join();
t357.join();
t358.join();
t359.join();
t360.join();
t361.join();
t362.join();
t363.join();
t364.join();
t365.join();
t366.join();
t367.join();
t368.join();
t369.join();
t370.join();
t371.join();
t372.join();
t373.join();
t374.join();
t375.join();
t376.join();
t377.join();
t378.join();
t379.join();
t380.join();
t381.join();
t382.join();
t383.join();
t384.join();
t385.join();
t386.join();
t387.join();
t388.join();
t389.join();
t390.join();
t391.join();
t392.join();
t393.join();
t394.join();
t395.join();
t396.join();
t397.join();
t398.join();
t399.join();
t400.join();
t401.join();
t402.join();
t403.join();
t404.join();
t405.join();
t406.join();
t407.join();
t408.join();
t409.join();
t410.join();
t411.join();
t412.join();
t413.join();
t414.join();
t415.join();
t416.join();
t417.join();
t418.join();
t419.join();
t420.join();
t421.join();
t422.join();
t423.join();
t424.join();
t425.join();
t426.join();
t427.join();
t428.join();
t429.join();
t430.join();
t431.join();
t432.join();
t433.join();
t434.join();
t435.join();
t436.join();
t437.join();
t438.join();
t439.join();
t440.join();
t441.join();
t442.join();
t443.join();
t444.join();
t445.join();
t446.join();
t447.join();
t448.join();
t449.join();
t450.join();
t451.join();
t452.join();
t453.join();
t454.join();
t455.join();
t456.join();
t457.join();
t458.join();
t459.join();
t460.join();
t461.join();
t462.join();
t463.join();
t464.join();
t465.join();
t466.join();
t467.join();
t468.join();
t469.join();
t470.join();
t471.join();
t472.join();
t473.join();
t474.join();
t475.join();
t476.join();
t477.join();
t478.join();
t479.join();
t480.join();
t481.join();
t482.join();
t483.join();
t484.join();
t485.join();
t486.join();
t487.join();
t488.join();
t489.join();
t490.join();
t491.join();
t492.join();
t493.join();
t494.join();
t495.join();
t496.join();
t497.join();
t498.join();
t499.join();
t500.join();

File diff suppressed because it is too large Load Diff