Gentoo Archives: gentoo-dev

From: Per Wigren <wigren@××××.se>
To: gentoo-dev@g.o
Subject: [gentoo-dev] gcc vs tcc
Date: Fri, 29 Nov 2002 17:39:40
Message-Id: 200211291841.12428.wigren@home.se
1 Is it OK to add dev-lang/tcc as a build-dependancy?
2 Compiling GOBO (http://www.gobosoft.com) with gcc 3.2.1 takes about 3 hours on
3 my dual athlon 1.2Ghz with 512mb RAM...
4
5 Compare this:
6
7 oggy gexace # time gcc -O2 -o gexace-gcc gexace.c
8 real 10m12.746s
9 user 9m33.227s
10 sys 0m4.897s
11 oggy gexace # time tcc -o gexace-tcc gexace.c
12 real 0m1.353s
13 user 0m0.472s
14 sys 0m0.061s
15 oggy gexace # ls -l gexace-*
16 -rwxr-xr-x 1 root root 1216938 Nov 29 18:27 gexace-gcc
17 -rwxr-xr-x 1 root root 994200 Nov 29 18:27 gexace-tcc
18
19 It's almost silly! :) I've done some just-for-fun benchmarking and found that
20 tcc generates code about as fast as "gcc -O2", but is a little bit slower
21 than "-O3" and even more so when adding things like "-fomit-frame-pointer"
22 and "-ffast-math"... But the gobo-utilities are more I/O-intensive than
23 CPU-intensive so it shouldn't matter much..
24
25 gexace is one of several huge (2mb+) .c-files that is part of gobo (generated
26 by the eiffel-compiler).. Using tcc, compiling it will take about one minute
27 while it takes 3 hours with gcc...
28
29 Regards,
30 Per Wigren
31
32
33 --
34 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] gcc vs tcc Karl Trygve Kalleberg <karltk@g.o>
Re: [gentoo-dev] gcc vs tcc Sven Vermeulen <sven.vermeulen@××××××.be>