Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > Re: Compilation...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 16 Topic 9546 of 9807
Post > Topic >>

Re: Compilation speedup trick: any side-effects?

by Maciej Sobczak <see.my.homepage@[EMAIL PROTECTED] > Apr 25, 2008 at 05:13 PM

On 25 Kwi, 19:13, bor...@[EMAIL PROTECTED]
 wrote:

> The question is: once it compiled successfully (no duplicate
> definitions etc)

The problem is that it does not have to compile successfully in this
context - the unnamed namespaces will effectively get merged and the
objects with internal linkage will see each other as well. This can
lead to conflicts that might not have existed with separate
translation units.

> There is one issue I already can think of: the order of the execution
> of constructors of static objects (like global variables).

This is not an issue - on the contrary, the order will get fixed by
the algorithm that you use in your script to order C++ files for
concatenation. This is better (more control) than what the standard
guarantees for separate translation units.

In any case, your trick has natural limitation in terms of scalability
- the compiler has to crunch N times more source text at a time than
normally. Look around for bigger hardware.

--
Maciej Sobczak * www.msobczak.com * www.inspirel.com

-- 
      [ See http://www.gotw.ca/resources/clcm.htm
for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
 




 16 Posts in Topic:
Compilation speedup trick: any side-effects?
borphi@[EMAIL PROTECTED]   2008-04-25 11:13:19 
Re: Compilation speedup trick: any side-effects?
rado <rgetov@[EMAIL PR  2008-04-25 15:49:57 
Re: Compilation speedup trick: any side-effects?
Francis Glassborow <fr  2008-04-25 16:13:19 
Re: Compilation speedup trick: any side-effects?
Davis King <davis685@[  2008-04-25 16:17:05 
Re: Compilation speedup trick: any side-effects?
Brendan <catphive@[EMA  2008-04-25 16:13:20 
Re: Compilation speedup trick: any side-effects?
Maciej Sobczak <see.my  2008-04-25 17:13:19 
Re: Compilation speedup trick: any side-effects?
Mathias Gaunard <loufo  2008-04-26 03:33:38 
Re: Compilation speedup trick: any side-effects?
Carl Barron <cbarron41  2008-04-26 03:34:04 
Re: Compilation speedup trick: any side-effects?
"borphi@[EMAIL PROTE  2008-04-26 09:43:22 
Re: Compilation speedup trick: any side-effects?
Francis Glassborow <fr  2008-04-26 16:28:03 
Re: Compilation speedup trick: any side-effects?
Francis Glassborow <fr  2008-04-26 16:27:40 
Re: Compilation speedup trick: any side-effects?
mlag.ng@[EMAIL PROTECTED]  2008-04-27 07:12:05 
Re: Compilation speedup trick: any side-effects?
Mathias Gaunard <loufo  2008-04-27 07:29:16 
Re: Compilation speedup trick: any side-effects?
Andre Poenitz <poenitz  2008-04-27 15:45:41 
Re: Compilation speedup trick: any side-effects?
Francis Glassborow <fr  2008-04-28 16:03:16 
Re: Compilation speedup trick: any side-effects?
Peter Holtwick <borphi  2008-04-29 10:43:23 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 19 19:57:31 CDT 2008.