Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 06-15-2006, 11:31 PM   #1
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 333

Rep: Reputation: 73
Faster Linking

I'm using distcc & ccache to speed up the compilation step.

I have 20 PC's under my control....

How can I speed the link step?

Any suggestions?
Old 06-17-2006, 10:16 AM   #2
Senior Member
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
As you know, linking consists of merging two or more objects. It should follow without much discussion, then, that in order to link you must have all the objects you want to link together, and the merging of those objects must take place in the same process.

The way the GNU linker works is taking all objects and merging them in one big lump. That makes it inherently unparallelizable (which I figure is what you're looking for). However, by splitting the task up into smaller bits--e.g. linking the two smallest objects until only one remains--it becomes parallelizable, but you also do more linking than if you just link it all at once. I believe this process is what's meant by `incremential linking'.

My first intuition would be to try to link in a kind of merge-sort'ish way, but I may be way off here.

In any case, I think the way forward--assuming your final product is *one* object--is with incremential linking. Research that.

In case your final product is more than one object, you can of course parallellize by linking each object on a separate box (but I figure you don't have 20 objects). If you can't parallelize enough, again look into incremential linking.

I must admit I'm more or less pulling a brain fart out of my ass here, so please do your own research. I hope this will serve you well as a starting pointer, though.


clustering, faster, linking

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
DISCUSSION: Faster and Faster Compilation jeremy LinuxAnswers Discussion 5 12-06-2005 01:41 AM
Faster Pc ????? playstation freak Linux - Newbie 3 09-05-2005 09:26 PM
How much faster... X11 Linux - General 5 07-19-2002 06:42 AM
How much faster... X11 Linux - General 0 07-19-2002 12:51 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:21 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration