Compiler tests

Some tests are performed on many different processors from 8086 to Haswell Refresh. Different compilers are used.

Results depends on disk drive prefomance, environment (operating system, disk drive cache etc). Time measurement method (small program that print system clock counter value are used) and program startup time also may distort results. Some results may seems strange, for example on Am386SX disk drive cache reduce performance of program that not work with disk drive!

To increase accuracy on all modern and some old PC's tests are repeated ten or hundred times.

Toshiba T1000SE Toshiba T1000SE laptop - most oldest PC used in tests. It based on OKI M80C86A-2 (Intel 8086) 9.54MHz CPU and it's frequency may be reduced to 4.77MHz. Advanced PC Tools 5.0 program reports speed 2.55/1.25 of original IBM PC. 1Mb RAM (640Kb conventional RAM and 384Kb RAM disk). 3.5 inch floppy (broken) and 9 inch 640*400 monochrome CGA panel. MS DOS 3.30 in ROM. Produced in 1990. Because floppy is broken second PC used to transfer test programs and data to laptop RAM disk.

This laptop may be used for text processing, programming and playing old DOS games. But using of interpreted programs are problem. For example compilation of Pascal-S on it's own virtual machine requires about fifty minutes! Microsoft GW-Basic more slower.

Used compilers:

Abbr Name Comment
050 Context.pas First version of Context (1994) partially incompatible with later versions
101 Context 1.01 Minimum version of Context for DOS
130 Context 1.30 Context 1.20 with minor jump optimization
140 Context 1.40 Direct translation of Context 1.30 to Win32
201 Context 2.01 Minimum version of Context 2.0 for Win32 (Host-DOS/Target-Win32)
202 Context 2.02 Minimum version of Context 2.0 for Win32 (Host-Win32/Target-Win32)
205 Context 2.05 Context 2.02 with integer datatype
212 Context 2.12 Context 2.05 with more complex code generator
213 Context 2.13 Context 2.05 with optimizing code generator (pre-beta)
TP1 Turbo Pascal 1.00A  
TP3 Turbo Pascal 3.02A  
BP7 Borland Pascal 7.0  
BC3 Borland C++ 3.1  
BC5 Borland C++ 5.5  
VC4 Microsoft Visual C++ 4.2  

Compilation

Compilation of Context.103/Context.pas to com/exe with different compilers, seconds:

CPU\Compiler   101 130 TP1 TP3 BP7
Core i5-4690S/3200 0.217 0.012 0.009 n/a n/a 0.008
Core i3-2100/3100 0.156 0.025 0.024 n/a n/a 0.008
Xeon E5450/3000 0.221 0.019 0.016 n/a n/a 0.015
P4/2400/533 0.367 0.020 0.016 n/a n/a 0.016
Athlon 64X2/3800+/2000 0.234 0.023 0.019 n/a n/a 0.016
Athlon 64/3800+/2400* 0.191 0.019 0.016 n/a n/a 0.018
Core Duo T2600/2160* 0.192 0.019 0.016 n/a n/a 0.019
Celeron/2400 0.423 0.022 0.019 n/a n/a 0.020
Athlon 64/3200+/2000 0.409 0.026 0.021 n/a n/a 0.020
Athlon XP/2000+/1667 3.300 0.030 0.030 n/a n/a 0.020
Pentium E5400/2700 0.169 0.024 0.021 n/a n/a 0.025
Core2Duo E6300/1870 0.257 0.026 0.023 n/a n/a 0.025
Celeron/2000 1.064 0.032 0.027 n/a n/a 0.025
Celeron/1400 0.380 0.030 0.030 n/a n/a 0.030
PIII/1000 0.420 0.040 0.030 n/a n/a 0.030
Celeron/1000 n/a 0.040 0.030 n/a n/a 0.030
P4/1500 1.600 0.050 0.040 n/a n/a 0.030
Core2Duo T8100/2100 0.230 0.036 0.034 n/a n/a 0.036
Celeron 420/1600 0.355 0.038 0.037 n/a n/a 0.038
Athlon/900 0.640 0.060 0.040 n/a n/a 0.040
P4/1600 0.638 0.052 0.049 n/a n/a 0.044
Celeron/667 1.900 0.090 0.070 n/a n/a 0.050
PII/350 1.010 0.080 0.070 n/a n/a 0.050
Celeron/433 1.200 0.100 0.080 n/a n/a 0.060
PII/233 1.490 0.140 0.110 n/a n/a 0.070
Atom N270/1600 1.108 0.102 0.092 n/a n/a 0.079
K6/300 4.080 0.120 0.100 n/a n/a 0.090
K6/200 1.750 0.120 0.090 n/a n/a 0.100
Celeron/266 2.050 0.130 0.090 n/a n/a 0.130
MII-PR233/187 1.660 0.150 0.130 n/a n/a 0.100
P/200MMX 1.670 0.180 0.130 n/a n/a 0.130
P/133 1.960 0.220 0.160 n/a n/a 0.140
Am486DX/66 15.730 0.780 0.620 0.800 n/a 0.410
Am386DX/40 26.240 2.230 1.650 2.500 1.400 1.330
i386DX/33 37.350 2.930 2.180 n/a n/a 1.510
Am386SX/33/ramdrive 38.747 4.146 3.142 n/a n/a 1.732
Am386SX/33/smartdrv 40.380 4.150 3.203 n/a n/a 1.902
Am386SX/33 42.722 4.398 3.591 n/a n/a 2.216
286/12 119.340 9.480 7.280 9.500 5.500 5.320
8086/9.54 239.600 24.250 18.610 25.000 13.000 9.350
8086/4.77 481.600 48.830 37.390 50.000 26.000 19.260

In first colimn you will see work time of Context.110 (ctx to asm), compiled with Context 1.01, in second and third columns - work time of Context 1.03, compiled with Context 1.01 and Context 1.30. In next three columns - Context.pas compilation time with different versions of Turbo Pascal.

Compilation of Context.202 to asm with Context 2.xx and C++ port of Context 2.07 compiled with different compilers, seconds:

CPU\Compiler 130 140 202 212 213 BC5 VC4
Core i3-2100/3100 0.041 0.013 0.013 0.012 0.012 0.013 0.010
Core i5-4690S/3200**** 0.046 0.015 0.015 0.014 0.013 0.052 0.012
Pentium E5400/2700 0.046 0.022 0.020 0.019 0.016 0.014 0.013
Athlon 64/3800+/2400* 0.052 0.024 0.026 0.025 0.025 0.019 0.016
Core Duo T2600/2160* 0.049 0.029 0.027 0.025 0.023 0.020 0.017
Athlon 64X2/3800+/2000* 0.067 0.027 0.030 0.029 0.029 0.023 0.019
P4-630/3000/800 0.069 n/a 0.036 n/a n/a n/a n/a
Core2Duo T8100/2100 0.074 0.037 0.036 0.034 0.031 0.046 0.029
P4/2400/533 0.071 0.045 0.042 0.039 0.041 0.038 0.032
Xeon E5450/3000 0.059 0.050 0.048 0.044 0.043 0.044 0.038
Celeron/2400 0.079 0.060 0.056 0.054 0.055 0.054 0.044
Athlon XP/2000+/1667** 0.103 n/a 0.056 n/a n/a n/a n/a
Celeron/2000 0.101 0.065 0.062 0.058 0.060 0.055 0.047
Celeron/1400** 0.090 n/a 0.070 n/a n/a n/a n/a
Athlon XP-M/1600+/1400** 0.100 n/a 0.080 n/a n/a n/a n/a
P4/1600 0.138 0.085 0.065 0.062 0.063 0.086 0.055
PIII/1000 0.138 0.087 0.093 0.071 0.068 0.067 0.057
Atom N270/1600 0.359 0.090 0.093 0.089 0.087 0.081 0.069
Core2Duo E6300/1870 0.069 0.089 0.066 0.065 0.066 0.077 0.070
Core i3-2120/3300 n/a 0.077 0.074 0.070 0.073 0.082 0.076
Celeron 420/1600 0.133 0.102 0.099 0.097 0.093 0.089 0.082
Athlon 64/3200+/2000 0.200 0.165 0.168 0.168 0.165 0.140 0.136
Celeron/667** 0.200 n/a 0.410 n/a n/a n/a n/a
PII/350 0.300 0.226 0.248 0.186 0.178 0.176 0.148
Celeron/350(266) 0.308 0.244 0.270 0.207 0.195 0.190 0.161
Celeron/266** 0.430 n/a 0.370 n/a n/a n/a n/a
K6/200 0.438 0.369 0.358 0.331 0.309 0.305 0.241
P/133** 0.830 n/a 0.690 n/a n/a n/a n/a
Am486DX/66 2.600 2.650 2.520 2.300 2.250 2.280 1.790
i386DX/33 10.270 n/a n/a n/a n/a n/a n/a
Am386SX/33/ramdrive 16.134 n/a n/a n/a n/a n/a n/a
Am386SX/33/smartdrv 16.755 n/a n/a n/a n/a n/a n/a
Am386SX/33 21.724 n/a n/a n/a n/a n/a n/a
286/12** 38.110 n/a n/a n/a n/a n/a n/a
8086/9.54 97.900 n/a n/a n/a n/a n/a n/a
8086/4.77 195.200 n/a n/a n/a n/a n/a n/a

Low results of some modern processors may be caused by slow disk subsystem?

Archiving (arctest.ctx)

Archiving of context.asm (Context 2.02 assembly listing, 318761 bytes), seconds:

CPU\Compiler 101 130 TP1 TP3 BP7 BC3 140 205 212 213 BC5 VC4
Core i5-4690S/3200**** 1.92 0.65 2.57 2.64 0.67 0.25 0.54 0.49 0.20 0.20 0.22 0.16
Core i3-2100/3100 2.02 0.68 2.70 2.81 0.69 0.28 0.71 0.83 0.64 0.30 0.28 0.25
Core i3-2120/3300 n/a n/a n/a n/a n/a n/a 0.77 0.86 0.68 0.36 0.33 0.30
Pentium E5400/2700 0.96 0.93 1.01 1.61 0.80 0.40 0.82 1.30 0.78 0.42 0.40 0.36
Core2Duo T8100/2100 1.17 1.19 1.27 1.95 0.97 0.50 0.99 1.54 0.95 0.52 0.48 0.42
Xeon E5450/3000 1.12 1.13 1.27 1.99 1.00 0.51 0.96 1.63 1.01 0.51 0.48 0.44
Athlon 64/3800+/2400 2.53 1.50 2.91 3.42 1.71 0.48 1.24 1.86 1.25 0.56 0.49 0.47
Core Duo T2600/2160 1.36 1.27 1.42 2.15 1.18 0.51 1.28 1.81 1.16 0.57 0.51 0.48
Athlon 64/3200+/2000 2.55 1.57 3.11 3.58 1.77 0.48 1.31 1.97 1.32 0.58 0.51 0.49
Core2Duo E6300/1870 1.35 1.35 1.44 2.30 1.13 0.52 1.20 1.85 1.14 0.62 0.58 0.50
P4-630/3000/800 2.19 1.07 2.82 2.83 1.14 0.58 1.14 1.55 0.90 0.59 0.57 0.53
Athlon 64X2/3800+/2000 3.00 1.80 3.52 4.02 2.04 0.59 1.52 2.24 1.53 0.69 0.60 0.58
Celeron 420/1600 1.60 1.60 1.70 2.71 1.33 0.64 1.41 2.18 1.34 0.72 0.66 0.58
P4/2400/533 3.59 1.09 4.67 4.78 1.07 0.61 1.21 1.72 0.98 0.63 0.67 0.61
Celeron/2400 3.61 1.10 4.71 4.78 1.07 0.62 1.21 1.74 0.99 0.64 0.67 0.61
Athlon XP/2000+/1667 4.11 2.15 4.59 4.85 2.50 0.84 1.79 2.47 1.81 1.15 0.71 0.69
Celeron/2000 4.30 1.31 5.59 5.71 1.28 0.73 1.43 2.06 1.18 0.75 0.80 0.75
P4/1600 5.54 1.75 7.59 7.72 1.85 1.02 1.90 2.58 1.53 0.96 1.08 0.92
Atom N270/1600 10.81 7.22 18.73 18.84 10.06 2.42 2.19 4.23 1.72 1.48 1.33 1.19
PIII/1000 3.47 2.36 3.93 5.07 2.40 1.16 2.81 8.23 2.36 1.44 1.31 1.26
Celeron/667*** 7.00 4.80 8.30 9.30 4.80 2.60 5.70 17.90 6.10 n/a n/a 3.50
PII/350 9.99 6.78 11.31 14.40 6.86 3.35 8.09 23.77 6.80 4.12 3.77 3.64
Celeron/350(266) 10.11 6.85 11.39 14.83 6.94 3.42 8.38 24.15 7.02 4.36 4.00 3.87
K6/200 19.68 11.96 22.59 23.64 10.70 5.19 17.48 25.74 10.87 6.38 6.01 4.76
P/133 33.70 21.50 37.40 44.80 22.50 12.90 n/a n/a n/a n/a n/a n/a
Am486/66 115.80 67.50 137.60 151.20 68.80 43.10 102.10 115.10 65.30 44.20 45.30 38.00
i386DX/33 629.00 347.80 589.00 660.70 357.00 206.40 n/a n/a n/a n/a n/a n/a
Am386SX/33/ramdrive 843.48 495.87 818.87 1127.80 507.78 282.18 n/a n/a n/a n/a n/a n/a
Am386SX/33/smartdrv 844.08 496.42 819.42 1219.59 513.56 283.78 n/a n/a n/a n/a n/a n/a
Am386SX/33 1173.23 497.23 1156.04 888.57 775.91 308.33 n/a n/a n/a n/a n/a n/a
286/12*** 2568.40 1479.30 2661.30 2766.40 1489.20 805.90 n/a n/a n/a n/a n/a n/a
8086/9.54 5936.70 3503.50 6072.10 6348.60 3825.80 1757.60 n/a n/a n/a n/a n/a n/a
8086/4.77 n/a n/a n/a n/a n/a 3528.40 n/a n/a n/a n/a n/a n/a

Tree walk (cputest.ctx)

First move in Nim game with nine, eight and seven coins in three rows, seconds:

CPU\Compiler 050 101 130 TP1 TP3 BP7 BC3 140 205 212 213 BC5 VC4
Core i5-4690S/3200**** 1.75 1.93 0.97 2.25 1.98 1.06 0.58 0.37 0.40 0.30 0.21 0.21 0.15
Core i3-2100/3100 1.85 1.99 1.03 2.31 2.11 1.15 0.60 0.52 0.59 0.44 0.35 0.25 0.22
Core i3-2120/3300 n/a n/a n/a n/a n/a n/a n/a 0.59 0.65 0.48 0.41 0.32 0.28
Pentium E5400/2700 1.47 1.40 1.22 2.50 1.61 1.40 0.78 0.94 0.99 0.88 0.70 0.53 0.43
Athlon 64/3800+/2400 2.66 2.84 2.06 4.00 2.64 2.02 0.92 1.34 1.46 1.28 0.82 0.59 0.52
Xeon E5450/3000 1.83 1.57 1.43 3.07 2.03 1.79 0.96 1.09 1.16 0.99 0.86 0.64 0.53
Core2Duo T8100/2100 1.80 1.66 1.55 4.14 1.92 1.70 0.98 1.15 1.21 1.06 0.86 0.62 0.53
Core Duo T2600/2160 2.12 1.90 1.57 3.09 2.18 1.68 0.99 1.40 1.43 1.19 1.02 0.74 0.57
Athlon 64/3200+/2000 3.20 3.42 2.23 4.83 3.14 2.43 1.10 1.66 1.76 1.53 0.99 0.70 0.62
Athlon 64X2/3800+/2000 3.18 3.40 2.41 4.82 3.08 2.41 1.10 1.62 1.76 1.54 1.00 0.72 0.64
Core2Duo E6300/1870 2.04 1.88 1.75 4.40 2.33 2.04 1.17 1.40 1.48 1.31 1.09 0.78 0.64
P4-630/3000/800 2.60 2.69 2.10 16.94 3.26 1.94 1.24 1.27 1.40 1.06 0.86 0.74 0.69
P4/2400/533 3.70 4.10 2.50 15.70 4.90 2.60 1.50 1.30 1.40 1.10 0.91 n/a 0.70
Celeron/2400 3.60 4.10 2.50 13.10 5.00 2.60 1.50 1.30 1.40 1.10 0.93 n/a 0.70
Celeron 420/1600 2.40 2.20 2.09 4.56 2.65 2.32 1.31 1.63 1.71 1.52 1.28 0.91 0.74
Athlon XP/2000+/1667 5.20 4.40 2.70 5.90 4.00 3.00 1.40 1.99 2.14 1.82 1.22 0.96 0.88
Celeron/2000 4.40 4.90 2.90 18.80 5.90 3.10 1.80 1.50 1.70 1.30 1.09 0.95 0.90
P4/1600 5.81 6.63 3.91 8.09 7.53 4.05 2.27 2.14 2.37 1.74 1.54 1.25 1.12
Athlon XP-M/1600+/1400 6.20 5.30 3.40 7.00 4.70 3.50 1.60 2.30 2.60 2.20 n/a n/a 1.30
Celeron/1400 3.90 3.80 2.70 6.00 3.80 2.70 1.80 n/a n/a n/a n/a n/a n/a
Atom N270/1600 14.17 14.05 13.38 28.78 22.45 17.22 11.40 2.65 3.61 2.37 1.77 1.54 1.42
PIII/1000 5.50 5.30 3.80 8.10 5.20 3.70 2.40 n/a n/a n/a n/a n/a n/a
Celeron/1000 10.30 5.30 4.10 8.10 5.20 3.80 2.40 n/a n/a n/a n/a n/a n/a
P4/1500 6.30 7.10 4.20 32.70 8.10 4.30 2.40 n/a n/a n/a n/a n/a n/a
Athlon/900 9.60 8.20 5.50 10.90 7.20 5.50 2.50 n/a n/a 3.00 n/a n/a 1.60
Celeron/667 15.40 8.00 6.00 12.10 7.70 5.70 3.70 5.40 5.30 4.60 n/a n/a 2.60
Celeron/433 23.70 12.20 9.20 18.70 11.80 8.70 5.70 n/a n/a n/a n/a n/a n/a
K6/300 21.20 18.90 11.00 19.60 15.50 10.50 6.90 n/a n/a n/a n/a n/a n/a
PII/350 29.40 15.30 11.50 23.20 14.60 10.80 6.90 9.90 9.90 7.90 6.39 n/a 4.80
Celeron/266 38.60 20.10 15.10 30.30 19.20 14.20 9.20 n/a n/a n/a n/a n/a n/a
PII/233 43.20 22.50 16.90 33.90 21.40 15.90 10.20 n/a n/a n/a n/a n/a n/a
K6/200 49.00 28.60 19.10 29.20 23.60 16.00 10.30 17.20 16.80 14.40 10.30 7.09 6.50
P/200MMX** 30.70 29.10 18.60 47.20 26.50 17.40 11.20 n/a n/a n/a n/a n/a n/a
MII-PR233/187 60.20 31.10 20.10 34.50 27.50 18.60 12.80 n/a n/a n/a n/a n/a n/a
P/133 102.50 50.60 33.00 73.30 44.20 32.70 18.90 35.00 40.70 33.70 n/a n/a 13.00
Am486DX/66 293.00 158.90 108.30 204.20 136.20 104.90 57.50 108.10 130.80 100.00 76.50 n/a 52.10
Am386DX/40 922.50 563.00 378.00 736.60 490.40 326.10 204.90 n/a n/a n/a n/a n/a n/a
i386/33 779.60 725.90 455.50 910.80 639.70 431.80 272.50 n/a n/a n/a n/a n/a n/a
Am386SX/33/ramdrive 1421.14 1361.54 995.58 1443.00 783.38 906.04 388.92 n/a n/a n/a n/a n/a n/a
Am386SX/33 1007.17 953.94 644.90 1441.19 1181.25 603.92 389.08 n/a n/a n/a n/a n/a n/a
Am386SX/33/smartdrv 1438.22 1361.70 995.75 1222.39 1184.05 807.28 541.35 n/a n/a n/a n/a n/a n/a
286/12 3870.90 2317.00 1655.00 2688.70 2101.70 1415.60 885.00 n/a n/a n/a n/a n/a n/a
8086/9.54 7020.60 6608.60 4597.70 7670.90 6221.20 4518.60 2684.80 n/a n/a n/a n/a n/a n/a
8086/4.77 n/a n/a n/a n/a n/a n/a 5372.60 n/a n/a n/a n/a n/a n/a

* - results significally depends on screen mode (in window faster then on full screen)

** - test code contains some unnecessary commands

*** - extrapolation

**** - Wine on 64-bit Linux used for 32-bit test programs

Data shown in previous tables can be converted to relative processor efficiency (8086/4.77MHz = 1):

Processor Compilation
(ctx->bin)
Compilation
(ctx->asm)
Archiving Tree walk
Core i5/32bit n/a 29.1 32.9 53.4
Core i3/32bit n/a 30.0 21.7 37.6
Pentium E/32bit n/a 26.5 17.3 22.1
Core2Duo/32bit n/a 7.7 18.0 21.4
CoreDuo/32bit n/a 17.2 16.2 20.8
Athlon 64/32bit n/a 10.3 17.9 20.0
K6/32bit n/a 14.1 17.7 19.7
Athlon XP/32bit n/a 10.0 14.6 17.5
Pentium II/32bit n/a 14.3 13.2 15.3
Pentium III/32bit n/a 13.1 13.4 14.8
Pentium/32bit n/a 10.1 n/a 14.8
Core i5/16bit 6.2 7.1 21.0 13.8
Core i3/16bit 2.4 3.7 19.4 13.8
K6/16bit 9.9 10.6 16.2 12.4
Pentium 4/32bit n/a 9.9 11.5 12.4
Pentium E/16bit 3.1 7.5 15.6 12.2
CoreDuo/16bit 5.2 8.8 15.3 12.0
Core2Duo/16bit 4.1 7.2 17.3 11.7
Athlon 64/16bit 4.2 8.6 14.3 11.6
Athlon/16bit 5.0 n/a n/a 11.4
Atom/32bit n/a 6.5 8.8 11.3
Athlon XP/16bit 3.6 5.4 12.0 11.0
Pentium II/16bit 7.3 8.9 14.4 10.8
M II/16bit 7.3 n/a n/a 10.7
Pentium III/16bit 5.9 6.7 14.5 10.4
Pentium/16bit 8.4 8.4 9.8 10.2
Am486/32bit n/a 6.1 5.9 7.5
Pentium 4/16bit 4.6 5.5 11.5 7.1
Am486/16bit 4.4 5.4 5.9 6.8
Am386DX/16bit 2.7 n/a n/a 3.1
i386/16bit 2.5 2.7 2.5 2.8
286 2.0 2.0 1.7 2.4
Am386SX/16bit 1.7 1.7 1.8 2.0
Atom/16bit 1.2 1.6 1.0 1.4
8086 1.0 1.0 1.0 1.0

Сайт создан в системе uCoz