开发者

Borland vs. MingW/GCC compilation speeds..

开发者 https://www.devze.com 2023-04-08 12:59 出处:网络
I\'m a long time Borland users ( since Turbo C ) ( until BC5.2 ).开发者_如何学C I\'ve been using MingW/GCC with CodeBlocks for about a year now, mainly

I'm a long time Borland users ( since Turbo C ) ( until BC5.2 ).开发者_如何学C 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 ?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号