diff --git a/reporting/performance/Jamfile.v2 b/reporting/performance/Jamfile.v2 index 373bc4fed..82e6ffaa6 100644 --- a/reporting/performance/Jamfile.v2 +++ b/reporting/performance/Jamfile.v2 @@ -16,6 +16,10 @@ import ../../../config/checks/config : requires ; using quickbook ; using auto-index ; +import ../../../predef/check/predef + : check require + : predef-check predef-require ; + project : requirements ../../include_private @@ -82,19 +86,21 @@ rule all-tests { local result ; for local source in [ glob test*.cpp ] { + result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper + : : : release ../../test [ check-target-builds ../accuracy//has_c99_cmath : TEST_C99 ] ] ; } # # Special cases to test different compiler options: # result += [ run test_cbrt.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper - : : : debug msvc [ check-target-builds ../accuracy//has_c99_cmath : TEST_C99 : ] : test_cbrt_msvc_debug ] ; + : : : debug COMPILER_COMPARISON_TABLES [ predef-require "BOOST_COMP_MSVC" ] : test_cbrt_msvc_debug ] ; result += [ run test_cbrt.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper - : : : release 32 msvc [ check-target-builds ../accuracy//has_c99_cmath : TEST_C99 : ] : test_cbrt_msvc_release_32 ] ; + : : : release COMPILER_COMPARISON_TABLES 32 [ predef-require "BOOST_COMP_MSVC" ] -Ox : test_cbrt_msvc_release_32 ] ; result += [ run test_cbrt.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper - : : : release 64 msvc -arch:SSE2 [ check-target-builds ../accuracy//has_c99_cmath : TEST_C99 : ] : test_cbrt_msvc_release_64 ] ; + : : : release COMPILER_COMPARISON_TABLES 64 [ predef-require "BOOST_COMP_MSVC" ] -Ox : test_cbrt_msvc_release_64 ] ; result += [ run test_cbrt.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper - : : : release 64 -arch:AVX msvc [ check-target-builds ../accuracy//has_c99_cmath : TEST_C99 : ] : test_cbrt_msvc_release_64_avx ] ; + : : : release COMPILER_COMPARISON_TABLES [ predef-require "__ICL +0 > 1100" ] -Ox : test_cbrt_intel_release ] ; return $(result) ; } diff --git a/reporting/performance/doc/performance_tables.qbk b/reporting/performance/doc/performance_tables.qbk index ed65e095f..c461a3eb2 100644 --- a/reporting/performance/doc/performance_tables.qbk +++ b/reporting/performance/doc/performance_tables.qbk @@ -1,34 +1,51 @@ -[/Cell Content:] -[template cl_arch_ia32_Ox_x64_build_Microsoft_Visual_C_version_12_0Win32[]62ns] -[template boost_math_cbrtcl_arch_ia32_Ox_x64_build_Microsoft_Visual_C_version_12_0Win32[]45ns] -[template cl_arch_sse2_Ox_x86_build_Microsoft_Visual_C_version_12_0Win32[]68ns] -[template boost_math_cbrtcl_arch_sse2_Ox_x86_build_Microsoft_Visual_C_version_12_0Win32[]64ns] -[template cl_Od_x86_build_Microsoft_Visual_C_version_12_0Win32[]201ns] -[template boost_math_cbrtcl_Od_x86_build_Microsoft_Visual_C_version_12_0Win32[]262ns] + + [/tables:] +[template table_Compiler_Option_Comparison_on_Win32[] +[table:table_Compiler_Option_Comparison_on_Win32 Compiler Option Comparison on Win32 +[[Function][icl /arch:ia32 /Ox (x86 build)][cl /Ox (x64 build)][cl /arch:sse2 /Ox (x86 build)][cl /Od (x86 build)]] +[[boost::math::cbrt][[role green 37ns]][[role blue 60ns]][[role blue 63ns]][[role red 277ns]]] +] +] -[template table_cbrt[] -[table:table_cbrt Performance comparison for cbrt -[[Function][cl /Od (x86 build)][cl /arch:sse2 /Ox (x86 build)][cl /arch:ia32 /Ox (x64 build)]] -[[boost::math::cbrt][[role green 86ns]][[role green 2ns]][[role green 32ns]]] -[[::cbrt][[role green 86ns]][[role green 2ns]][[role green 32ns]]] + +[template table_Library_Comparison_on_Win32[] +[table:table_Library_Comparison_on_Win32 Library Comparison on Win32 +[[Function][Boost][math.h]] +[[cbrt[br](85/85 tests selected)][[role green 64ns]][[role green 69ns]]] +[[erf[br](950/950 tests selected)][[role green 14ns]][[role blue 26ns]]] +[[erfc[br](950/950 tests selected)][[role green 20ns]][[role red 93ns]]] +[[expm1[br](80/80 tests selected)][[role green 12ns]][[role green 13ns]]] +[[cyl_bessel_j (integer order)[br](268/268 tests selected)][[role green 121ns]][[role red 260ns]]] +[[lgamma[br](400/400 tests selected)][[role green 91ns]][[role blue 148ns]]] +[[log1p[br](80/80 tests selected)][[role green 12ns]][[role blue 19ns]]] +[[tgamma[br](400/400 tests selected)][[role green 89ns]][[role red 975ns]]] +[[cyl_neumann (integer order)[br](428/428 tests selected)][[role blue 327ns]][[role green 169ns]]] ] ] [/sections:] +[template section_Compiler_Option_Comparison_on_Win32[] +[section:section_Compiler_Option_Comparison_on_Win32 Compiler Option Comparison on Win32] +[table_Compiler_Option_Comparison_on_Win32] +[endsect] +] -[template section_cbrt[] -[section:section_cbrt cbrt] -[table_cbrt] + +[template section_Library_Comparison_on_Win32[] +[section:section_Library_Comparison_on_Win32 Library Comparison on Win32] +[table_Library_Comparison_on_Win32] [endsect] ] [template all_sections[] -[section_cbrt] +[section_Compiler_Option_Comparison_on_Win32] +[section_Library_Comparison_on_Win32] ] [template all_tables[] -[table_cbrt] +[table_Compiler_Option_Comparison_on_Win32] +[table_Library_Comparison_on_Win32] ] diff --git a/reporting/performance/html/index.html b/reporting/performance/html/index.html index ba2dfec6b..314515905 100644 --- a/reporting/performance/html/index.html +++ b/reporting/performance/html/index.html @@ -33,20 +33,27 @@
-

Table 1. Performance comparison for cbrt

-
+

Table 1. Compiler Option Comparison on Win32

+
+ + - - + + + +
@@ -56,7 +63,12 @@

- cl /Od (x86 build) + icl /arch:ia32 /Ox (x86 build) +

+
+

+ cl /Ox (x64 build)

@@ -66,12 +78,11 @@

- cl /arch:ia32 /Ox (x64 build) + cl /Od (x86 build)

boost::math::cbrt @@ -79,39 +90,210 @@

- 86ns + 37ns

- 2ns + 60ns

- 32ns + 63ns +

+
+

+ 277ns +

+
+
+
+
+
+ +
+

Table 2. Library Comparison on Win32

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -122,7 +304,7 @@
+

+ Function +

+
+

+ Boost +

+
+

+ math.h +

+
+

+ cbrt
(85/85 tests selected) +

+
+

+ 64ns +

+
+

+ 69ns

- ::cbrt + erf
(950/950 tests selected)

- 86ns + 14ns

- 2ns + 26ns +

+
+

+ erfc
(950/950 tests selected)

- 32ns + 20ns +

+
+

+ 93ns +

+
+

+ expm1
(80/80 tests selected) +

+
+

+ 12ns +

+
+

+ 13ns +

+
+

+ cyl_bessel_j (integer order)
(268/268 tests selected) +

+
+

+ 121ns +

+
+

+ 260ns +

+
+

+ lgamma
(400/400 tests selected) +

+
+

+ 91ns +

+
+

+ 148ns +

+
+

+ log1p
(80/80 tests selected) +

+
+

+ 12ns +

+
+

+ 19ns +

+
+

+ tgamma
(400/400 tests selected) +

+
+

+ 89ns +

+
+

+ 975ns +

+
+

+ cyl_neumann (integer order)
(428/428 tests selected) +

+
+

+ 327ns +

+
+

+ 169ns

- +

Last revised: July 09, 2015 at 18:35:13 GMT

Last revised: July 13, 2015 at 07:59:35 GMT


diff --git a/reporting/performance/table_helper.cpp b/reporting/performance/table_helper.cpp index 51b96bc6f..804c9c580 100644 --- a/reporting/performance/table_helper.cpp +++ b/reporting/performance/table_helper.cpp @@ -98,59 +98,13 @@ std::string save_table(std::vector >& table) { std::string result; - static const boost::regex value_e("\\d+"); - - std::vector best_values(table[0].size(), (std::numeric_limits::max)()); - - for(unsigned i = 1; i < table[0].size(); ++i) - { - for(unsigned k = 1; k < table.size(); ++k) - { - boost::smatch what; - if(regex_search(table[k][i], what, value_e)) - { - boost::uintmax_t val = boost::lexical_cast(what.str()); - if(val < best_values[i]) - best_values[i] = val; - } - } - } - for(std::vector >::const_iterator i = table.begin(), j = table.end(); i != j; ++i) { result += "["; for(std::vector::const_iterator k = i->begin(), l = i->end(); k != l; ++k) { result += "["; - if((i == table.begin()) || (k == i->begin())) - { - result += *k; - } - else - { - boost::smatch what; - if(regex_search(*k, what, value_e)) - { - boost::uintmax_t val = boost::lexical_cast(what.str()); - bool have_role = false; - if(val < 1.2 * best_values[k - i->begin()]) - { - have_role = true; - result += "[role green "; - } - else if(val > 2 * best_values[k - i->begin()]) - { - have_role = true; - result += "[role red "; - } - result += boost::lexical_cast(val); - result += "ns"; - if(have_role) - result += "]"; - } - else - result += *k; - } + result += *k; result += "]"; } result += "]\n"; @@ -201,7 +155,27 @@ void add_to_all_sections(const std::string& id, std::string list_name) } } -void add_cell(const std::string& cell_name, const std::string& table_name, const std::string& row_name, const std::string& column_heading) +std::string get_colour(boost::uintmax_t val, boost::uintmax_t best) +{ + if(val <= best * 1.2) + return "green"; + if(val > best * 2) + return "red"; + return "blue"; +} + +boost::intmax_t get_value_from_cell(const std::string& cell) +{ + static const boost::regex time_e("\\[role[^\\d]+(\\d+)ns\\]"); + boost::smatch what; + if(regex_search(cell, what, time_e)) + { + return boost::lexical_cast(what.str(1)); + } + return -1; +} + +void add_cell(boost::intmax_t val, const std::string& table_name, const std::string& row_name, const std::string& column_heading) { // // Load the table, add our data, and re-write: @@ -266,27 +240,44 @@ void add_cell(const std::string& cell_name, const std::string& table_name, const row_id = table_data.size() - 1; } // - // Update the entry: + // Find the best result in this row: // - std::string& s = table_data[row_id][column_id]; - if(s.empty()) + boost::uintmax_t best = (std::numeric_limits::max)(); + std::vector values; + for(unsigned i = 1; i < table_data[row_id].size(); ++i) { - std::cout << "Adding " << cell_name << " to empty cell."; - s = "[" + cell_name + "]"; - } - else - { - if(cell_name.find("_boost_") != std::string::npos) + if(i == column_id) { - std::cout << "Adding " << cell_name << " to start of cell."; - s.insert(0, "[" + cell_name + "][br][br]"); + if(val < best) + best = val; + values.push_back(val); } else { - std::cout << "Adding " << cell_name << " to end of cell."; - if((s.find("_boost_") != std::string::npos) && (s.find("[br]") == std::string::npos)) - s += "[br]"; // extra break if we're adding directly after the boost results. - s += "[br][" + cell_name + "]"; + std::cout << "Existing cell value was " << table_data[row_id][i] << std::endl; + boost::uintmax_t cell_val = get_value_from_cell(table_data[row_id][i]); + std::cout << "Extracted value: " << cell_val << std::endl; + if(cell_val < best) + best = cell_val; + values.push_back(cell_val); + } + } + // + // Update the row: + // + for(unsigned i = 1; i < table_data[row_id].size(); ++i) + { + std::string& s = table_data[row_id][i]; + s = "[role "; + if(values[i - 1] < 0) + { + s += "grey -]"; + } + else + { + s += get_colour(values[i - 1], best); + s += " "; + s += boost::lexical_cast(values[i - 1]) + "ns]"; } } // @@ -301,16 +292,16 @@ void add_cell(const std::string& cell_name, const std::string& table_name, const // std::string new_table = "\n[template " + table_id; new_table += "[]\n[table:" + table_id; - new_table += " Performance comparison for "; + new_table += " "; new_table += table_name; new_table += "\n[[Function]["; new_table += column_heading; new_table += "]]\n"; new_table += "[["; new_table += row_name; - new_table += "][["; - new_table += cell_name; - new_table += "]]]\n]\n]\n"; + new_table += "][[role blue "; + new_table += boost::lexical_cast(val); + new_table += "ns]]]\n]\n]\n"; std::string::size_type pos = content.find("[/tables:]"); if(pos != std::string::npos) @@ -338,70 +329,42 @@ void add_cell(const std::string& cell_name, const std::string& table_name, const } } -void set_result(const std::string& cell_name, const std::string& cell_content, const std::string& table_name, const std::string& row_name, const std::string& column_name) +void report_execution_time(double t, std::string table, std::string row, std::string heading) { - loader.instantiate(); - const boost::regex e("\\[template\\s+" + cell_name + - "\\[\\]([^\\n]*)\\]$"); - - boost::smatch what; - if(regex_search(content, what, e)) - { - content.replace(what.position(1), what.length(1), cell_content); - } - else - { - // Need to add new content: - std::string::size_type pos = content.find("[/Cell Content:]"); - std::string t = "\n[template " + cell_name + "[] " + cell_content + "]"; - if(pos != std::string::npos) - content.insert(pos + 16, t); - else - { - content.insert(0, t); - content.insert(0, "[/Cell Content:]"); - } - } - // - // Check to verify that our content is actually used somewhere, - // if not we need to create a place for it: - // - if(content.find("[" + cell_name + "]") == std::string::npos) - add_cell(cell_name, table_name, row_name, column_name); -} - - -void report_execution_time_multi_compilation(double t, std::string function_group, std::string function, std::string compilation) -{ - std::string cell_name = sanitize_string(function) + sanitize_string(compilation) + sanitize_string(BOOST_COMPILER) + sanitize_string(BOOST_PLATFORM); - std::string cell_content = boost::lexical_cast(static_cast(t / 1e-9)); - cell_content += "ns"; - std::string table_name = function_group; - std::string row_name = function; - std::string column_name = compilation; - set_result(cell_name, cell_content, table_name, row_name, column_name); + add_cell(static_cast(t / 1e-9), table, row, heading); } std::string get_compiler_options_name() { -#if defined(BOOST_MSVC) +#if defined(BOOST_MSVC) || defined(__ICL) std::string result; -#ifdef _DEBUG - result = "cl /Od"; -#elif defined(__AVX2__) - result = "cl /arch:AVX2 /Ox"; -#elif defined(__AVX__) - result = "cl /arch:AVX /Ox"; -#elif _M_IX86_FP == 2 - result = "cl /arch:sse2 /Ox"; +#ifdef BOOST_MSVC + result = "cl "; #else - result = "cl /arch:ia32 /Ox"; + result = "icl "; #endif #ifdef _M_AMD64 +#ifdef __AVX__ + result += "/arch:AVX /Ox"; +#else + result += "/Ox"; +#endif result += " (x64 build)"; #else +#ifdef _DEBUG + result += "/Od"; +#elif defined(__AVX2__) + result += "/arch:AVX2 /Ox"; +#elif defined(__AVX__) + result += "/arch:AVX /Ox"; +#elif _M_IX86_FP == 2 + result += "/arch:sse2 /Ox"; +#else + result += "/arch:ia32 /Ox"; +#endif result += " (x86 build)"; #endif + std::cout << "Compiler options are found as: " << result << std::endl; return result; #else return "Unknown"; diff --git a/reporting/performance/table_helper.hpp b/reporting/performance/table_helper.hpp index 1c4826632..20bffd92b 100644 --- a/reporting/performance/table_helper.hpp +++ b/reporting/performance/table_helper.hpp @@ -17,7 +17,7 @@ std::string save_table(std::vector >& table); void add_to_all_sections(const std::string& id, std::string list_name = "all_sections"); void add_cell(const std::string& cell_name, const std::string& table_name, const std::string& row_name, const std::string& column_heading); void set_result(const std::string& cell_name, const std::string& cell_content, const std::string& table_name, const std::string& row_name, const std::string& column_name); -void report_execution_time_multi_compilation(double t, std::string function_group, std::string function, std::string compilation); +void report_execution_time(double t, std::string table, std::string row, std::string heading); std::string get_compiler_options_name(); #endif // TABLE_HELPER_HPP diff --git a/reporting/performance/test_cbrt.cpp b/reporting/performance/test_cbrt.cpp index 7ac0f0784..20bae8353 100644 --- a/reporting/performance/test_cbrt.cpp +++ b/reporting/performance/test_cbrt.cpp @@ -9,6 +9,7 @@ #include #include +#include #include "../../test/table_type.hpp" #include "table_helper.hpp" #include "performance.hpp" @@ -22,20 +23,41 @@ int main() add_data(cbrt_data); + unsigned data_total = data.size(); screen_data([](const std::vector& v){ return boost::math::cbrt(v[1]); }, [](const std::vector& v){ return v[0]; }); -#ifdef TEST_C99 +#if defined(TEST_C99) && !defined(COMPILER_COMPARISON_TABLES) screen_data([](const std::vector& v){ return ::cbrt(v[1]); }, [](const std::vector& v){ return v[0]; }); #endif + unsigned data_used = data.size(); + std::string function = "cbrt[br](" + boost::lexical_cast(data_used) + "/" + boost::lexical_cast(data_total) + " tests selected)"; + double time = exec_timed_test([](const std::vector& v){ return boost::math::cbrt(v[1]); }); - report_execution_time_multi_compilation(time, "cbrt", "boost::math::cbrt", get_compiler_options_name()); std::cout << time << std::endl; -#ifdef TEST_C99 +#if defined(COMPILER_COMPARISON_TABLES) + report_execution_time(time, std::string("Compiler Option Comparison on ") + BOOST_PLATFORM, "boost::math::cbrt", get_compiler_options_name()); +#else + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "Boost"); +#endif + // + // Boost again, but with promotion to long double turned off: + // +#if !defined(COMPILER_COMPARISON_TABLES) + if(sizeof(long double) != sizeof(double)) + { + double time = exec_timed_test([](const std::vector& v){ return boost::math::cbrt(v[1], boost::math::policies::make_policy(boost::math::policies::promote_double())); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "Boost[br](no internal promotion to long double)"); + } +#endif + + +#if defined(TEST_C99) && !defined(COMPILER_COMPARISON_TABLES) time = exec_timed_test([](const std::vector& v){ return ::cbrt(v[1]); }); std::cout << time << std::endl; - report_execution_time_multi_compilation(time, "cbrt", "::cbrt", get_compiler_options_name()); + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "math.h"); #endif diff --git a/reporting/performance/test_erf.cpp b/reporting/performance/test_erf.cpp new file mode 100644 index 000000000..5b3355760 --- /dev/null +++ b/reporting/performance/test_erf.cpp @@ -0,0 +1,67 @@ +// Copyright John Maddock 2015. +// Use, modification and distribution are subject to 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) + +#ifdef _MSC_VER +# pragma warning (disable : 4224) +#endif + +#include +#include +#include +#include "../../test/table_type.hpp" +#include "table_helper.hpp" +#include "performance.hpp" +#include + +int main() +{ + typedef double T; +#define SC_(x) static_cast(x) +# include "erf_small_data.ipp" +# include "erf_data.ipp" +# include "erf_large_data.ipp" + + add_data(erf_small_data); + add_data(erf_data); + add_data(erf_large_data); + + unsigned data_total = data.size(); + + screen_data([](const std::vector& v){ return boost::math::erf(v[0]); }, [](const std::vector& v){ return v[1]; }); + + +#if defined(TEST_C99) && !defined(COMPILER_COMPARISON_TABLES) + screen_data([](const std::vector& v){ return ::erf(v[0]); }, [](const std::vector& v){ return v[1]; }); +#endif + + unsigned data_used = data.size(); + std::string function = "erf[br](" + boost::lexical_cast(data_used) + "/" + boost::lexical_cast(data_total) + " tests selected)"; + + double time = exec_timed_test([](const std::vector& v){ return boost::math::erf(v[0]); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "Boost"); + // + // Boost again, but with promotion to long double turned off: + // +#if !defined(COMPILER_COMPARISON_TABLES) + if(sizeof(long double) != sizeof(double)) + { + double time = exec_timed_test([](const std::vector& v){ return boost::math::erf(v[0], boost::math::policies::make_policy(boost::math::policies::promote_double())); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "Boost[br](no internal promotion to long double)"); + } +#endif + + +#if defined(TEST_C99) && !defined(COMPILER_COMPARISON_TABLES) + time = exec_timed_test([](const std::vector& v){ return ::erf(v[0]); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "math.h"); +#endif + + + return 0; +} + diff --git a/reporting/performance/test_erfc.cpp b/reporting/performance/test_erfc.cpp new file mode 100644 index 000000000..cbede3fcf --- /dev/null +++ b/reporting/performance/test_erfc.cpp @@ -0,0 +1,67 @@ +// Copyright John Maddock 2015. +// Use, modification and distribution are subject to 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) + +#ifdef _MSC_VER +# pragma warning (disable : 4224) +#endif + +#include +#include +#include +#include "../../test/table_type.hpp" +#include "table_helper.hpp" +#include "performance.hpp" +#include + +int main() +{ + typedef double T; +#define SC_(x) static_cast(x) +# include "erf_small_data.ipp" +# include "erf_data.ipp" +# include "erf_large_data.ipp" + + add_data(erf_small_data); + add_data(erf_data); + add_data(erf_large_data); + + unsigned data_total = data.size(); + + screen_data([](const std::vector& v){ return boost::math::erfc(v[0]); }, [](const std::vector& v){ return v[2]; }); + + +#if defined(TEST_C99) && !defined(COMPILER_COMPARISON_TABLES) + screen_data([](const std::vector& v){ return ::erfc(v[0]); }, [](const std::vector& v){ return v[2]; }); +#endif + + unsigned data_used = data.size(); + std::string function = "erfc[br](" + boost::lexical_cast(data_used) + "/" + boost::lexical_cast(data_total) + " tests selected)"; + + double time = exec_timed_test([](const std::vector& v){ return boost::math::erfc(v[0]); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "Boost"); + // + // Boost again, but with promotion to long double turned off: + // +#if !defined(COMPILER_COMPARISON_TABLES) + if(sizeof(long double) != sizeof(double)) + { + double time = exec_timed_test([](const std::vector& v){ return boost::math::erfc(v[0], boost::math::policies::make_policy(boost::math::policies::promote_double())); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "Boost[br](no internal promotion to long double)"); + } +#endif + + +#if defined(TEST_C99) && !defined(COMPILER_COMPARISON_TABLES) + time = exec_timed_test([](const std::vector& v){ return ::erfc(v[0]); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "math.h"); +#endif + + + return 0; +} + diff --git a/reporting/performance/test_expm1.cpp b/reporting/performance/test_expm1.cpp new file mode 100644 index 000000000..7a0b5a130 --- /dev/null +++ b/reporting/performance/test_expm1.cpp @@ -0,0 +1,63 @@ +// Copyright John Maddock 2015. +// Use, modification and distribution are subject to 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) + +#ifdef _MSC_VER +# pragma warning (disable : 4224) +#endif + +#include +#include +#include +#include "../../test/table_type.hpp" +#include "table_helper.hpp" +#include "performance.hpp" +#include + +int main() +{ + typedef double T; +#define SC_(x) static_cast(x) +# include "../../test/log1p_expm1_data.ipp" + + add_data(log1p_expm1_data); + + unsigned data_total = data.size(); + + screen_data([](const std::vector& v){ return boost::math::expm1(v[0]); }, [](const std::vector& v){ return v[2]; }); + + +#if defined(TEST_C99) && !defined(COMPILER_COMPARISON_TABLES) + screen_data([](const std::vector& v){ return ::expm1(v[0]); }, [](const std::vector& v){ return v[2]; }); +#endif + + unsigned data_used = data.size(); + std::string function = "expm1[br](" + boost::lexical_cast(data_used) + "/" + boost::lexical_cast(data_total) + " tests selected)"; + + double time = exec_timed_test([](const std::vector& v){ return boost::math::expm1(v[0]); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "Boost"); + // + // Boost again, but with promotion to long double turned off: + // +#if !defined(COMPILER_COMPARISON_TABLES) + if(sizeof(long double) != sizeof(double)) + { + double time = exec_timed_test([](const std::vector& v){ return boost::math::expm1(v[0], boost::math::policies::make_policy(boost::math::policies::promote_double())); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "Boost[br](no internal promotion to long double)"); + } +#endif + + +#if defined(TEST_C99) && !defined(COMPILER_COMPARISON_TABLES) + time = exec_timed_test([](const std::vector& v){ return ::expm1(v[0]); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "math.h"); +#endif + + + return 0; +} + diff --git a/reporting/performance/test_jn.cpp b/reporting/performance/test_jn.cpp new file mode 100644 index 000000000..618654c59 --- /dev/null +++ b/reporting/performance/test_jn.cpp @@ -0,0 +1,133 @@ +// Copyright John Maddock 2015. +// Use, modification and distribution are subject to 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) + +#ifdef _MSC_VER +# pragma warning (disable : 4224) +#endif + +#include +#include +#include +#include "../../test/table_type.hpp" +#include "table_helper.hpp" +#include "performance.hpp" +#include + +typedef double T; +#define SC_(x) static_cast(x) +static const boost::array::type, 3>, 8> j0_data = { { + { { SC_(0.0), SC_(0.0), SC_(1.0) } }, + { { SC_(0.0), SC_(1.0), SC_(0.7651976865579665514497175261026632209093) } }, + { { SC_(0.0), SC_(-2.0), SC_(0.2238907791412356680518274546499486258252) } }, + { { SC_(0.0), SC_(4.0), SC_(-0.3971498098638473722865907684516980419756) } }, + { { SC_(0.0), SC_(-8.0), SC_(0.1716508071375539060908694078519720010684) } }, + { { SC_(0.0), SC_(1e-05), SC_(0.999999999975000000000156249999999565972) } }, + { { SC_(0.0), SC_(1e-10), SC_(0.999999999999999999997500000000000000000) } }, + { { SC_(0.0), SC_(-1e+01), SC_(-0.2459357644513483351977608624853287538296) } }, + } }; +static const boost::array, 6> j0_tricky = { { + // Big numbers make the accuracy of std::sin the limiting factor: + { { SC_(0.0), SC_(1e+03), SC_(0.02478668615242017456133073111569370878617) } }, + { { SC_(0.0), SC_(1e+05), SC_(-0.001719201116235972192570601477073201747532) } }, + // test at the roots: + { { SC_(0.0), T(2521642.0) / (1024 * 1024), SC_(1.80208819970046790002973759410972422387259992955354630042138e-7) } }, + { { SC_(0.0), T(5788221.0) / (1024 * 1024), SC_(-1.37774249380686777043369399806210229535671843632174587432454e-7) } }, + { { SC_(0.0), T(9074091.0) / (1024 * 1024), SC_(1.03553057441100845081018471279571355857520645127532785991335e-7) } }, + { { SC_(0.0), T(12364320.0) / (1024 * 1024), SC_(-3.53017140778223781420794006033810387155048392363051866610931e-9) } } + } }; + +static const boost::array::type, 3>, 8> j1_data = { { + { { SC_(1.0), SC_(0.0), SC_(0.0) } }, + { { SC_(1.0), SC_(1.0), SC_(0.4400505857449335159596822037189149131274) } }, + { { SC_(1.0), SC_(-2.0), SC_(-0.5767248077568733872024482422691370869203) } }, + { { SC_(1.0), SC_(4.0), SC_(-6.604332802354913614318542080327502872742e-02) } }, + { { SC_(1.0), SC_(-8.0), SC_(-0.2346363468539146243812766515904546115488) } }, + { { SC_(1.0), SC_(1e-05), SC_(4.999999999937500000000260416666666124132e-06) } }, + { { SC_(1.0), SC_(1e-10), SC_(4.999999999999999999993750000000000000000e-11) } }, + { { SC_(1.0), SC_(-1e+01), SC_(-4.347274616886143666974876802585928830627e-02) } }, + } }; +static const boost::array, 5> j1_tricky = { { + // Big numbers make the accuracy of std::sin the limiting factor: + { { SC_(1.0), SC_(1e+03), SC_(4.728311907089523917576071901216916285418e-03) } }, + { { SC_(1.0), SC_(1e+05), SC_(1.846757562882567716362123967114215743694e-03) } }, + // test zeros: + { { SC_(1.0), T(4017834) / (1024 * 1024), SC_(3.53149033321258645807835062770856949751958513973522222203044e-7) } }, + { { SC_(1.0), T(7356375) / (1024 * 1024), SC_(-2.31227973111067286051984021150135526024117175836722748404342e-7) } }, + { { SC_(1.0), T(10667654) / (1024 * 1024), SC_(1.24591331097191900488116495350277530373473085499043086981229e-7) } }, + } }; + +static const boost::array::type, 3>, 17> jn_data = { { + // This first one is a modified test case from https://svn.boost.org/trac/boost/ticket/2733 + { { SC_(-1.0), SC_(1.25), SC_(-0.510623260319880467069474837274910375352924050139633057168856) } }, + { { SC_(2.0), SC_(0.0), SC_(0.0) } }, + { { SC_(-2.0), SC_(0.0), SC_(0.0) } }, + { { SC_(2.0), SC_(1e-02), SC_(1.249989583365885362413250958437642113452e-05) } }, + { { SC_(5.0), SC_(10.0), SC_(-0.2340615281867936404436949416457777864635) } }, + { { SC_(5.0), SC_(-10.0), SC_(0.2340615281867936404436949416457777864635) } }, + { { SC_(-5.0), SC_(1e+06), SC_(7.259643842453285052375779970433848914846e-04) } }, + { { SC_(5.0), SC_(1e+06), SC_(-0.000725964384245328505237577997043384891484649290328285235308619) } }, + { { SC_(-5.0), SC_(-1.0), SC_(2.497577302112344313750655409880451981584e-04) } }, + { { SC_(10.0), SC_(10.0), SC_(0.2074861066333588576972787235187534280327) } }, + { { SC_(10.0), SC_(-10.0), SC_(0.2074861066333588576972787235187534280327) } }, + { { SC_(10.0), SC_(-5.0), SC_(1.467802647310474131107532232606627020895e-03) } }, + { { SC_(-10.0), SC_(1e+06), SC_(-3.310793117604488741264958559035744460210e-04) } }, + { { SC_(10.0), SC_(1e+06), SC_(-0.000331079311760448874126495855903574446020957243277028930713243) } }, + { { SC_(1e+02), SC_(8e+01), SC_(4.606553064823477354141298259169874909670e-06) } }, + { { SC_(1e+03), SC_(1e+05), SC_(1.283178112502480365195139312635384057363e-03) } }, + { { SC_(10.0), SC_(1e-100), SC_(2.69114445546737213403880070546737213403880070546737213403880e-1010) } }, + } }; + + +int main() +{ +#include "bessel_j_int_data.ipp" + + add_data(j0_data); + add_data(j0_tricky); + add_data(j1_data); + add_data(j1_tricky); + add_data(jn_data); + add_data(bessel_j_int_data); + + unsigned data_total = data.size(); + + screen_data([](const std::vector& v){ return boost::math::cyl_bessel_j(static_cast(v[0]), v[1]); }, [](const std::vector& v){ return v[2]; }); + + +#if defined(TEST_C99) && !defined(COMPILER_COMPARISON_TABLES) + screen_data([](const std::vector& v){ return ::jn(static_cast(v[0]), v[1]); }, [](const std::vector& v){ return v[2]; }); +#endif + + unsigned data_used = data.size(); + std::string function = "cyl_bessel_j (integer order)[br](" + boost::lexical_cast(data_used) + "/" + boost::lexical_cast(data_total) + " tests selected)"; + + double time; + + time = exec_timed_test([](const std::vector& v){ return boost::math::cyl_bessel_j(static_cast(v[0]), v[1]); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "Boost"); + // + // Boost again, but with promotion to long double turned off: + // +#if !defined(COMPILER_COMPARISON_TABLES) + if(sizeof(long double) != sizeof(double)) + { + time = exec_timed_test([](const std::vector& v){ return boost::math::cyl_bessel_j(static_cast(v[0]), v[1], boost::math::policies::make_policy(boost::math::policies::promote_double())); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "Boost[br](no internal promotion to long double)"); + } +#endif + + +#if defined(TEST_C99) && !defined(COMPILER_COMPARISON_TABLES) + time = exec_timed_test([](const std::vector& v){ return ::jn(static_cast(v[0]), v[1]); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "math.h"); +#endif + + + return 0; +} + diff --git a/reporting/performance/test_lgamma.cpp b/reporting/performance/test_lgamma.cpp new file mode 100644 index 000000000..08b25bda2 --- /dev/null +++ b/reporting/performance/test_lgamma.cpp @@ -0,0 +1,68 @@ +// Copyright John Maddock 2015. +// Use, modification and distribution are subject to 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) + +#ifdef _MSC_VER +# pragma warning (disable : 4224) +#endif + +#include +#include +#include +#include "../../test/table_type.hpp" +#include "table_helper.hpp" +#include "performance.hpp" +#include + +int main() +{ + typedef double T; +#define SC_(x) static_cast(x) +# include "test_gamma_data.ipp" + + add_data(factorials); + add_data(near_0); + add_data(near_1); + add_data(near_2); + add_data(near_m10); + add_data(near_m55); + + unsigned data_total = data.size(); + + screen_data([](const std::vector& v){ return boost::math::lgamma(v[0]); }, [](const std::vector& v){ return v[2]; }); + + +#if defined(TEST_C99) && !defined(COMPILER_COMPARISON_TABLES) + screen_data([](const std::vector& v){ return ::lgamma(v[0]); }, [](const std::vector& v){ return v[2]; }); +#endif + + unsigned data_used = data.size(); + std::string function = "lgamma[br](" + boost::lexical_cast(data_used) + "/" + boost::lexical_cast(data_total) + " tests selected)"; + + double time = exec_timed_test([](const std::vector& v){ return boost::math::lgamma(v[0]); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "Boost"); + // + // Boost again, but with promotion to long double turned off: + // +#if !defined(COMPILER_COMPARISON_TABLES) + if(sizeof(long double) != sizeof(double)) + { + double time = exec_timed_test([](const std::vector& v){ return boost::math::lgamma(v[0], boost::math::policies::make_policy(boost::math::policies::promote_double())); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "Boost[br](no internal promotion to long double)"); + } +#endif + + +#if defined(TEST_C99) && !defined(COMPILER_COMPARISON_TABLES) + time = exec_timed_test([](const std::vector& v){ return ::lgamma(v[0]); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "math.h"); +#endif + + + return 0; +} + diff --git a/reporting/performance/test_log1p.cpp b/reporting/performance/test_log1p.cpp new file mode 100644 index 000000000..de0b58cb8 --- /dev/null +++ b/reporting/performance/test_log1p.cpp @@ -0,0 +1,62 @@ +// Copyright John Maddock 2015. +// Use, modification and distribution are subject to 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) + +#ifdef _MSC_VER +# pragma warning (disable : 4224) +#endif + +#include +#include +#include +#include "../../test/table_type.hpp" +#include "table_helper.hpp" +#include "performance.hpp" +#include + +int main() +{ + typedef double T; +#define SC_(x) static_cast(x) +# include "../../test/log1p_expm1_data.ipp" + + add_data(log1p_expm1_data); + + unsigned data_total = data.size(); + + screen_data([](const std::vector& v){ return boost::math::log1p(v[0]); }, [](const std::vector& v){ return v[1]; }); + +#if defined(TEST_C99) && !defined(COMPILER_COMPARISON_TABLES) + screen_data([](const std::vector& v){ return ::log1p(v[0]); }, [](const std::vector& v){ return v[1]; }); +#endif + + unsigned data_used = data.size(); + std::string function = "log1p[br](" + boost::lexical_cast(data_used)+"/" + boost::lexical_cast(data_total)+" tests selected)"; + + double time = exec_timed_test([](const std::vector& v){ return boost::math::log1p(v[0]); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "Boost"); + // + // Boost again, but with promotion to long double turned off: + // +#if !defined(COMPILER_COMPARISON_TABLES) + if(sizeof(long double) != sizeof(double)) + { + double time = exec_timed_test([](const std::vector& v){ return boost::math::log1p(v[0], boost::math::policies::make_policy(boost::math::policies::promote_double())); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "Boost[br](no internal promotion to long double)"); + } +#endif + + +#if defined(TEST_C99) && !defined(COMPILER_COMPARISON_TABLES) + time = exec_timed_test([](const std::vector& v){ return ::log1p(v[0]); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "math.h"); +#endif + + + return 0; +} + diff --git a/reporting/performance/test_tgamma.cpp b/reporting/performance/test_tgamma.cpp new file mode 100644 index 000000000..b8ff6a9c3 --- /dev/null +++ b/reporting/performance/test_tgamma.cpp @@ -0,0 +1,68 @@ +// Copyright John Maddock 2015. +// Use, modification and distribution are subject to 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) + +#ifdef _MSC_VER +# pragma warning (disable : 4224) +#endif + +#include +#include +#include +#include "../../test/table_type.hpp" +#include "table_helper.hpp" +#include "performance.hpp" +#include + +int main() +{ + typedef double T; +#define SC_(x) static_cast(x) +# include "test_gamma_data.ipp" + + add_data(factorials); + add_data(near_0); + add_data(near_1); + add_data(near_2); + add_data(near_m10); + add_data(near_m55); + + unsigned data_total = data.size(); + + screen_data([](const std::vector& v){ return boost::math::tgamma(v[0]); }, [](const std::vector& v){ return v[1]; }); + + +#if defined(TEST_C99) && !defined(COMPILER_COMPARISON_TABLES) + screen_data([](const std::vector& v){ return ::tgamma(v[0]); }, [](const std::vector& v){ return v[1]; }); +#endif + + unsigned data_used = data.size(); + std::string function = "tgamma[br](" + boost::lexical_cast(data_used) + "/" + boost::lexical_cast(data_total) + " tests selected)"; + + double time = exec_timed_test([](const std::vector& v){ return boost::math::tgamma(v[0]); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "Boost"); + // + // Boost again, but with promotion to long double turned off: + // +#if !defined(COMPILER_COMPARISON_TABLES) + if(sizeof(long double) != sizeof(double)) + { + double time = exec_timed_test([](const std::vector& v){ return boost::math::tgamma(v[0], boost::math::policies::make_policy(boost::math::policies::promote_double())); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "Boost[br](no internal promotion to long double)"); + } +#endif + + +#if defined(TEST_C99) && !defined(COMPILER_COMPARISON_TABLES) + time = exec_timed_test([](const std::vector& v){ return ::tgamma(v[0]); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "math.h"); +#endif + + + return 0; +} + diff --git a/reporting/performance/test_yn.cpp b/reporting/performance/test_yn.cpp new file mode 100644 index 000000000..6f7e7f1cd --- /dev/null +++ b/reporting/performance/test_yn.cpp @@ -0,0 +1,105 @@ +// Copyright John Maddock 2015. +// Use, modification and distribution are subject to 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) + +#ifdef _MSC_VER +# pragma warning (disable : 4224) +#endif + +#include +#include +#include +#include "../../test/table_type.hpp" +#include "table_helper.hpp" +#include "performance.hpp" +#include + +typedef double T; +#define SC_(x) static_cast(x) +static const boost::array::type, 3>, 9> y0_data = { { + { { SC_(0.0), SC_(1.0), SC_(0.0882569642156769579829267660235151628278175230906755467110438) } }, + { { SC_(0.0), SC_(2.0), SC_(0.510375672649745119596606592727157873268139227085846135571839) } }, + { { SC_(0.0), SC_(4.0), SC_(-0.0169407393250649919036351344471532182404925898980149027169321) } }, + { { SC_(0.0), SC_(8.0), SC_(0.223521489387566220527323400498620359274814930781423577578334) } }, + { { SC_(0.0), SC_(1e-05), SC_(-7.40316028370197013259676050746759072070960287586102867247159) } }, + { { SC_(0.0), SC_(1e-10), SC_(-14.7325162726972420426916696426209144888762342592762415255386) } }, + { { SC_(0.0), SC_(1e-20), SC_(-29.3912282502857968601858410375186700783698345615477536431464) } }, + { { SC_(0.0), SC_(1e+03), SC_(0.00471591797762281339977326146566525500985900489680197718528000) } }, + { { SC_(0.0), SC_(1e+05), SC_(0.00184676615886506410434074102431546125884886798090392516843524) } } + } }; +static const boost::array::type, 3>, 9> y1_data = { { + { { SC_(1.0), SC_(1.0), SC_(-0.781212821300288716547150000047964820549906390716444607843833) } }, + { { SC_(1.0), SC_(2.0), SC_(-0.107032431540937546888370772277476636687480898235053860525795) } }, + { { SC_(1.0), SC_(4.0), SC_(0.397925710557100005253979972450791852271189181622908340876586) } }, + { { SC_(1.0), SC_(8.0), SC_(-0.158060461731247494255555266187483550327344049526705737651263) } }, + { { SC_(1.0), SC_(1e-10), SC_(-6.36619772367581343150789184284462611709080831190542841855708e9) } }, + { { SC_(1.0), SC_(1e-20), SC_(-6.36619772367581343075535053490057448139324059868649274367256e19) } }, + { { SC_(1.0), SC_(1e+01), SC_(0.249015424206953883923283474663222803260416543069658461246944) } }, + { { SC_(1.0), SC_(1e+03), SC_(-0.0247843312923517789148623560971412909386318548648705287583490) } }, + { { SC_(1.0), SC_(1e+05), SC_(0.00171921035008825630099494523539897102954509504993494957572726) } } + } }; +static const boost::array::type, 3>, 10> yn_data = { { + { { SC_(2.0), SC_(1e-20), SC_(-1.27323954473516268615107010698011489627570899691226996904849e40) } }, + { { SC_(5.0), SC_(10.0), SC_(0.135403047689362303197029014762241709088405766746419538495983) } }, + { { SC_(-5.0), SC_(1e+06), SC_(0.000331052088322609048503535570014688967096938338061796192422114) } }, + { { SC_(10.0), SC_(10.0), SC_(-0.359814152183402722051986577343560609358382147846904467526222) } }, + { { SC_(10.0), SC_(1e-10), SC_(-1.18280490494334933900960937719565669877576135140014365217993e108) } }, + { { SC_(-10.0), SC_(1e+06), SC_(0.000725951969295187086245251366365393653610914686201194434805730) } }, + { { SC_(1e+02), SC_(5.0), SC_(-5.08486391602022287993091563093082035595081274976837280338134e115) } }, + { { SC_(1e+03), SC_(1e+05), SC_(0.00217254919137684037092834146629212647764581965821326561261181) } }, + { { SC_(-1e+03), SC_(7e+02), SC_(-1.88753109980945889960843803284345261796244752396992106755091e77) } }, + { { SC_(-25.0), SC_(8.0), SC_(3.45113613777297661997458045843868931827873456761831907587263e8) } } + } }; + +int main() +{ +#include "bessel_y01_data.ipp" +#include "bessel_yn_data.ipp" + + add_data(y0_data); + add_data(y1_data); + add_data(yn_data); + add_data(bessel_y01_data); + add_data(bessel_yn_data); + + unsigned data_total = data.size(); + + screen_data([](const std::vector& v){ return boost::math::cyl_neumann(static_cast(v[0]), v[1]); }, [](const std::vector& v){ return v[2]; }); + + +#if defined(TEST_C99) && !defined(COMPILER_COMPARISON_TABLES) + screen_data([](const std::vector& v){ return ::yn(static_cast(v[0]), v[1]); }, [](const std::vector& v){ return v[2]; }); +#endif + + unsigned data_used = data.size(); + std::string function = "cyl_neumann (integer order)[br](" + boost::lexical_cast(data_used) + "/" + boost::lexical_cast(data_total) + " tests selected)"; + + double time; + + time = exec_timed_test([](const std::vector& v){ return boost::math::cyl_neumann(static_cast(v[0]), v[1]); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "Boost"); + // + // Boost again, but with promotion to long double turned off: + // +#if !defined(COMPILER_COMPARISON_TABLES) + if(sizeof(long double) != sizeof(double)) + { + time = exec_timed_test([](const std::vector& v){ return boost::math::cyl_neumann(static_cast(v[0]), v[1], boost::math::policies::make_policy(boost::math::policies::promote_double())); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "Boost[br](no internal promotion to long double)"); + } +#endif + + +#if defined(TEST_C99) && !defined(COMPILER_COMPARISON_TABLES) + time = exec_timed_test([](const std::vector& v){ return ::yn(static_cast(v[0]), v[1]); }); + std::cout << time << std::endl; + report_execution_time(time, std::string("Library Comparison on ") + BOOST_PLATFORM, function, "math.h"); +#endif + + + return 0; +} +