Boost C++ Libraries

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

PrevUpHomeNext

Performance Tuning Macros

There are a small number of performance tuning options that are determined by configuration macros. These should be set in boost/math/tools/user.hpp; or else reported to the Boost-development mailing list so that the appropriate option for a given compiler and OS platform can be set automatically in our configuration setup.

Macro

Meaning

BOOST_MATH_POLY_METHOD

Determines how polynomials and most rational functions are evaluated. Define to one of the values 0, 1, 2 or 3: see below for the meaning of these values.

BOOST_MATH_RATIONAL_METHOD

Determines how symmetrical rational functions are evaluated: mostly this only effects how the Lanczos approximation is evaluated, and how the evaluate_rational function behaves. Define to one of the values 0, 1, 2 or 3: see below for the meaning of these values.

BOOST_MATH_MAX_POLY_ORDER

The maximum order of polynomial or rational function that will be evaluated by a method other than 0 (a simple "for" loop).

BOOST_MATH_INT_TABLE_TYPE(RT, IT)

Many of the coefficients to the polynomials and rational functions used by this library are integers. Normally these are stored as tables as integers, but if mixed integer / floating point arithmetic is much slower than regular floating point arithmetic then they can be stored as tables of floating point values instead. If mixed arithmetic is slow then add:

  1. define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT

to boost/math/tools/user.hpp, otherwise the default of:

  1. define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT

Set in boost/math/config.hpp is fine, and may well result in smaller code.

The values to which BOOST_MATH_POLY_METHOD and BOOST_MATH_RATIONAL_METHOD may be set are as follows:

Value

Effect

0

The polynomial or rational function is evaluated using Horner's method, and a simple for-loop.

Note that if the order of the polynomial or rational function is a runtime parameter, or the order is greater than the value of BOOST_MATH_MAX_POLY_ORDER, then this method is always used, irrespective of the value of BOOST_MATH_POLY_METHOD or BOOST_MATH_RATIONAL_METHOD.

1

The polynomial or rational function is evaluated without the use of a loop, and using Horner's method. This only occurs if the order of the polynomial is known at compile time and is less than or equal to BOOST_MATH_MAX_POLY_ORDER.

2

The polynomial or rational function is evaluated without the use of a loop, and using a second order Horner's method. In theory this permits two operations to occur in parallel for polynomials, and four in parallel for rational functions. This only occurs if the order of the polynomial is known at compile time and is less than or equal to BOOST_MATH_MAX_POLY_ORDER.

3

The polynomial or rational function is evaluated without the use of a loop, and using a second order Horner's method. In theory this permits two operations to occur in parallel for polynomials, and four in parallel for rational functions. This differs from method "2" in that the code is carefully ordered to make the parallelisation more obvious to the compiler: rather than relying on the compiler's optimiser to spot the parallelisation opportunities. This only occurs if the order of the polynomial is known at compile time and is less than or equal to BOOST_MATH_MAX_POLY_ORDER.

The performance test suite generates a report for your particular compiler showing which method is likely to work best, the following tables show the results for MSVC-14.0 and GCC-5.1.0 (Linux). There's not much to choose between the various methods, but generally loop-unrolled methods perform better. Interestingly, ordering the code to try and "second guess" possible optimizations seems not to be such a good idea (method 3 below).

Table 23.4. Polynomial Method Comparison with Microsoft Visual C++ version 14.2 on Windows x64

Function

Method 0
(Double Coefficients)

Method 0
(Integer Coefficients)

Method 1
(Double Coefficients)

Method 1
(Integer Coefficients)

Method 2
(Double Coefficients)

Method 2
(Integer Coefficients)

Method 3
(Double Coefficients)

Method 3
(Integer Coefficients)

Order 2

-

-

1.00
(6ns)

1.00
(6ns)

1.00
(6ns)

1.00
(6ns)

1.00
(6ns)

1.00
(6ns)

Order 3

2.33
(21ns)

3.33
(30ns)

1.00
(9ns)

1.00
(9ns)

1.00
(9ns)

1.00
(9ns)

1.00
(9ns)

1.00
(9ns)

Order 4

2.00
(24ns)

3.00
(36ns)

1.00
(12ns)

1.00
(12ns)

1.00
(12ns)

1.00
(12ns)

1.08
(13ns)

1.08
(13ns)

Order 5

1.56
(25ns)

2.31
(37ns)

1.00
(16ns)

1.00
(16ns)

1.13
(18ns)

1.13
(18ns)

1.56
(25ns)

1.56
(25ns)

Order 6

1.48
(31ns)

2.19
(46ns)

1.05
(22ns)

1.00
(21ns)

1.00
(21ns)

1.00
(21ns)

1.29
(27ns)

1.29
(27ns)

Order 7

1.54
(37ns)

2.33
(56ns)

1.08
(26ns)

1.08
(26ns)

1.04
(25ns)

1.00
(24ns)

1.13
(27ns)

1.17
(28ns)

Order 8

1.53
(46ns)

2.23
(67ns)

1.07
(32ns)

1.07
(32ns)

1.00
(30ns)

1.00
(30ns)

1.03
(31ns)

1.03
(31ns)

Order 9

1.35
(46ns)

2.06
(70ns)

1.18
(40ns)

1.32
(45ns)

1.00
(34ns)

1.00
(34ns)

1.09
(37ns)

1.06
(36ns)

Order 10

1.38
(54ns)

2.13
(83ns)

1.21
(47ns)

1.15
(45ns)

1.00
(39ns)

1.00
(39ns)

1.03
(40ns)

1.03
(40ns)

Order 11

1.48
(62ns)

2.24
(94ns)

1.24
(52ns)

1.26
(53ns)

1.07
(45ns)

1.00
(42ns)

1.10
(46ns)

1.02
(43ns)

Order 12

1.48
(71ns)

2.27
(109ns)

1.25
(60ns)

1.27
(61ns)

1.04
(50ns)

1.00
(48ns)

1.00
(48ns)

1.00
(48ns)

Order 13

1.55
(76ns)

2.33
(114ns)

1.31
(64ns)

1.31
(64ns)

1.04
(51ns)

1.04
(51ns)

1.02
(50ns)

1.00
(49ns)

Order 14

1.53
(84ns)

2.40
(132ns)

1.44
(79ns)

1.40
(77ns)

1.04
(57ns)

1.02
(56ns)

1.00
(55ns)

1.00
(55ns)

Order 15

1.51
(95ns)

2.33
(147ns)

1.37
(86ns)

1.38
(87ns)

1.05
(66ns)

1.06
(67ns)

1.00
(63ns)

1.00
(63ns)

Order 16

1.47
(106ns)

2.18
(157ns)

1.40
(101ns)

1.33
(96ns)

1.01
(73ns)

1.03
(74ns)

1.00
(72ns)

1.04
(75ns)

Order 17

1.46
(114ns)

2.08
(162ns)

1.44
(112ns)

1.44
(112ns)

1.00
(78ns)

1.01
(79ns)

1.05
(82ns)

1.03
(80ns)

Order 18

1.48
(126ns)

2.08
(177ns)

1.44
(122ns)

1.46
(124ns)

1.02
(87ns)

1.04
(88ns)

1.01
(86ns)

1.00
(85ns)

Order 19

1.49
(136ns)

2.07
(188ns)

1.47
(134ns)

1.47
(134ns)

1.00
(91ns)

1.01
(92ns)

1.05
(96ns)

1.03
(94ns)

Order 20

1.52
(150ns)

2.05
(203ns)

1.45
(144ns)

1.46
(145ns)

1.00
(99ns)

1.02
(101ns)

1.02
(101ns)

1.02
(101ns)


Table 23.5. Rational Method Comparison with Microsoft Visual C++ version 14.2 on Windows x64

Function

Method 0
(Double Coefficients)

Method 0
(Integer Coefficients)

Method 1
(Double Coefficients)

Method 1
(Integer Coefficients)

Method 2
(Double Coefficients)

Method 2
(Integer Coefficients)

Method 3
(Double Coefficients)

Method 3
(Integer Coefficients)

Order 2

-

-

1.92
(23ns)

1.92
(23ns)

1.00
(12ns)

1.17
(14ns)

1.00
(12ns)

1.00
(12ns)

Order 3

1.89
(34ns)

2.28
(41ns)

1.67
(30ns)

1.61
(29ns)

1.06
(19ns)

1.00
(18ns)

1.00
(18ns)

1.00
(18ns)

Order 4

1.72
(43ns)

2.16
(54ns)

1.64
(41ns)

1.60
(40ns)

1.00
(25ns)

1.00
(25ns)

1.00
(25ns)

1.04
(26ns)

Order 5

1.08
(53ns)

1.41
(69ns)

1.00
(49ns)

1.00
(49ns)

1.08
(53ns)

1.08
(53ns)

1.00
(49ns)

1.10
(54ns)

Order 6

1.08
(65ns)

1.42
(85ns)

1.02
(61ns)

1.00
(60ns)

1.05
(63ns)

1.23
(74ns)

1.25
(75ns)

1.40
(84ns)

Order 7

1.06
(75ns)

1.37
(97ns)

1.01
(72ns)

1.00
(71ns)

1.14
(81ns)

1.01
(72ns)

1.20
(85ns)

1.35
(96ns)

Order 8

1.07
(87ns)

1.38
(112ns)

1.04
(84ns)

1.02
(83ns)

1.01
(82ns)

1.00
(81ns)

2.49
(202ns)

2.60
(211ns)

Order 9

1.16
(103ns)

1.61
(143ns)

1.18
(105ns)

1.27
(113ns)

1.01
(90ns)

1.02
(91ns)

1.02
(91ns)

1.00
(89ns)

Order 10

1.15
(115ns)

1.46
(146ns)

1.14
(114ns)

1.12
(112ns)

1.01
(101ns)

1.02
(102ns)

1.01
(101ns)

1.00
(100ns)

Order 11

1.21
(131ns)

1.48
(160ns)

1.17
(126ns)

1.16
(125ns)

1.00
(108ns)

1.27
(137ns)

1.00
(108ns)

1.01
(109ns)

Order 12

1.26
(148ns)

1.53
(179ns)

1.19
(139ns)

1.19
(139ns)

1.02
(119ns)

1.24
(145ns)

1.00
(117ns)

1.00
(117ns)

Order 13

1.31
(163ns)

1.71
(212ns)

1.23
(153ns)

1.52
(189ns)

1.01
(125ns)

1.29
(160ns)

1.01
(125ns)

1.00
(124ns)

Order 14

1.42
(190ns)

1.56
(209ns)

1.32
(177ns)

1.47
(197ns)

1.02
(137ns)

1.31
(175ns)

1.00
(134ns)

1.01
(136ns)

Order 15

1.34
(194ns)

1.51
(219ns)

1.36
(197ns)

1.46
(212ns)

1.02
(148ns)

1.30
(188ns)

1.00
(145ns)

2.23
(323ns)

Order 16

1.38
(216ns)

1.56
(244ns)

1.36
(212ns)

1.31
(204ns)

1.15
(179ns)

1.34
(209ns)

1.00
(156ns)

2.10
(328ns)

Order 17

1.39
(227ns)

1.67
(273ns)

1.34
(218ns)

1.69
(275ns)

1.00
(163ns)

1.32
(215ns)

1.02
(167ns)

2.53
(412ns)

Order 18

1.37
(242ns)

1.73
(306ns)

1.40
(248ns)

1.56
(276ns)

1.06
(187ns)

1.32
(233ns)

1.00
(177ns)

2.15
(380ns)

Order 19

1.28
(254ns)

1.60
(319ns)

1.27
(253ns)

1.51
(300ns)

1.00
(199ns)

1.22
(243ns)

1.80
(359ns)

1.92
(382ns)

Order 20

1.28
(268ns)

1.62
(338ns)

1.27
(265ns)

1.56
(325ns)

1.00
(209ns)

1.24
(259ns)

1.87
(391ns)

2.04
(427ns)


Table 23.6. Polynomial Method Comparison with GNU C++ version 9.2.1 20191008 on linux

Function

Method 0
(Double Coefficients)

Method 0
(Integer Coefficients)

Method 1
(Double Coefficients)

Method 1
(Integer Coefficients)

Method 2
(Double Coefficients)

Method 2
(Integer Coefficients)

Method 3
(Double Coefficients)

Method 3
(Integer Coefficients)

Order 2

-

-

1.00
(6ns)

1.00
(6ns)

1.00
(6ns)

1.00
(6ns)

1.00
(6ns)

1.00
(6ns)

Order 3

1.70
(17ns)

2.40
(24ns)

1.00
(10ns)

1.00
(10ns)

1.00
(10ns)

1.00
(10ns)

1.00
(10ns)

1.00
(10ns)

Order 4

1.85
(24ns)

2.31
(30ns)

1.08
(14ns)

1.08
(14ns)

1.08
(14ns)

1.15
(15ns)

1.00
(13ns)

1.08
(14ns)

Order 5

2.18
(37ns)

2.41
(41ns)

1.06
(18ns)

1.00
(17ns)

1.29
(22ns)

1.18
(20ns)

1.12
(19ns)

1.12
(19ns)

Order 6

1.68
(37ns)

2.18
(48ns)

1.00
(22ns)

1.00
(22ns)

1.09
(24ns)

1.05
(23ns)

1.05
(23ns)

1.05
(23ns)

Order 7

2.12
(55ns)

2.35
(61ns)

1.08
(28ns)

1.12
(29ns)

1.04
(27ns)

1.08
(28ns)

1.04
(27ns)

1.00
(26ns)

Order 8

1.81
(56ns)

2.42
(75ns)

1.10
(34ns)

1.06
(33ns)

1.10
(34ns)

1.00
(31ns)

1.00
(31ns)

1.00
(31ns)

Order 9

1.88
(64ns)

2.56
(87ns)

1.24
(42ns)

1.18
(40ns)

1.00
(34ns)

1.09
(37ns)

1.03
(35ns)

1.06
(36ns)

Order 10

1.70
(68ns)

2.65
(106ns)

1.20
(48ns)

1.20
(48ns)

1.02
(41ns)

1.00
(40ns)

1.02
(41ns)

1.00
(40ns)

Order 11

1.91
(84ns)

2.45
(108ns)

1.25
(55ns)

1.25
(55ns)

1.02
(45ns)

1.05
(46ns)

1.00
(44ns)

1.02
(45ns)

Order 12

1.84
(92ns)

2.56
(128ns)

1.34
(67ns)

1.26
(63ns)

1.00
(50ns)

1.06
(53ns)

1.02
(51ns)

1.00
(50ns)

Order 13

2.02
(103ns)

2.73
(139ns)

1.37
(70ns)

1.31
(67ns)

1.08
(55ns)

1.04
(53ns)

1.02
(52ns)

1.00
(51ns)

Order 14

2.02
(115ns)

2.74
(156ns)

1.49
(85ns)

1.44
(82ns)

1.04
(59ns)

1.02
(58ns)

1.00
(57ns)

1.00
(57ns)

Order 15

1.89
(125ns)

2.55
(168ns)

1.41
(93ns)

1.38
(91ns)

1.00
(66ns)

1.00
(66ns)

1.02
(67ns)

1.03
(68ns)

Order 16

1.77
(136ns)

2.40
(185ns)

1.34
(103ns)

1.40
(108ns)

1.10
(85ns)

1.06
(82ns)

1.00
(77ns)

1.00
(77ns)

Order 17

1.77
(143ns)

2.60
(211ns)

1.43
(116ns)

1.44
(117ns)

1.04
(84ns)

1.00
(81ns)

1.02
(83ns)

1.16
(94ns)

Order 18

1.85
(163ns)

2.39
(210ns)

1.47
(129ns)

1.53
(135ns)

1.00
(88ns)

1.01
(89ns)

1.00
(88ns)

1.00
(88ns)

Order 19

2.01
(183ns)

2.55
(232ns)

1.53
(139ns)

1.53
(139ns)

1.04
(95ns)

1.05
(96ns)

1.00
(91ns)

1.05
(96ns)

Order 20

1.94
(194ns)

2.55
(255ns)

1.48
(148ns)

1.51
(151ns)

1.00
(100ns)

1.00
(100ns)

1.18
(118ns)

1.03
(103ns)


Table 23.7. Rational Method Comparison with GNU C++ version 9.2.1 20191008 on linux

Function

Method 0
(Double Coefficients)

Method 0
(Integer Coefficients)

Method 1
(Double Coefficients)

Method 1
(Integer Coefficients)

Method 2
(Double Coefficients)

Method 2
(Integer Coefficients)

Method 3
(Double Coefficients)

Method 3
(Integer Coefficients)

Order 2

-

-

1.92
(23ns)

1.92
(23ns)

1.25
(15ns)

1.08
(13ns)

1.00
(12ns)

1.08
(13ns)

Order 3

1.89
(36ns)

2.21
(42ns)

1.63
(31ns)

1.47
(28ns)

1.00
(19ns)

1.00
(19ns)

1.11
(21ns)

1.16
(22ns)

Order 4

1.85
(48ns)

2.42
(63ns)

1.54
(40ns)

1.54
(40ns)

1.00
(26ns)

1.00
(26ns)

1.04
(27ns)

1.00
(26ns)

Order 5

1.18
(59ns)

1.42
(71ns)

1.00
(50ns)

1.00
(50ns)

1.10
(55ns)

1.10
(55ns)

1.12
(56ns)

1.10
(55ns)

Order 6

1.11
(69ns)

1.37
(85ns)

1.06
(66ns)

1.00
(62ns)

1.02
(63ns)

1.02
(63ns)

1.05
(65ns)

1.18
(73ns)

Order 7

1.09
(81ns)

1.35
(100ns)

1.00
(74ns)

1.00
(74ns)

1.00
(74ns)

1.01
(75ns)

1.03
(76ns)

1.03
(76ns)

Order 8

1.13
(96ns)

1.33
(113ns)

1.01
(86ns)

1.00
(85ns)

1.00
(85ns)

1.01
(86ns)

1.01
(86ns)

1.04
(88ns)

Order 9

1.15
(108ns)

1.34
(126ns)

1.05
(99ns)

1.05
(99ns)

1.01
(95ns)

1.00
(94ns)

1.02
(96ns)

1.12
(105ns)

Order 10

1.17
(123ns)

1.36
(143ns)

1.10
(115ns)

1.10
(115ns)

1.02
(107ns)

1.05
(110ns)

1.01
(106ns)

1.00
(105ns)

Order 11

1.15
(135ns)

1.34
(157ns)

1.15
(134ns)

1.09
(128ns)

1.01
(118ns)

1.01
(118ns)

1.00
(117ns)

1.02
(119ns)

Order 12

1.19
(150ns)

1.34
(169ns)

1.17
(148ns)

1.28
(161ns)

1.01
(127ns)

1.00
(126ns)

1.00
(126ns)

1.00
(126ns)

Order 13

1.28
(171ns)

1.40
(187ns)

1.34
(180ns)

1.28
(172ns)

1.01
(136ns)

1.00
(134ns)

1.01
(136ns)

1.06
(142ns)

Order 14

1.34
(191ns)

1.43
(204ns)

1.27
(181ns)

1.31
(188ns)

1.01
(144ns)

1.03
(148ns)

1.00
(143ns)

1.07
(153ns)

Order 15

1.41
(206ns)

1.50
(219ns)

1.36
(199ns)

1.31
(191ns)

1.16
(169ns)

1.30
(190ns)

1.02
(149ns)

1.00
(146ns)

Order 16

1.37
(217ns)

1.48
(234ns)

1.32
(209ns)

1.35
(213ns)

1.32
(209ns)

1.19
(188ns)

1.00
(158ns)

1.03
(163ns)

Order 17

1.36
(234ns)

1.48
(254ns)

1.32
(227ns)

1.30
(224ns)

1.13
(194ns)

1.05
(180ns)

1.00
(172ns)

1.02
(176ns)

Order 18

1.37
(248ns)

1.57
(284ns)

1.35
(244ns)

1.39
(252ns)

1.08
(195ns)

1.07
(193ns)

1.02
(185ns)

1.00
(181ns)

Order 19

1.40
(268ns)

1.77
(338ns)

1.38
(264ns)

1.40
(267ns)

1.01
(193ns)

1.00
(191ns)

1.02
(195ns)

1.04
(198ns)

Order 20

1.39
(286ns)

1.63
(336ns)

1.41
(291ns)

1.45
(298ns)

1.00
(206ns)

1.01
(208ns)

1.03
(213ns)

1.01
(209ns)


Table 23.8. Polynomial Method Comparison with Clang version 9.0.0 (tags/RELEASE_900/final) on linux

Function

Method 0
(Double Coefficients)

Method 0
(Integer Coefficients)

Method 1
(Double Coefficients)

Method 1
(Integer Coefficients)

Method 2
(Double Coefficients)

Method 2
(Integer Coefficients)

Method 3
(Double Coefficients)

Method 3
(Integer Coefficients)

Order 2

-

-

1.20
(6ns)

1.20
(6ns)

1.20
(6ns)

1.20
(6ns)

1.00
(5ns)

1.00
(5ns)

Order 3

2.00
(16ns)

3.00
(24ns)

1.12
(9ns)

1.12
(9ns)

1.12
(9ns)

1.25
(10ns)

1.00
(8ns)

1.00
(8ns)

Order 4

1.83
(22ns)

2.67
(32ns)

1.00
(12ns)

1.00
(12ns)

1.08
(13ns)

1.08
(13ns)

1.00
(12ns)

1.00
(12ns)

Order 5

1.12
(19ns)

1.71
(29ns)

1.00
(17ns)

1.00
(17ns)

1.06
(18ns)

1.12
(19ns)

1.00
(17ns)

1.00
(17ns)

Order 6

1.45
(29ns)

2.05
(41ns)

1.30
(26ns)

1.30
(26ns)

1.10
(22ns)

1.10
(22ns)

1.00
(20ns)

1.05
(21ns)

Order 7

1.15
(31ns)

2.22
(60ns)

1.22
(33ns)

1.22
(33ns)

1.07
(29ns)

1.07
(29ns)

1.00
(27ns)

1.00
(27ns)

Order 8

1.32
(37ns)

2.18
(61ns)

1.43
(40ns)

1.36
(38ns)

1.07
(30ns)

1.07
(30ns)

1.00
(28ns)

1.04
(29ns)

Order 9

1.17
(42ns)

1.72
(62ns)

1.36
(49ns)

1.36
(49ns)

1.06
(38ns)

1.14
(41ns)

1.00
(36ns)

1.00
(36ns)

Order 10

1.33
(48ns)

2.19
(79ns)

1.64
(59ns)

1.64
(59ns)

1.11
(40ns)

1.08
(39ns)

1.00
(36ns)

1.00
(36ns)

Order 11

1.32
(58ns)

2.02
(89ns)

1.66
(73ns)

1.68
(74ns)

1.09
(48ns)

1.05
(46ns)

1.05
(46ns)

1.00
(44ns)

Order 12

1.42
(64ns)

2.38
(107ns)

1.89
(85ns)

1.84
(83ns)

1.04
(47ns)

1.04
(47ns)

1.00
(45ns)

1.00
(45ns)

Order 13

1.51
(71ns)

2.21
(104ns)

1.79
(84ns)

1.83
(86ns)

1.06
(50ns)

1.11
(52ns)

1.00
(47ns)

1.00
(47ns)

Order 14

1.52
(79ns)

2.38
(124ns)

2.02
(105ns)

1.96
(102ns)

1.08
(56ns)

1.08
(56ns)

1.00
(52ns)

1.00
(52ns)

Order 15

1.25
(91ns)

1.92
(140ns)

1.56
(114ns)

1.60
(117ns)

1.07
(78ns)

1.11
(81ns)

1.01
(74ns)

1.00
(73ns)

Order 16

1.59
(100ns)

2.51
(158ns)

1.97
(124ns)

1.98
(125ns)

1.05
(66ns)

1.06
(67ns)

1.00
(63ns)

1.00
(63ns)

Order 17

1.29
(108ns)

1.90
(160ns)

1.36
(114ns)

4.58
(385ns)

1.15
(97ns)

2.05
(172ns)

1.00
(84ns)

1.63
(137ns)

Order 18

2.22
(120ns)

3.22
(174ns)

2.28
(123ns)

7.74
(418ns)

1.06
(57ns)

2.85
(154ns)

1.00
(54ns)

3.78
(204ns)

Order 19

2.28
(130ns)

3.28
(187ns)

2.42
(138ns)

7.74
(441ns)

1.07
(61ns)

3.58
(204ns)

1.00
(57ns)

2.67
(152ns)

Order 20

2.43
(146ns)

3.35
(201ns)

2.53
(152ns)

8.17
(490ns)

1.07
(64ns)

4.12
(247ns)

1.00
(60ns)

2.90
(174ns)


Table 23.9. Rational Method Comparison with Clang version 9.0.0 (tags/RELEASE_900/final) on linux

Function

Method 0
(Double Coefficients)

Method 0
(Integer Coefficients)

Method 1
(Double Coefficients)

Method 1
(Integer Coefficients)

Method 2
(Double Coefficients)

Method 2
(Integer Coefficients)

Method 3
(Double Coefficients)

Method 3
(Integer Coefficients)

Order 2

-

-

2.00
(24ns)

2.08
(25ns)

1.00
(12ns)

1.00
(12ns)

1.00
(12ns)

1.00
(12ns)

Order 3

1.58
(30ns)

1.89
(36ns)

1.47
(28ns)

1.53
(29ns)

1.00
(19ns)

1.00
(19ns)

1.00
(19ns)

1.58
(30ns)

Order 4

1.48
(37ns)

1.88
(47ns)

1.44
(36ns)

1.52
(38ns)

1.04
(26ns)

1.00
(25ns)

1.24
(31ns)

1.04
(26ns)

Order 5

1.00
(44ns)

1.32
(58ns)

1.11
(49ns)

2.16
(95ns)

1.18
(52ns)

1.98
(87ns)

1.25
(55ns)

2.00
(88ns)

Order 6

1.00
(53ns)

1.30
(69ns)

1.45
(77ns)

2.21
(117ns)

1.45
(77ns)

1.64
(87ns)

1.51
(80ns)

1.72
(91ns)

Order 7

1.00
(81ns)

1.36
(110ns)

1.10
(89ns)

1.78
(144ns)

1.09
(88ns)

1.26
(102ns)

1.04
(84ns)

1.25
(101ns)

Order 8

1.01
(88ns)

1.32
(115ns)

1.15
(100ns)

1.90
(165ns)

1.11
(97ns)

1.25
(109ns)

1.00
(87ns)

1.22
(106ns)

Order 9

1.00
(91ns)

1.37
(125ns)

1.30
(118ns)

2.08
(189ns)

1.15
(105ns)

1.31
(119ns)

1.01
(92ns)

1.21
(110ns)

Order 10

1.00
(94ns)

1.30
(122ns)

1.39
(131ns)

2.29
(215ns)

1.20
(113ns)

1.44
(135ns)

1.05
(99ns)

1.23
(116ns)

Order 11

1.03
(108ns)

1.35
(142ns)

1.44
(151ns)

2.25
(236ns)

1.23
(129ns)

1.40
(147ns)

1.00
(105ns)

1.24
(130ns)

Order 12

1.03
(120ns)

1.33
(154ns)

1.46
(169ns)

2.27
(263ns)

1.16
(134ns)

1.39
(161ns)

1.00
(116ns)

1.27
(147ns)

Order 13

1.07
(129ns)

1.54
(186ns)

1.49
(180ns)

2.41
(292ns)

1.24
(150ns)

1.45
(176ns)

1.00
(121ns)

1.40
(170ns)

Order 14

1.00
(139ns)

1.32
(183ns)

1.48
(206ns)

2.22
(308ns)

1.26
(175ns)

1.37
(191ns)

1.01
(140ns)

1.16
(161ns)

Order 15

1.04
(147ns)

1.45
(206ns)

1.61
(229ns)

2.39
(340ns)

1.20
(171ns)

1.41
(200ns)

1.00
(142ns)

1.18
(167ns)

Order 16

1.03
(157ns)

1.40
(214ns)

1.52
(233ns)

2.33
(357ns)

1.21
(185ns)

1.49
(228ns)

1.00
(153ns)

1.18
(180ns)

Order 17

1.02
(179ns)

1.25
(218ns)

1.45
(253ns)

2.17
(380ns)

1.16
(203ns)

1.36
(238ns)

1.00
(175ns)

1.10
(192ns)

Order 18

1.21
(201ns)

1.40
(232ns)

1.64
(272ns)

2.42
(402ns)

1.24
(206ns)

1.60
(266ns)

1.00
(166ns)

1.20
(200ns)

Order 19

1.24
(211ns)

1.48
(252ns)

1.74
(295ns)

2.49
(423ns)

1.41
(240ns)

1.59
(271ns)

1.00
(170ns)

1.21
(205ns)

Order 20

1.27
(223ns)

1.67
(294ns)

1.86
(327ns)

2.70
(475ns)

1.34
(235ns)

1.56
(274ns)

1.00
(176ns)

1.21
(213ns)


Table 23.10. Polynomial Method Comparison with Intel C++ C++0x mode version 1910 on linux

Function

Method 0
(Double Coefficients)

Method 0
(Integer Coefficients)

Method 1
(Double Coefficients)

Method 1
(Integer Coefficients)

Method 2
(Double Coefficients)

Method 2
(Integer Coefficients)

Method 3
(Double Coefficients)

Method 3
(Integer Coefficients)

Order 2

-

-

1.00
(3ns)

1.00
(3ns)

1.33
(4ns)

1.33
(4ns)

1.33
(4ns)

1.00
(3ns)

Order 3

1.75
(14ns)

2.12
(17ns)

1.00
(8ns)

1.00
(8ns)

1.00
(8ns)

1.00
(8ns)

1.00
(8ns)

1.00
(8ns)

Order 4

1.64
(18ns)

2.18
(24ns)

1.09
(12ns)

1.18
(13ns)

1.00
(11ns)

1.00
(11ns)

1.00
(11ns)

1.00
(11ns)

Order 5

1.60
(24ns)

2.13
(32ns)

1.00
(15ns)

1.00
(15ns)

1.07
(16ns)

1.27
(19ns)

1.00
(15ns)

1.07
(16ns)

Order 6

1.88
(30ns)

2.56
(41ns)

1.00
(16ns)

1.00
(16ns)

1.44
(23ns)

1.31
(21ns)

1.25
(20ns)

1.25
(20ns)

Order 7

2.00
(36ns)

2.67
(48ns)

1.06
(19ns)

1.00
(18ns)

1.33
(24ns)

1.44
(26ns)

1.28
(23ns)

1.28
(23ns)

Order 8

1.86
(41ns)

2.55
(56ns)

1.00
(22ns)

1.00
(22ns)

1.32
(29ns)

1.27
(28ns)

1.18
(26ns)

1.18
(26ns)

Order 9

1.85
(48ns)

2.46
(64ns)

1.00
(26ns)

1.00
(26ns)

1.27
(33ns)

1.31
(34ns)

1.15
(30ns)

1.15
(30ns)

Order 10

1.69
(54ns)

2.28
(73ns)

1.00
(32ns)

1.00
(32ns)

1.22
(39ns)

1.19
(38ns)

1.06
(34ns)

1.09
(35ns)

Order 11

1.77
(62ns)

2.29
(80ns)

1.00
(35ns)

1.00
(35ns)

1.26
(44ns)

1.49
(52ns)

1.06
(37ns)

1.09
(38ns)

Order 12

1.77
(71ns)

2.20
(88ns)

1.05
(42ns)

1.00
(40ns)

1.35
(54ns)

1.32
(53ns)

1.35
(54ns)

1.48
(59ns)

Order 13

1.81
(76ns)

2.33
(98ns)

1.02
(43ns)

1.00
(42ns)

1.36
(57ns)

1.24
(52ns)

1.57
(66ns)

1.36
(57ns)

Order 14

1.98
(85ns)

2.47
(106ns)

1.00
(43ns)

1.00
(43ns)

1.33
(57ns)

1.30
(56ns)

1.35
(58ns)

1.16
(50ns)

Order 15

2.26
(95ns)

2.67
(112ns)

1.05
(44ns)

1.00
(42ns)

1.14
(48ns)

1.17
(49ns)

1.19
(50ns)

1.12
(47ns)

Order 16

2.31
(97ns)

2.86
(120ns)

1.00
(42ns)

1.02
(43ns)

1.12
(47ns)

1.12
(47ns)

1.33
(56ns)

1.69
(71ns)

Order 17

2.39
(105ns)

2.93
(129ns)

1.00
(44ns)

1.02
(45ns)

1.34
(59ns)

1.11
(49ns)

1.23
(54ns)

1.02
(45ns)

Order 18

2.63
(113ns)

3.19
(137ns)

1.00
(43ns)

1.00
(43ns)

1.14
(49ns)

1.14
(49ns)

1.37
(59ns)

1.14
(49ns)

Order 19

2.93
(123ns)

3.50
(147ns)

1.02
(43ns)

1.00
(42ns)

1.12
(47ns)

1.10
(46ns)

1.10
(46ns)

1.10
(46ns)

Order 20

3.28
(141ns)

3.60
(155ns)

1.00
(43ns)

1.02
(44ns)

1.09
(47ns)

1.14
(49ns)

1.07
(46ns)

1.05
(45ns)


Table 23.11. Rational Method Comparison with Intel C++ C++0x mode version 1910 on linux

Function

Method 0
(Double Coefficients)

Method 0
(Integer Coefficients)

Method 1
(Double Coefficients)

Method 1
(Integer Coefficients)

Method 2
(Double Coefficients)

Method 2
(Integer Coefficients)

Method 3
(Double Coefficients)

Method 3
(Integer Coefficients)

Order 2

-

-

2.17
(26ns)

2.00
(24ns)

1.08
(13ns)

1.08
(13ns)

1.00
(12ns)

1.00
(12ns)

Order 3

2.88
(49ns)

3.18
(54ns)

1.59
(27ns)

1.41
(24ns)

1.00
(17ns)

1.00
(17ns)

1.00
(17ns)

1.00
(17ns)

Order 4

4.00
(68ns)

4.35
(74ns)

1.88
(32ns)

1.88
(32ns)

1.06
(18ns)

1.06
(18ns)

1.00
(17ns)

1.00
(17ns)

Order 5

2.15
(86ns)

2.25
(90ns)

1.00
(40ns)

1.00
(40ns)

1.20
(48ns)

1.23
(49ns)

1.05
(42ns)

1.07
(43ns)

Order 6

2.16
(106ns)

2.20
(108ns)

1.04
(51ns)

1.00
(49ns)

1.08
(53ns)

1.08
(53ns)

1.06
(52ns)

1.24
(61ns)

Order 7

2.14
(126ns)

2.20
(130ns)

1.02
(60ns)

1.00
(59ns)

1.02
(60ns)

1.02
(60ns)

1.07
(63ns)

1.02
(60ns)

Order 8

2.43
(170ns)

2.11
(148ns)

1.03
(72ns)

1.01
(71ns)

1.00
(70ns)

1.00
(70ns)

1.00
(70ns)

1.53
(107ns)

Order 9

2.06
(165ns)

2.12
(170ns)

1.14
(91ns)

1.15
(92ns)

1.02
(82ns)

1.00
(80ns)

1.01
(81ns)

1.44
(115ns)

Order 10

2.22
(189ns)

2.26
(192ns)

1.13
(96ns)

1.12
(95ns)

1.01
(86ns)

1.04
(88ns)

1.00
(85ns)

1.47
(125ns)

Order 11

2.15
(209ns)

2.15
(209ns)

1.12
(109ns)

1.20
(116ns)

1.00
(97ns)

1.01
(98ns)

1.46
(142ns)

1.42
(138ns)

Order 12

2.10
(227ns)

2.17
(234ns)

1.19
(128ns)

1.13
(122ns)

1.01
(109ns)

1.00
(108ns)

1.31
(141ns)

1.37
(148ns)

Order 13

2.73
(246ns)

2.78
(250ns)

1.18
(106ns)

1.17
(105ns)

1.01
(91ns)

1.00
(90ns)

1.66
(149ns)

1.80
(162ns)

Order 14

2.92
(266ns)

3.03
(276ns)

1.18
(107ns)

2.89
(263ns)

1.00
(91ns)

1.04
(95ns)

1.78
(162ns)

2.15
(196ns)

Order 15

2.97
(288ns)

2.97
(288ns)

1.11
(108ns)

2.98
(289ns)

1.00
(97ns)

2.38
(231ns)

1.79
(174ns)

1.82
(177ns)

Order 16

3.17
(314ns)

3.15
(312ns)

1.13
(112ns)

3.35
(332ns)

1.00
(99ns)

2.53
(250ns)

1.89
(187ns)

1.94
(192ns)

Order 17

2.99
(326ns)

3.11
(339ns)

1.11
(121ns)

3.31
(361ns)

1.00
(109ns)

2.42
(264ns)

1.81
(197ns)

1.83
(200ns)

Order 18

3.43
(350ns)

3.52
(359ns)

1.21
(123ns)

3.94
(402ns)

1.00
(102ns)

2.86
(292ns)

1.98
(202ns)

2.08
(212ns)

Order 19

3.51
(379ns)

3.43
(370ns)

1.16
(125ns)

3.97
(429ns)

1.00
(108ns)

3.01
(325ns)

1.94
(209ns)

2.17
(234ns)

Order 20

3.69
(421ns)

4.34
(495ns)

1.18
(134ns)

4.31
(491ns)

1.00
(114ns)

3.08
(351ns)

1.96
(224ns)

2.06
(235ns)



PrevUpHomeNext