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 20.5. Compiler Comparison on Windows x64

Function

Microsoft Visual C++ version 14.0
boost 1.61

GNU C++ version 5.3.0
boost 1.61

GNU C++ version 5.3.0
boost 1.61
promote_double<false>

Intel C++ C++0x mode version 1600
boost 1.61

assoc_laguerre

1.16
(208ns)

1.21
(217ns)

1.06
(190ns)

1.00
(180ns)

assoc_legendre

1.57
(151ns)

1.80
(173ns)

1.16
(111ns)

1.00
(96ns)

beta

1.74
(176ns)

3.78
(382ns)

2.17
(219ns)

1.00
(101ns)

beta (incomplete)

1.44
(520ns)

3.03
(1096ns)

1.84
(666ns)

1.00
(362ns)

cbrt

3.21
(45ns)

3.43
(48ns)

3.07
(43ns)

1.00
(14ns)

cyl_bessel_i

1.11
(404ns)

2.78
(1016ns)

1.21
(442ns)

1.00
(365ns)

cyl_bessel_i (integer order)

1.29
(261ns)

3.16
(638ns)

1.22
(247ns)

1.00
(202ns)

cyl_bessel_j

1.19
(488ns)

2.06
(841ns)

1.25
(513ns)

1.00
(409ns)

cyl_bessel_j (integer order)

1.36
(103ns)

2.39
(182ns)

1.47
(112ns)

1.00
(76ns)

cyl_bessel_k

1.04
(747ns)

9.43
(6743ns)

1.03
(734ns)

1.00
(715ns)

cyl_bessel_k (integer order)

1.26
(419ns)

10.49
(3494ns)

1.10
(367ns)

1.00
(333ns)

cyl_neumann

16.76
(11212ns)

2.01
(1346ns)

1.00
(669ns)

15.35
(10266ns)

cyl_neumann (integer order)

1.00
(225ns)

1.79
(403ns)

1.24
(279ns)

1.02
(229ns)

digamma

1.20
(24ns)

3.75
(75ns)

2.15
(43ns)

1.00
(20ns)

ellint_1

1.87
(329ns)

1.99
(350ns)

1.32
(232ns)

1.00
(176ns)

ellint_1 (complete)

2.18
(61ns)

2.57
(72ns)

1.57
(44ns)

1.00
(28ns)

ellint_2

1.78
(525ns)

2.17
(640ns)

1.52
(449ns)

1.00
(295ns)

ellint_2 (complete)

2.14
(62ns)

2.07
(60ns)

1.24
(36ns)

1.00
(29ns)

ellint_3

1.94
(1155ns)

2.91
(1733ns)

1.65
(986ns)

1.00
(596ns)

ellint_3 (complete)

2.05
(721ns)

3.07
(1079ns)

1.46
(514ns)

1.00
(352ns)

ellint_rc

1.58
(49ns)

2.68
(83ns)

1.55
(48ns)

1.00
(31ns)

ellint_rd

1.75
(332ns)

1.83
(348ns)

1.40
(266ns)

1.00
(190ns)

ellint_rf

1.69
(71ns)

2.40
(101ns)

1.57
(66ns)

1.00
(42ns)

ellint_rj

1.91
(344ns)

2.96
(532ns)

1.43
(257ns)

1.00
(180ns)

erf

1.77
(23ns)

2.92
(38ns)

1.92
(25ns)

1.00
(13ns)

erfc

1.29
(22ns)

3.41
(58ns)

2.06
(35ns)

1.00
(17ns)

expint

1.39
(39ns)

3.07
(86ns)

2.14
(60ns)

1.00
(28ns)

expint (En)

1.10
(117ns)

2.19
(232ns)

1.38
(146ns)

1.00
(106ns)

expm1

1.00
(10ns)

3.10
(31ns)

2.40
(24ns)

1.10
(11ns)

gamma_p

1.29
(192ns)

2.64
(393ns)

1.71
(255ns)

1.00
(149ns)

gamma_p_inv

1.36
(706ns)

2.47
(1288ns)

1.91
(997ns)

1.00
(521ns)

gamma_q

1.16
(179ns)

2.79
(429ns)

1.61
(248ns)

1.00
(154ns)

gamma_q_inv

1.37
(703ns)

2.38
(1225ns)

1.89
(971ns)

1.00
(515ns)

ibeta

1.34
(520ns)

3.13
(1218ns)

1.83
(711ns)

1.00
(389ns)

ibeta_inv

1.51
(2193ns)

2.81
(4085ns)

2.27
(3303ns)

1.00
(1452ns)

ibetac

1.29
(518ns)

2.94
(1179ns)

1.73
(694ns)

1.00
(401ns)

ibetac_inv

1.41
(2045ns)

2.80
(4058ns)

1.78
(2572ns)

1.00
(1447ns)

jacobi_cn

1.36
(182ns)

3.72
(499ns)

2.28
(306ns)

1.00
(134ns)

jacobi_dn

1.82
(262ns)

3.68
(530ns)

2.27
(327ns)

1.00
(144ns)

jacobi_sn

1.31
(179ns)

3.73
(511ns)

2.43
(333ns)

1.00
(137ns)

laguerre

1.00
(121ns)

1.15
(139ns)

1.04
(126ns)

1.10
(133ns)

legendre

1.07
(364ns)

1.16
(396ns)

1.00
(340ns)

1.13
(383ns)

legendre Q

1.00
(427ns)

1.20
(512ns)

1.01
(430ns)

1.07
(455ns)

lgamma

1.00
(73ns)

3.07
(224ns)

1.82
(133ns)

1.05
(77ns)

log1p

1.00
(14ns)

2.00
(28ns)

1.14
(16ns)

1.00
(14ns)

polygamma

1.16
(3773ns)

1.02
(3320ns)

2.24
(7270ns)

1.00
(3246ns)

sph_bessel

1.17
(1005ns)

1.55
(1325ns)

1.09
(931ns)

1.00
(857ns)

sph_neumann

1.08
(1827ns)

2.07
(3483ns)

1.00
(1685ns)

1.01
(1702ns)

tgamma

1.31
(77ns)

4.03
(238ns)

2.49
(147ns)

1.00
(59ns)

tgamma (incomplete)

1.26
(276ns)

2.52
(552ns)

1.73
(379ns)

1.00
(219ns)

trigamma

1.35
(23ns)

2.88
(49ns)

1.41
(24ns)

1.00
(17ns)

zeta

1.34
(121ns)

3.83
(345ns)

2.52
(227ns)

1.00
(90ns)


Table 20.6. Compiler Comparison on linux

Function

GNU C++ version 5.3.0
boost 1.61

GNU C++ version 5.3.0
boost 1.61
promote_double<false>

assoc_laguerre

1.36
(263ns)

1.00
(194ns)

assoc_legendre

2.55
(258ns)

1.00
(101ns)

beta

4.71
(734ns)

1.00
(156ns)

beta (incomplete)

3.12
(1796ns)

1.00
(575ns)

cbrt

2.53
(43ns)

1.00
(17ns)

cyl_bessel_i

3.47
(1410ns)

1.00
(406ns)

cyl_bessel_i (integer order)

3.38
(893ns)

1.00
(264ns)

cyl_bessel_j

2.69
(1071ns)

1.00
(398ns)

cyl_bessel_j (integer order)

2.59
(275ns)

1.00
(106ns)

cyl_bessel_k

6.86
(4589ns)

1.00
(669ns)

cyl_bessel_k (integer order)

10.17
(3673ns)

1.00
(361ns)

cyl_neumann

2.48
(1478ns)

1.00
(597ns)

cyl_neumann (integer order)

2.20
(484ns)

1.00
(220ns)

digamma

1.92
(75ns)

1.00
(39ns)

ellint_1

1.94
(358ns)

1.00
(185ns)

ellint_1 (complete)

1.86
(52ns)

1.00
(28ns)

ellint_2

2.32
(805ns)

1.00
(347ns)

ellint_2 (complete)

1.71
(60ns)

1.00
(35ns)

ellint_3

2.75
(2154ns)

1.00
(783ns)

ellint_3 (complete)

2.23
(1172ns)

1.00
(525ns)

ellint_rc

1.57
(77ns)

1.00
(49ns)

ellint_rd

2.23
(520ns)

1.00
(233ns)

ellint_rf

1.51
(95ns)

1.00
(63ns)

ellint_rj

2.33
(481ns)

1.00
(206ns)

erf

2.60
(39ns)

1.00
(15ns)

erfc

2.68
(59ns)

1.00
(22ns)

expint

2.47
(94ns)

1.00
(38ns)

expint (En)

1.86
(273ns)

1.00
(147ns)

expm1

1.00
(10ns)

1.10
(11ns)

gamma_p

2.42
(492ns)

1.00
(203ns)

gamma_p_inv

2.24
(1577ns)

1.00
(704ns)

gamma_q

2.53
(508ns)

1.00
(201ns)

gamma_q_inv

2.45
(1841ns)

1.00
(751ns)

ibeta

2.71
(1715ns)

1.00
(634ns)

ibeta_inv

2.58
(5742ns)

1.00
(2224ns)

ibetac

2.66
(1736ns)

1.00
(653ns)

ibetac_inv

2.44
(5451ns)

1.00
(2237ns)

jacobi_cn

2.77
(476ns)

1.00
(172ns)

jacobi_dn

2.80
(481ns)

1.00
(172ns)

jacobi_sn

2.86
(492ns)

1.00
(172ns)

laguerre

1.09
(139ns)

1.00
(128ns)

legendre

1.16
(399ns)

1.00
(345ns)

legendre Q

1.18
(496ns)

1.00
(422ns)

lgamma

2.20
(257ns)

1.00
(117ns)

log1p

1.00
(12ns)

1.00
(12ns)

polygamma

3.93
(2885ns)

1.00
(734ns)

sph_bessel

1.71
(1563ns)

1.00
(915ns)

sph_neumann

2.15
(3745ns)

1.00
(1744ns)

tgamma

3.69
(354ns)

1.00
(96ns)

tgamma (incomplete)

2.35
(744ns)

1.00
(316ns)

trigamma

1.64
(36ns)

1.00
(22ns)

zeta

2.71
(509ns)

1.00
(188ns)



PrevUpHomeNext