Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Comparing Different Compilers

By running our performance test suite multiple times, we can compare the effect of different compilers: as might be expected, the differences are generally small compared to say disabling internal use of long double. However, there are still gains to be main, particularly from some of the commercial offerings:

Table 22.12. Compiler Comparison on Windows x64

Function

Microsoft Visual C++ version 14.2
boost 1.73

GNU C++ version 9.2.0
boost 1.73

GNU C++ version 9.2.0
boost 1.73
promote_double<false>

assoc_laguerre

1.41
(179ns)

1.08
(137ns)

1.00
(127ns)

assoc_legendre

1.76
(248ns)

1.36
(192ns)

1.00
(141ns)

beta

1.00
(123ns)

2.62
(322ns)

1.93
(237ns)

beta (incomplete)

1.00
(470ns)

2.95
(1385ns)

1.58
(741ns)

cbrt

3.40
(51ns)

4.67
(70ns)

1.00
(15ns)

cyl_bessel_i

1.00
(281ns)

3.38
(949ns)

1.38
(387ns)

cyl_bessel_i (integer order)

1.00
(195ns)

3.06
(597ns)

1.00
(195ns)

cyl_bessel_j

1.00
(371ns)

2.39
(886ns)

1.35
(499ns)

cyl_bessel_j (integer order)

1.28
(123ns)

1.92
(184ns)

1.00
(96ns)

cyl_bessel_k

1.11
(385ns)

19.68
(6847ns)

1.00
(348ns)

cyl_bessel_k (integer order)

1.06
(217ns)

18.17
(3724ns)

1.00
(205ns)

cyl_neumann

1.17
(6696ns)

1.76
(10032ns)

1.00
(5715ns)

cyl_neumann (integer order)

1.00
(158ns)

2.20
(348ns)

1.59
(252ns)

digamma

1.00
(20ns)

3.45
(69ns)

2.30
(46ns)

ellint_1

1.57
(390ns)

1.41
(349ns)

1.00
(248ns)

ellint_1 (complete)

1.64
(77ns)

1.64
(77ns)

1.00
(47ns)

ellint_2

1.81
(702ns)

1.50
(583ns)

1.00
(388ns)

ellint_2 (complete)

3.11
(84ns)

2.11
(57ns)

1.00
(27ns)

ellint_3

3.47
(1381ns)

1.68
(670ns)

1.00
(398ns)

ellint_3 (complete)

inf
(802ns)

-nan(ind)
(0ns)

-nan(ind)
(0ns)

ellint_rc

1.55
(59ns)

2.21
(84ns)

1.00
(38ns)

ellint_rd

1.32
(271ns)

1.26
(260ns)

1.00
(206ns)

ellint_rf

1.27
(62ns)

1.94
(95ns)

1.00
(49ns)

ellint_rj

1.46
(264ns)

2.29
(414ns)

1.00
(181ns)

erf

1.30
(43ns)

1.85
(61ns)

1.00
(33ns)

erfc

1.06
(54ns)

1.76
(90ns)

1.00
(51ns)

expint

1.00
(27ns)

3.41
(92ns)

2.22
(60ns)

expint (En)

1.00
(106ns)

1.94
(206ns)

1.29
(137ns)

expm1

1.00
(11ns)

3.00
(33ns)

2.36
(26ns)

gamma_p

1.00
(303ns)

2.00
(605ns)

1.17
(355ns)

gamma_p_inv

1.00
(1266ns)

1.85
(2341ns)

1.15
(1460ns)

gamma_q

1.00
(294ns)

2.10
(618ns)

1.21
(356ns)

gamma_q_inv

1.00
(1194ns)

1.66
(1987ns)

1.14
(1357ns)

ibeta

1.00
(512ns)

2.63
(1344ns)

1.31
(673ns)

ibeta_inv

1.00
(1910ns)

2.49
(4751ns)

1.48
(2822ns)

ibetac

1.00
(525ns)

2.60
(1365ns)

1.27
(668ns)

ibetac_inv

1.00
(1676ns)

2.85
(4778ns)

1.74
(2910ns)

jacobi_cn

1.00
(181ns)

3.10
(561ns)

2.00
(362ns)

jacobi_dn

1.00
(203ns)

3.03
(616ns)

1.93
(392ns)

jacobi_sn

1.00
(202ns)

2.81
(568ns)

1.73
(350ns)

laguerre

1.02
(107ns)

1.07
(112ns)

1.00
(105ns)

legendre

1.11
(283ns)

1.25
(320ns)

1.00
(255ns)

legendre Q

1.00
(309ns)

1.51
(466ns)

1.15
(354ns)

lgamma

1.00
(80ns)

2.67
(214ns)

2.00
(160ns)

log1p

1.00
(14ns)

2.07
(29ns)

1.21
(17ns)

polygamma

1.00
(4193ns)

1.85
(7743ns)

1.91
(8018ns)

sph_bessel

1.01
(668ns)

1.48
(975ns)

1.00
(661ns)

sph_neumann

1.07
(1138ns)

2.96
(3153ns)

1.00
(1064ns)

tgamma

1.00
(74ns)

3.50
(259ns)

2.14
(158ns)

tgamma (incomplete)

1.00
(208ns)

2.30
(478ns)

1.64
(342ns)

trigamma

1.00
(12ns)

2.83
(34ns)

1.17
(14ns)

zeta

1.00
(117ns)

2.65
(310ns)

1.89
(221ns)


Table 22.13. Compiler Comparison on linux

Function

GNU C++ version 9.2.1 20191008
boost 1.73

GNU C++ version 9.2.1 20191008
boost 1.73
promote_double<false>

Clang version 9.0.0 (tags/RELEASE_900/final)
boost 1.73

Clang version 9.0.0 (tags/RELEASE_900/final)
boost 1.73
promote_double<false>

Intel C++ C++0x mode version 1910
boost 1.73

Intel C++ C++0x mode version 1910
boost 1.73
promote_double<false>

assoc_laguerre

1.17
(156ns)

1.08
(143ns)

1.72
(229ns)

1.31
(174ns)

1.15
(153ns)

1.00
(133ns)

assoc_legendre

2.91
(279ns)

1.78
(171ns)

2.86
(275ns)

1.00
(96ns)

2.79
(268ns)

2.16
(207ns)

beta

10.52
(789ns)

1.40
(105ns)

10.56
(792ns)

1.73
(130ns)

6.07
(455ns)

1.00
(75ns)

beta (incomplete)

4.98
(2076ns)

1.26
(524ns)

5.44
(2267ns)

1.00
(417ns)

3.15
(1315ns)

1.16
(484ns)

cbrt

2.52
(58ns)

1.09
(25ns)

2.35
(54ns)

1.22
(28ns)

1.91
(44ns)

1.00
(23ns)

cyl_bessel_i

5.05
(1182ns)

1.02
(239ns)

10.73
(2511ns)

1.74
(406ns)

3.99
(933ns)

1.00
(234ns)

cyl_bessel_i (integer order)

4.41
(767ns)

1.00
(174ns)

5.09
(886ns)

1.03
(179ns)

3.63
(631ns)

1.12
(195ns)

cyl_bessel_j

3.80
(1067ns)

1.28
(359ns)

4.72
(1327ns)

1.55
(436ns)

3.05
(857ns)

1.00
(281ns)

cyl_bessel_j (integer order)

3.10
(319ns)

1.05
(108ns)

4.73
(487ns)

1.00
(103ns)

2.30
(237ns)

1.12
(115ns)

cyl_bessel_k

10.37
(3962ns)

1.00
(382ns)

11.55
(4414ns)

1.52
(582ns)

12.41
(4739ns)

1.09
(416ns)

cyl_bessel_k (integer order)

19.23
(3289ns)

1.06
(181ns)

19.78
(3382ns)

1.27
(217ns)

20.02
(3423ns)

1.00
(171ns)

cyl_neumann

2.18
(8826ns)

1.19
(4814ns)

3.23
(13059ns)

1.31
(5275ns)

2.35
(9503ns)

1.00
(4041ns)

cyl_neumann (integer order)

3.67
(466ns)

1.35
(172ns)

4.49
(570ns)

1.15
(146ns)

2.87
(364ns)

1.00
(127ns)

digamma

2.30
(62ns)

1.30
(35ns)

3.11
(84ns)

1.33
(36ns)

1.85
(50ns)

1.00
(27ns)

ellint_1

2.26
(310ns)

1.12
(154ns)

6.96
(954ns)

1.25
(171ns)

3.22
(441ns)

1.00
(137ns)

ellint_1 (complete)

4.65
(93ns)

3.15
(63ns)

6.00
(120ns)

1.15
(23ns)

1.90
(38ns)

1.00
(20ns)

ellint_2

3.81
(704ns)

1.28
(236ns)

8.95
(1655ns)

1.36
(251ns)

4.36
(807ns)

1.00
(185ns)

ellint_2 (complete)

1.83
(44ns)

1.04
(25ns)

6.25
(150ns)

1.25
(30ns)

2.00
(48ns)

1.00
(24ns)

ellint_3

3.27
(609ns)

1.17
(217ns)

5.37
(998ns)

1.32
(245ns)

2.84
(528ns)

1.00
(186ns)

ellint_3 (complete)

-nan
(0ns)

-nan
(0ns)

-nan
(0ns)

-nan
(0ns)

-nan
(0ns)

-nan
(0ns)

ellint_rc

2.75
(66ns)

1.29
(31ns)

4.71
(113ns)

1.42
(34ns)

1.83
(44ns)

1.00
(24ns)

ellint_rd

4.37
(428ns)

1.31
(128ns)

9.24
(906ns)

1.31
(128ns)

4.17
(409ns)

1.00
(98ns)

ellint_rf

2.47
(84ns)

1.44
(49ns)

4.62
(157ns)

1.32
(45ns)

1.85
(63ns)

1.00
(34ns)

ellint_rj

4.14
(426ns)

1.36
(140ns)

7.18
(740ns)

1.31
(135ns)

3.33
(343ns)

1.00
(103ns)

erf

1.69
(54ns)

1.28
(41ns)

2.56
(82ns)

1.38
(44ns)

1.34
(43ns)

1.00
(32ns)

erfc

1.65
(89ns)

1.20
(65ns)

2.46
(133ns)

1.26
(68ns)

1.22
(66ns)

1.00
(54ns)

expint

2.93
(85ns)

1.45
(42ns)

2.90
(84ns)

1.31
(38ns)

2.21
(64ns)

1.00
(29ns)

expint (En)

2.42
(242ns)

1.14
(114ns)

2.76
(276ns)

1.19
(119ns)

1.84
(184ns)

1.00
(100ns)

expm1

1.90
(19ns)

1.60
(16ns)

1.50
(15ns)

1.40
(14ns)

1.80
(18ns)

1.00
(10ns)

gamma_p

2.43
(618ns)

1.02
(260ns)

2.95
(749ns)

1.00
(254ns)

2.15
(545ns)

1.03
(262ns)

gamma_p_inv

2.37
(2328ns)

1.06
(1038ns)

2.73
(2676ns)

1.06
(1045ns)

1.92
(1883ns)

1.00
(982ns)

gamma_q

2.49
(629ns)

1.00
(253ns)

3.28
(831ns)

1.11
(280ns)

2.18
(551ns)

1.04
(263ns)

gamma_q_inv

2.73
(2016ns)

1.30
(958ns)

3.22
(2381ns)

1.30
(962ns)

1.73
(1275ns)

1.00
(739ns)

ibeta

4.56
(1979ns)

1.21
(524ns)

4.60
(1996ns)

1.00
(434ns)

3.35
(1453ns)

1.13
(491ns)

ibeta_inv

3.22
(5552ns)

1.10
(1902ns)

3.49
(6013ns)

1.03
(1781ns)

2.58
(4437ns)

1.00
(1722ns)

ibetac

4.34
(2008ns)

1.27
(590ns)

4.34
(2008ns)

1.00
(463ns)

3.11
(1438ns)

1.17
(543ns)

ibetac_inv

3.32
(5533ns)

1.11
(1853ns)

3.55
(5915ns)

1.03
(1722ns)

2.48
(4131ns)

1.00
(1666ns)

jacobi_cn

3.74
(483ns)

1.26
(163ns)

4.98
(643ns)

1.61
(208ns)

2.67
(345ns)

1.00
(129ns)

jacobi_dn

3.64
(503ns)

1.25
(173ns)

4.70
(648ns)

1.49
(206ns)

2.72
(375ns)

1.00
(138ns)

jacobi_sn

4.99
(614ns)

1.46
(180ns)

5.20
(640ns)

1.72
(212ns)

2.57
(316ns)

1.00
(123ns)

laguerre

1.11
(92ns)

1.08
(90ns)

1.41
(117ns)

1.11
(92ns)

1.17
(97ns)

1.00
(83ns)

legendre

1.12
(282ns)

1.00
(251ns)

1.21
(304ns)

1.30
(326ns)

1.39
(349ns)

1.08
(270ns)

legendre Q

1.24
(390ns)

1.00
(314ns)

1.29
(404ns)

1.14
(358ns)

1.42
(445ns)

1.11
(347ns)

lgamma

2.65
(265ns)

1.17
(117ns)

3.86
(386ns)

1.24
(124ns)

1.90
(190ns)

1.00
(100ns)

log1p

1.11
(20ns)

1.22
(22ns)

1.06
(19ns)

1.00
(18ns)

1.06
(19ns)

1.00
(18ns)

polygamma

16.70
(8883ns)

1.42
(756ns)

6.56
(3491ns)

1.00
(532ns)

7.49
(3985ns)

1.05
(559ns)

sph_bessel

2.36
(1122ns)

1.24
(588ns)

3.31
(1574ns)

1.41
(673ns)

2.12
(1010ns)

1.00
(476ns)

sph_neumann

3.40
(2842ns)

1.21
(1015ns)

3.59
(3009ns)

1.21
(1012ns)

3.14
(2627ns)

1.00
(837ns)

tgamma

4.72
(472ns)

1.44
(144ns)

5.70
(570ns)

1.05
(105ns)

2.29
(229ns)

1.00
(100ns)

tgamma (incomplete)

3.28
(669ns)

1.13
(231ns)

3.88
(792ns)

1.14
(232ns)

2.21
(451ns)

1.00
(204ns)

trigamma

2.08
(25ns)

1.00
(12ns)

4.00
(48ns)

1.50
(18ns)

2.00
(24ns)

1.08
(13ns)

zeta

4.21
(455ns)

1.00
(108ns)

5.77
(623ns)

1.20
(130ns)

2.98
(322ns)

1.08
(117ns)



PrevUpHomeNext