473,326 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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 3175
In article <11**********************@j4g2000prf.googlegroups. 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.162422.221...@j4g2000prf.googlegroups. 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.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
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**********************@o11g2000prd.googlegroups .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.251674.284...@o11g2000prd.googlegroups .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.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
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]:
>configuration-- '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
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...
8
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 =...
26
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...
175
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...
14
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...
4
by: Scott Reynolds | last post by:
Hello! How I can calculate and display page loading/generation time? Thanks! Scott
5
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...
5
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...
3
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.