GCC compiles a lot slower than it should


 
Thread Tools Search this Thread
Operating Systems Linux GCC compiles a lot slower than it should
# 1  
Old 07-23-2010
GCC compiles a lot slower than it should

Hello everyone, i'm having a problem compiling an application i'm developing.
For a month, while developing, i did lots of compilations to test it. While compiling, i noticed gcc did it pretty slow, but gave it no importance.
I'm using ubuntu 10.04 32bits, and my pc has:
- Dual core intel 2.66ghz processor.
- 4GB ram DDR2 800mhz.
- 320GB disk, 7200 RPM.
However, a week ago, i tried compiling the same application in a notebook, running fedora 11 32bits, with the following hardware:
- Dual core intel 1.66ghz processor.
- 2GB ram DDR2 667mhz.

When i compiled the application, i noticed gcc did WAY faster. So i started comparing, and saw my ubuntu did a clean compile in 56 seconds, while fedora did it in 10. After seeing this, i began testing the compilation with only 1 source file. I noticed that, while fedora did it slow the first time(1.8 seconds), the rest of the times it did it in 0.192, this is due to disk cache probably. Now in ubuntu, compilation takes always 1.8 seconds. So i'm starting to think it's caused by some cache malfunction. However, i've tested the disk with hdparm, and got a much better throughput in ubuntu(as it should be). Also, ubuntu works well, i can't notice this problem except for gcc.

The application uses Qt4, in ubuntu i'm using version 4.6.2, while on fedora it's 4.6.3. Ubuntu'sw gcc is version 4.4.3, and fedora's is 4.4.1. I noticed while using strace, that 4.4.3 does 2 vforks, while 4.4.1 does only 1, so i guess there was an important change in those versions, but i can't seem to find a reason why a PC should do it 10 times slower than a slower one.

I'm appreciating any help, since i really want to fix this(possibly not reinstalling my whole O.S.).

Thanks!
# 2  
Old 07-23-2010
Can you bring gcc on Fedora up to 4.4.3 and compare the results?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Job Run Slower using Autosys than running through terminal

Hi All, We run Many jobs evryday using Autosys. Sometimes due to various reason we got to run the job from terminal as well (using nohup). We observed that the job running through terminal(nohup) takes much less time then the autosys (for same job). What can be the possible reason for such... (1 Reply)
Discussion started by: kg_gaurav
1 Replies

2. UNIX for Dummies Questions & Answers

how the operating system compiles c programs at the time of booting.

unix and linux does not makes executable files for all the programs. it compiles it and executes it whenever require. at the time of booting the system, how kernel compiles those c programs without "gcc". (1 Reply)
Discussion started by: anandgodse
1 Replies

3. UNIX for Advanced & Expert Users

Why is cut slower than awk?

Hi all, for test reasons I tried the following two one-liners: time awk '{print $4}' T_64xSC_128RW_K500.dat > /dev/nulland time cut -d" " -f6 T_64xSC_128RW_K500.dat > /dev/nullThe file contains approx. 250k lines. awk does it in 0.15 secs (real), cut in 0.44. The user time has about the... (3 Replies)
Discussion started by: BandGap
3 Replies

4. Programming

File compiles but produces Memory fault when executed

I run the following K$ cc -v dtfn.c -o dtfn Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking... (3 Replies)
Discussion started by: sewood
3 Replies

5. Solaris

Installing gcc - recieve error message gcc : cannot execute

AIM- Install Oracle 11g on Solaris using VMWare Steps 1.Logged on as root 2.Created subfolders à /usr/local/bin & /usr/local/bin/gcc 3.Downloaded gcc & libiconv & unzipped them on my harddrive & burnt them on CD 4.Copied files from CD to /usr/local/bin/gcc 5.Terminal (root) à pkgadd -d... (8 Replies)
Discussion started by: Ackers
8 Replies

6. Linux

Details about the way 'gcc' compiles,links and loads?

Hi all, Can any body provide me with a link that gives the core details of the three processes(given below) in concern with 'gcc'? 1)Compiling 2)Linking 3)Loading (1 Reply)
Discussion started by: me_himanshu
1 Replies

7. Solaris

Why is restore slower than backup?

After my big disaster, I'm restoring from tape on my Sun box. This is the second time I've used 'ufsrestore' with this DEC TZ88 SCSI DLT drive. The last time was for a migration from one box to another. Both the last time and this time, the restore has taken a hell of a lot longer than the... (4 Replies)
Discussion started by: deckard
4 Replies

8. UNIX for Advanced & Expert Users

TCP/IP Connection getting slower...

Hi, We have developed a server program using TCP/IP Communication to communicate with another client program. After running for some days we find the TCP/IP connection from the server program is getting slower. What i mean to say is since the send() function in the server program (it is... (2 Replies)
Discussion started by: rajesh_puru
2 Replies

9. Programming

TCP/IP send getting slower

Hi, We have developed a server program using TCP/IP Communication to communicate with another client program. After running for some days we find the TCP/IP connection from the server program is getting slower ie, the messages are not send quickly to the client. What i mean to say is since the... (0 Replies)
Discussion started by: rajesh_puru
0 Replies

10. UNIX for Dummies Questions & Answers

Slower slower dead

I am running RH 7.1 and i am always remotely logged in working on a database. I got php and mysql running and then as the each week goes my rsh, or secure telnet, and any other remote session slows to become extremly choppy. If i am at teh box my i am fine the computer is not bogged down at all,... (5 Replies)
Discussion started by: macdonto
5 Replies
Login or Register to Ask a Question