user967007
user967007

Reputation:

Borland vs. MingW/GCC compilation speeds..

I'm a long time Borland users ( since Turbo C ) ( until BC5.2 ). I've been using MingW/GCC with CodeBlocks for about a year now, mainly for the extra support esp. native 64bit integers.

Anyway, I have a query regarding compilation speeds.

I have a C (Win32) file which is apx 60,000 lines in length. On Borland 5.2 this file takes apx 3-5 seconds to compile. On GCC it takes a bit over 35 seconds.

The GCC command line options I am using are.

-std=c99 -s -O2 (ive also tried -O)

The final exe size is pretty much the same +/- 50kB.

Why the big difference in compilation time ? and is there a way to speed up GCC to be comparable to BC5.2 ?

Upvotes: 1

Views: 1542

Answers (1)

wallyk
wallyk

Reputation: 57784

Borland's compilers were designed from inception to be fast, at least according to marketing and benchmarking published at the time, and widely acknowledged in the industry. They target a single architecture, the x86 family.

gcc was not designed to be fast. It is designed to:

  • target code for multiple architectures, from embedded controllers to supercomputers
  • be hosted on multiple architectures
  • keep pace with the ever changing C++ language standard

The divergence of the intended use undoubtedly affects its performance.

Upvotes: 3

Related Questions