Some tests are performed on many different processors from 8086 to modern CPU's. The initial purpose of the tests is the evaluation of my own compiler. This tests include program compiling. In this tests context.c (C port of context.cpp/4,506 lines/101,032 bytes), context.ctx (context.066 - port of context.cpp/4,247 lines/91,274 bytes) and context.pas (context.tp7/2,395 lines/65,001 bytes, context.tp1/2,362 lines/64,051 bytes, context.tp3/2,362 lines/63,419 bytes) compiled with different compilers listed below. Comparison with context.pas is not entirely correct since it's code is significantly different and smaller in size.
| Compiler | Remark |
|---|---|
| BC5 | Borland C++ 5.5.1 |
| GCC | Default version for Linux distribution |
| IC4 | Intel C 4.5\#pragma compact\set :INCLUDE:=INC\ic86 context.c\link86.exe cstdoss.obj,context.obj,cdosnfs.lib to context.exe exe bi ss(stack(4096)) |
| MC5 | Microsoft C 5.10\cl.exe /AS /DUSEMSFTC /IINCLUDE /F 2000 context.c |
| TC2 | Turbo C 2.01 |
| WC6 | Watcom C 6.5\wcc.exe context.c /dUSEMSFTC /dUSECTYPE /ml /iH\wlink.exe File context.obj Library clibl.lib OPtion Stack=8192 |
| TP1 | Turbo Pascal 1.0 |
| TP3 | Turbo Pascal 3.0 |
| TP7 | Turbo Pascal 7.0 |
| 110 | Context 1.10 + Asm8086(Initial version) |
| 102 | Context 1.02 + Asm8086 |
| 103 | Context 1.03 with direct code generator |
Most of the results were obtained on real machines, some were also obtained on emulators. Some of them are correct, others are not:
Cpu: Compiler:
| System/CPU | Compiler | Time (sec) | Remark |
|---|---|---|---|
| Core i5-4690S@3200/VMWare | TP7 |
0.009
|
|
| Core i5-4690S@3200/VMWare | 103 |
0.015
|
|
| Athlon 64-3200+@2000 | TP7 |
0.015
|
|
| Athlon 64-3200+@2000 | 103 |
0.027
|
|
| Pentium 4@1600 | TP7 |
0.029
|
|
| Pentium 4@1600 | 103 |
0.046
|
|
| Pentium III EB@533 | TP7 |
0.051
|
|
| Core i5-4690S@3200/Win7x64 | BC5 |
0.053
|
|
| Core i5-4690S@3200/VMWare | TC2 |
0.064
|
|
| Athlon 64-3200+@2000 | TC2 |
0.081
|
|
| Core i5-4690S@3200/Win7x64/VMWare | BC5 |
0.082
|
|
| Core i5-4690S@3200/VMWare | 102 |
0.083
|
|
| Pentium III EB@533 | 103 |
0.096
|
|
| Core i5-4690S@3200/VMWare | TC2 |
0.121
|
Compile via assembly (tcc -B) |
| K6@200 | TP7 |
0.136
|
|
| Athlon 64-3200+@2000 | BC5 |
0.137
|
|
| Pentium MMX@166 | TP7 |
0.149
|
|
| Athlon 64-3200+@2000 | 102 |
0.152
|
|
| K6@200 | 103 |
0.176
|
|
| Athlon 64-3200+@2000 | TC2 |
0.179
|
Compile via assembly (tcc -B) |
| Pentium 4@1600 | TC2 |
0.221
|
|
| Pentium MMX@166 | 103 |
0.233
|
|
| Core i5-4690S@3200/Win2K3/VMWare | BC5 |
0.278
|
|
| Pentium III EB@533 | TC2 |
0.281
|
|
| Core i5-4690S@3200 | GCC |
0.283
|
|
| Core i5-4690S@3200/VMWare | IC4 |
0.302
|
|
| Pentium 4@1600 | 102 |
0.325
|
|
| Core i5-4690S@3200/VMWare | MC5 |
0.369
|
|
| Am486DX2@66 | TP7 |
0.378
|
|
| Pentium 4@1600 | BC5 |
0.413
|
|
| Athlon 64-3200+@2000 | IC4 |
0.422
|
|
| K6@200 | TC2 |
0.488
|
|
| Core i5-4690S@3200/VMWare | 110 |
0.532
|
|
| Pentium 4@1600 | TC2 |
0.553
|
Compile via assembly (tcc -B) |
| Pentium III EB@533 | 102 |
0.560
|
|
| Pentium MMX@166 | TC2 |
0.586
|
|
| Pentium III EB@533 | TC2 |
0.595
|
Compile via assembly (tcc -B) |
| Am486DX2@66 | TP3 |
0.681
|
Compile to memory |
| Pentium III EB@533 | BC5 |
0.724
|
|
| Am486DX2@66 | TP1 |
0.884
|
Compile to memory |
| Core i5-4690S@3200/VMWare | WC6 |
0.858
|
|
| Athlon 64-3200+@2000 | WC6 |
0.914
|
|
| Am486DX2@66 | 103 |
0.983
|
|
| Athlon 64-3200+@2000 | 110 |
1.035
|
|
| Pentium 4@1600 | IC4 |
1.069
|
|
| K6@200 | TC2 |
1.119
|
Compile via assembly (tcc -B) |
| K6@200 | 102 |
1.121
|
|
| Pentium III EB@533 | MC5 |
1.294
|
|
| Pentium MMX@166 | TC2 |
1.354
|
Compile via assembly (tcc -B) |
| Pentium MMX@166 | 102 |
1.416
|
|
| Core i5-4690S@3200 | GCC |
1.423
|
Max optimization (-O3) |
| Pentium III EB@533 | IC4 |
1.559
|
|
| Am386SX@33 | TP7 |
1.902
|
|
| K6@200 | BC5 |
1.988
|
|
| Pentium 4@1600 | 110 |
2.043
|
|
| Am486DX2@66 | TC2 |
2.428
|
|
| K6@200 | MC5 |
2.684
|
|
| Pentium MMX@166 | BC5 |
2.742
|
|
| Am386SX@33 | TP3 |
2.750
|
|
| Pentium MMX@166 | IC4 |
3.070
|
|
| Pentium III EB@533 | 110 |
3.073
|
|
| K6@200 | IC4 |
3.166
|
|
| Pentium 4@1600 | WC6 |
3.317
|
|
| Pentium III EB@533 | WC6 |
3.328
|
|
| Pentium MMX@166 | IC4 |
3.773
|
|
| Am386SX@33 | TP1 |
4.620
|
|
| K6@200 | MC5 |
4.917
|
|
| Am286@8 | TP7 |
5.438
|
|
| Am386SX@33 | 103 |
5.460
|
|
| Am486DX2@66 | 102 |
5.603
|
|
| Am486DX2@66 | TC2 |
5.630
|
Compile via assembly (tcc -B) |
| Pentium 4@1600 | MC5 |
5.684
|
? |
| K6@200 | WC6 |
6.597
|
|
| Pentium MMX@166 | WC6 |
7.528
|
|
| K6@200 | 110 |
7.916
|
|
| Am286@8 | TP3 |
7.960
|
Compile to memory |
| Pentium MMX@166 | 110 |
8.107
|
|
| Am486DX2@66 | BC5 |
10.914
|
|
| Am386SX@33 | TC2 |
11.673
|
|
| Am486DX2@66 | MC5 |
13.112
|
|
| Am286@8 | TP1 |
13.690
|
Compile to memory |
| Pocket 8086/V30@4.77 | TP7 |
14.326
|
CF Card |
| Am486DX2@66 | IC4 |
16.024
|
|
| Am286@8 | 103 |
18.896
|
|
| Pocket 8086/V30@4.77 | TP3 |
20.780
|
Compile to memory |
| Pocket 8086/8088@4.77 | TP7 |
21.813
|
CF Card |
| PCem/IBM 5160/8088@4.77 | TP7 |
22.632
|
|
| PCjs/IBM 5150/8088@4.77 | TP3 |
23.690
|
Compile to memory |
| Am386SX@33 | TC2 |
28.850
|
Compile via assembly (tcc -B) |
| PCem/IBM 5160/8088@4.77 | TP3 |
29.400
|
Compile to memory |
| Pocket 8086/8088@4.77 | TP3 |
30.500
|
Compile to memory |
| Am286@8 | TC2 |
35.321
|
|
| Am486DX2@66 | WC6 |
36.216
|
|
| Am386SX@33 | 102 |
36.744
|
|
| Pocket 8086/V30@4.77 | TP1 |
37.660
|
Compile to memory |
| Am486DX2@66 | 110 |
38.513
|
|
| PCjs/IBM 5150/8088@4.77 | TP1 |
42.060
|
Compile to memory |
| PCem/IBM 5160/8088@4.77 | TP1 |
52.030
|
Compile to memory |
| Pocket 8086/8088@4.77 | TP1 |
52.590
|
Compile to memory |
| Pocket 8086/V30@4.77 | 103 |
53.396
|
CF Card |
| Pocket 8086/V30@4.77 | 103 |
71.411
|
USB Pen Drive |
| Am386SX@33 | MC5 |
72.372
|
|
| Pocket 8086/8088@4.77 | 103 |
92.725
|
CF Card |
| Am286@8 | TC2 |
96.899
|
Compile via assembly (tcc -B) |
| Am386SX@33 | IC4 |
97.597
|
|
| Pocket 8086/V30@4.77 | TC2 |
102.722
|
CF Card |
| Am286@8 | 102 |
146.393
|
|
| Pocket 8086/V30@4.77 | TC2 |
166.772
|
USB Pen Drive |
| Pocket 8086/8088@4.77 | TC2 |
167.432
|
CF Card |
| Am386SX@33 | WC6 |
209.284
|
|
| Am286@8 | MC5 |
223.077
|
|
| Am386SX@33 | 110 |
224.121
|
|
| Pocket 8086/V30@4.77 | TC2 |
234.338
|
CF Card/Compile via assembly (tcc -B) |
| Am286@8 | IC4 |
297.400
|
|
| Pocket 8086/V30@4.77 | 102 |
330.304
|
CF Card |
| Pocket 8086/8088@4.77 | TC2 |
375.128
|
CF Card/Compile via assembly (tcc -B) |
| Pocket 8086/V30@4.77 | TC2 |
380.511
|
USB Pen Drive/Compile via assembly (tcc -B) |
| Pocket 8086/V30@4.77 | 102 |
535.748
|
USB Pen Drive |
| Pocket 8086/8088@4.77 | 102 |
568.433
|
CF Card |
| Pocket 8086/V30@4.77 | MC5 |
626.221
|
CF Card |
| Am286@8 | WC6 |
644.128
|
|
| Am286@8 | 110 |
675.879
|
|
| Pocket 8086/V30@4.77 | IC4 |
810.461
|
CF Card |
| Pocket 8086/8088@4.77 | MC5 |
1,012.445
|
CF Card |
| Pocket 8086/8088@4.77 | IC4 |
1,318.854
|
CF Card |
| Pocket 8086/V30@4.77 | WC6 |
1,580.658
|
CF Card |
| Pocket 8086/V30@4.77 | 110 |
1,876.410
|
CF Card |
| Pocket 8086/8088@4.77 | WC6 |
2,485.052
|
CF Card |
| Pocket 8086/8088@4.77 | 110 |
3,173.401
|
CF Card |