473,671 Members | 2,258 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Link Time Code Generation

Ed
Hello, dear all,
In the VS2005, Project Release Configuration, the default option of
"General | Whole Program Optimization" is "Use Link Time Code
Generation".

I find when use this option, the size of the objects and output is
vary large. The object use this option, which size is 10 times of the
one w/o it.

Is this normal?

Jul 4 '07 #1
5 3188
In article <11************ **********@j4g2 000prf.googlegr oups.com>,
Ed <se*****@gmail. comwrote:
>In the VS2005, Project Release Configuration, the default option of
"General | Whole Program Optimization" is "Use Link Time Code
Generation".
>I find when use this option, the size of the objects and output is
vary large. The object use this option, which size is 10 times of the
one w/o it.
I've found that with LTCG on, the intermediate .obj files are
larger, but the output .exe is usually about 25% smaller. This is
because some of the work is saved until the link phase, so more
intermediate information needs to be kept. LTCG costs disk space and
time, but I've found that it's worth it.

Nathan Mates

--
<*Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
Jul 4 '07 #2
Ed
On Jul 4, 12:37 pm, nat...@visi.com (Nathan Mates) wrote:
In article <1183520612.162 422.221...@j4g2 000prf.googlegr oups.com>,

Ed <seah...@gmail. comwrote:
In the VS2005, Project Release Configuration, the default option of
"General | Whole Program Optimization" is "Use Link Time Code
Generation".
I find when use this option, the size of the objects and output is
vary large. The object use this option, which size is 10 times of the
one w/o it.

I've found that with LTCG on, the intermediate .obj files are
larger, but the output .exe is usually about 25% smaller. This is
because some of the work is saved until the link phase, so more
intermediate information needs to be kept. LTCG costs disk space and
time, but I've found that it's worth it.

Nathan Mates

--
<*Nathan Mates - personal webpagehttp://www.visi.com/~nathan/
# Programmer at Pandemic Studios --http://www.pandemicstu dios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
In my test, the output is the static library, so, the linker will not
do any work to it. So my static library is very fat.
Your 25 percent smaller is compared to what?
Jul 4 '07 #3
In article <11************ **********@o11g 2000prd.googleg roups.com>,
Ed <se*****@gmail. comwrote:
> I've found that with LTCG on, the intermediate .obj files are
larger, but the output .exe is usually about 25% smaller.
>In my test, the output is the static library, so, the linker will
not do any work to it. So my static library is very fat. Your 25
percent smaller is compared to what?
The linker will do the work when it makes the final exe. My 25%
smaller is a comparison based on LTCG being on/off. I added a project
configuration-- 'Release' vs 'ReleaseLTCG'. The final exe is about 25%
smaller when LTCG is on.

Nathan Mates
--
<*Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
Jul 4 '07 #4
Ed
On Jul 4, 12:51 pm, nat...@visi.com (Nathan Mates) wrote:
In article <1183524158.251 674.284...@o11g 2000prd.googleg roups.com>,

Ed <seah...@gmail. comwrote:
I've found that with LTCG on, the intermediate .obj files are
larger, but the output .exe is usually about 25% smaller.
In my test, the output is the static library, so, the linker will
not do any work to it. So my static library is very fat. Your 25
percent smaller is compared to what?

The linker will do the work when it makes the final exe. My 25%
smaller is a comparison based on LTCG being on/off. I added a project
configuration-- 'Release' vs 'ReleaseLTCG'. The final exe is about 25%
smaller when LTCG is on.

Nathan Mates
--
<*Nathan Mates - personal webpagehttp://www.visi.com/~nathan/
# Programmer at Pandemic Studios --http://www.pandemicstu dios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
Thank you!
You also mentioned it's worth to turn it on. Have you do the
comparison to the efficiency before?
Jul 4 '07 #5
NM- [Wed, 04 Jul 2007 04:51:00 -0000]:
>configuratio n-- 'Release' vs 'ReleaseLTCG'. The final exe is about 25%
smaller when LTCG is on.
Have you used, Enable function-level linking
(Code generation)? That throws out unused
routines/segments. I can't imagine you getting
25% any other way. FLL is probably implicit
with LTCG.

--
40th Floor - Software @ http://40th.com/
iplay.40th.com iPlay advanced audio player
Jul 4 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2440
by: Rasmus Fogh | last post by:
Someone raised the question of automatic code generation a few weeks back. And yes, we (CCPN) are using automatic Python code generation in a major way. Basically we are making data models in UML, and using automatic code generation to make Python APIs, XML I/O etc. (more below). We can be found at http://www.ccpn.ac.uk/index.html As a general point, automtic code generation would seem like a good idea in special cases where:
8
5097
by: timmy_dale12 | last post by:
I need help with this one. I have a function that pastes a row. In each row i am pasting a link which is to call a date picker javascript function. This is the code that pastes the link : link = document.createElement('a'); link.href ="javascript:show_calendar('document.form1.date',document.form1.date.value);"; img = document.createElement('img'); img.setAttribute("src","H:Diverse\\cal.gif"); link.appendChild(img);
26
3840
by: Harrie | last post by:
Hi, After Brian mentioned the use for <link rel=..> for navigational purposes in another thread, I've been looking into it and found that HTML 3.2 has two other recognized link types than HTML 4.01, which are "top" and "search". I compared these two pages: http://www.w3.org/TR/REC-html32-19970114#link http://www.w3.org/TR/html4/types.html#type-links
175
8776
by: Ken Brady | last post by:
I'm on a team building some class libraries to be used by many other projects. Some members of our team insist that "All public methods should be virtual" just in case "anything needs to be changed". This is very much against my instincts. Can anyone offer some solid design guidelines for me? Thanks in advance....
14
2826
by: Steve McLellan | last post by:
Hi, Sorry to repost, but this is becoming aggravating, and causing me a lot of wasted time. I've got a reasonably large mixed C++ project, and after a number of builds (but not a constant number) linking (and sometimes compiling) becomes immensely slow, and task manager shows that link.exe (or cl.exe) is barely using any processor time, but an awful lot of RAM (around 150-200MB). I'm going to keep an eye on page faults since I can't...
4
1301
by: Scott Reynolds | last post by:
Hello! How I can calculate and display page loading/generation time? Thanks! Scott
5
1885
by: Nick Ashley | last post by:
I am wanting to include a message in the footer of my application which displays the server-side page generation time. An example of what I want is at http://p2p.wrox.com/ (This page was generated in x seconds.) I am aware that I can find this information by adding trace="true" to the page directive, but is there any way to access the information otherwise (as this is something I want incorporated into the design, not to be used for...
5
6755
by: Amoril | last post by:
I've read quite a few different message on various boards and for some reason I'm still having trouble wrapping my head around this viewstate maintenance and trying to get these dynamically created link buttons to stay wired up to their click events. I have what is basically a simply survey question generation page. The page first displays a few static fields and a dropdownlist of various options for the user to select. When the user...
3
2675
by: raghulvarma | last post by:
Consider the following scenario. Currently a .Net application is used to generate reports. The end user needs the reports twice in a day.So he runs the application at scheduled time for report generation. Now the client wants to automate this process such that the application should become a scheduled task at the desired time of the client.That is, the client need not run the application every time he needs. When the IIS starts, the application...
0
8909
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8596
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8667
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7428
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4399
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2806
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2048
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1801
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.