Thanks for looking at it. The code reduction is nice, 20% is big. Maybe in the future we can look at using /O1 for everything expect the files that need the performance improvements of /O2?
On Thu, Oct 2, 2008 at 11:45 AM, Søren Gjesse <[EMAIL PROTECTED]> wrote: > Using /O1 causes about 20% reduction in the size of shell.exe but it is also > about 10% slower on the V8 benchmark. Adding /Oi doesn't make much > difference. Using /O2 and /Ox together with /GL (hole program optimization) > gives the exact same size of shell.exe. /O2 it is. > /Søren > > On Thu, Oct 2, 2008 at 10:52 AM, Dean McNamee <[EMAIL PROTECTED]> wrote: >> >> Btw, I was curious, so I just looked at the difference between /O1 >> (size) and /O2 (speed) and /Ox (full) >> >> /O1 (Minimize Size) /Og /Os /Oy /Ob2 /Gs /GF /Gy >> >> /O2 (Maximize Speed) /Og /Oi /Ot /Oy /Ob2 /Gs /GF /Gy >> >> So the difference is the addition of /Oi, and /Ot. The /Oi means >> things like, you can generate rep scansb instructions instead of >> strlen, and rep movsd/movsb instead of memcpy, etc. The /Ot means >> favor speed over size. I am not so sure about that one. >> >> This is effectively the same as what we were doing with /Ox. I would >> be interesting in seeing how /O1 compares? And also the combination >> of /O1 + /Oi, which should give some good performance and a bit of >> size cost. >> >> I think theoretically what we want is /O1, or /O1 /Oi, but we'd need >> to look at the numbers of performance vs code size. >> >> Thanks >> - dean >> >> On Thu, Oct 2, 2008 at 10:44 AM, <[EMAIL PROTECTED]> wrote: >> > >> > Reviewers: Christian Plesner Hansen, >> > >> > Description: >> > Changed optimization from /Ox to the (more) commonly used /O2 (which >> > includes >> > /GF) in both SCons and Visual Studio build. There is not mesurable >> > difference >> > neither in speed nor in code size. >> > >> > Added whole program optimization to the SCons release build. This >> > clutters the >> > linking of the samples a little with the option /LTCG. This option is >> > not >> > strictly needed for linking, but if it is not specified the linker >> > complaints >> > as it can see object files compiled with /GL and then restarts itself >> > with >> > /LTCG which dosen't look very pretty. >> > >> > Please review this at http://codereview.chromium.org/5664 >> > >> > Affected files: >> > M SConstruct >> > M tools/visual_studio/release.vsprops >> > >> > >> > Index: tools/visual_studio/release.vsprops >> > =================================================================== >> > --- tools/visual_studio/release.vsprops (revision 404) >> > +++ tools/visual_studio/release.vsprops (working copy) >> > @@ -7,7 +7,7 @@ >> > <Tool >> > Name="VCCLCompilerTool" >> > RuntimeLibrary="0" >> > - Optimization="3" >> > + Optimization="2" >> > InlineFunctionExpansion="2" >> > EnableIntrinsicFunctions="true" >> > FavorSizeOrSpeed="0" >> > Index: SConstruct >> > =================================================================== >> > --- SConstruct (revision 404) >> > +++ SConstruct (working copy) >> > @@ -77,8 +77,9 @@ >> > 'LINKFLAGS': ['/DEBUG'] >> > }, >> > 'mode:release': { >> > - 'CCFLAGS': ['/Ox', '/MT', '/GF'], >> > - 'LINKFLAGS': ['/OPT:REF', '/OPT:ICF'] >> > + 'CCFLAGS': ['/O2', '/MT', '/GL'], >> > + 'LINKFLAGS': ['/OPT:REF', '/OPT:ICF', '/LTCG'], >> > + 'ARFLAGS': ['/LTCG'] >> > } >> > } >> > } >> > @@ -205,8 +206,8 @@ >> > 'LINKFLAGS': ['/MAP'] >> > }, >> > 'mode:release': { >> > - 'CCFLAGS': ['/Ox', '/MT', '/GF'], >> > - 'LINKFLAGS': ['/OPT:REF', '/OPT:ICF'] >> > + 'CCFLAGS': ['/O2', '/MT'], >> > + 'LINKFLAGS': ['/OPT:REF', '/OPT:ICF', '/LTCG'] >> > }, >> > 'mode:debug': { >> > 'CCFLAGS': ['/Od', '/MTd'], >> > >> > >> > >> > > >> > >> >> > > > > > --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---