wxMSW Choose a compiler : Speed, Compile times and file sizes


Running with wxWidgets 2.5.3 (11 Oct 04) I built the wxMSW library and two programs to provide comparative data on file sizes and build times for the compilers I have available on an XP home box:
 
Times: I built the wxMSW library, wxWidgets own minimal sample and wxHatch (a program of resonable complexity). With wxHatch, I then forced a rebuild of the second largest file and relinked. For gcc, I also timed the configure process

Sizes: The size of the minimal program and of wxHatch are shown, with the saving between debug and release builds. Note that gcc and watcom provide strip utilites to reduce te size of the exe file

Speed: The time to scan the wxHatch sources for all the classes and their methods was measured (code in wxHatch CVS, trchild.cpp TreeChild constructor). In this test, all the files were loaded into memory before the string scan was begun

Time to compile in debug build

The Digital Mars makefiles in the 2.5.3 release do not support precompiled headers, the replacement here was used in these tests
Makefile.gcc has not yet been built


Time in min:s

Borland 5.5

Open Watcom 1.3

Gcc 3.2 (makefile.gcc)

Gcc 3.2 (configure in MSYS shell)

Visual C 6

Digital Mars

library

configure

N/A

N/A

N/A

7:36

N/A

N/A


make

4:48
16:04

47:14
7:31
2:34
wxhatch

make

1:42
3:16

7:28
2:20
1:35

recompile 1 file & relink

0:14
0:48

2:40
0:08
0:07

Sizes in Mbytes

 Default builds, except for


Size is in Mbytes

Borland 5.5

Open Watcom 1.1

Gcc 3.2 (makefile.gcc)

Gcc 3.2 (configure)


Visual C 6
Visual C 2003

Digital Mars

Total Library
size

debug

54
106
360
356
36
N/A
31

release
18.6
30.2
18
15
19.6
23
N/A

Minimal

before strip N/A 27
22
19
N/A N/A
N/A

debug

2.7
3.7
2.1
1.9
2.0
2.0
6.7

release

2.4
1.7
3.4
2.5
0.8
0.8
N/A

wxhatch

before strip N/A 49
N/A
34
N/A N/A
N/A

debug 4.8
8.7
N/A
4.8
4.8
4.6
14.6

release

4.9 (yes bigger)
4.4
7.0
5.9
2.7
2.6
N/A
 

Speed of execution

(times vary by about 10% on replicate runs)
 

Time to scan (ms)

Borland 5.5

Open Watcom 1.1

Gcc 3.2 (makefile.gcc)

Gcc 3.2 (configure)

Visual C 6

Visual C 2003

Digital Mars

wxhatch

debug

2266
11922
N/A
2828
4000
2765
3812

release

1313
6578
2062
2031
1672
1546
N/A
 
With Borland, version 2.4.2 of wxWidgets took 1625 and 1891ms in release and debug modes for this scan

Other details of the 2.4 series file size and compile times, (timed on the same hardware) are here

chris elliott,  17 Oct 04