Gentoo Archives: gentoo-dev

From: Per Wigren <wigren@××××.se>
To: Sven Vermeulen <sven.vermeulen@××××××.be>
Cc: gentoo-dev@g.o
Subject: Re: [gentoo-dev] gcc vs tcc
Date: Fri, 29 Nov 2002 20:37:47
Message-Id: 200211292139.23049.wigren@home.se
In Reply to: Re: [gentoo-dev] gcc vs tcc by Sven Vermeulen
1 Friday 29 November 2002 20:27 skrev Sven Vermeulen:
2 > On Fri, Nov 29, 2002 at 06:41:12PM +0100, Per Wigren wrote:
3 > > Is it OK to add dev-lang/tcc as a build-dependancy?
4 > > Compiling GOBO (http://www.gobosoft.com) with gcc 3.2.1 takes about 3
5 > > hours on
6 > > my dual athlon 1.2Ghz with 512mb RAM...
7 > >
8 > > Compare this:
9 > >
10 > > oggy gexace # time gcc -O2 -o gexace-gcc gexace.c
11 > > real 10m12.746s
12 > > user 9m33.227s
13 > > sys 0m4.897s
14 > > oggy gexace # time tcc -o gexace-tcc gexace.c
15 > > real 0m1.353s
16 > > user 0m0.472s
17 > > sys 0m0.061s
18 >
19 > Are you certain this is correct ? You did remove the created object-files
20 > (or did a "make clean") before retrying with tcc, did you ?
21 >
22 > Wkr,
23 > Sven Vermeulen
24
25 Yes it is correct! Believe it or not!
26 This is the result for wv after commenting away some stuff that tcc didn't
27 want to compile, withouth caring if the result would work or not (tcc is MUCH
28 stricter ANSI-C than GCC and this is just a compiletime-benchmark;)) :
29
30 # make distclean
31 # time X=$(export CC=gcc ; ./configure ; make)
32 real 1m45.230s
33 user 1m33.243s
34 sys 0m6.521s
35
36 # make distclean
37 # time X=$(export CC=tcc ; ./configure ; make)
38 real 0m9.065s
39 user 0m5.873s
40 sys 0m2.925s
41
42 # make distclean
43 # export CC=gcc
44 # ./configure
45 # time make >/dev/null
46 real 1m41.574s
47 user 1m30.151s
48 sys 0m4.611s
49
50 # make distclean
51 # export CC=tcc
52 # ./configure
53 # time make >/dev/null
54 real 0m6.369s
55 user 0m4.578s
56 sys 0m1.450s
57
58 Still not convinced? :)
59 Here is the gexace.c-file I used as an example earlier.. Try it yourself!
60 http://www.wigren.nu/gexace.c.bz2
61
62 Get the latest tcc from http://www.tinycc.org! You'll need to add
63 #define RTLD_DEFAULT NULL
64 to the beginning of tccelf.c before compiling it with gcc 3.2.x!
65
66
67 BTW, notice the total size of the tcc archive.. 150K! :D
68
69
70 Regards,
71 Per Wigren
72
73
74 --
75 gentoo-dev@g.o mailing list