[sldev] Processor Optimizations (Windows)

Able Whitman able.whitman at gmail.com
Tue Jun 5 23:24:33 PDT 2007


In terms of optimizations for Windows builds, Visual C++ 2005 helps somewhat
in this regard, since they have removed processor-specific optimization
options in the 2005 version of the C++ compiler:

"In Visual C++ 2005, the /G3-/G7 options have been removed in favor of a
'blended model' that generates code that works well across all of the
architectures. With no processor-specific optimization switches to worry
about, optimizations are now controlled exclusively using the /O family of
switches." (see:
http://msdn.microsoft.com/vstudio/tour/vs2005_guided_tour/VS2005pro/Framework/CPlus32BitOptimization.htm
)

This is also noted in the "Breaking Changes in the Visual C++ 2005 Compiler"
(see: http://msdn2.microsoft.com/en-us/library/ms177253(vs.80).aspx).
Although I don't believe the omission of processor-specific flags is truly a
breaking change, since the compiler just ignores them if they are present.

Also of interest to those on SLDev using the VC++ 2005 Express Edition, I
found this note in the compiler help:

"/G is available in all editions of Visual C++, but the compiler can perform
more optimizations when /G is used with one of the /O compiler options.
However, /O is not available in the Visual C++ standard edition." (see:
http://msdn2.microsoft.com/en-us/library/h66s5s0e(VS.80).aspx)

I believe this statement is in error, however, since I have the Standard
edition of VS 2005, and inspecting the generated code shows that the
compiler is respecting the various /O optimization flags. I believe this is
the case also for the Express edition, although I can't find documentation
that absolutely confirms this. The closest I can find is this statement in
the VC++ FAQ:

"Yes, Visual C++ 2005 Express Edition includes the same core optimizing
compiler that will be included with all other Visual Studio 2005 editions.
Some new expanded optimization features, including Profile Guided
Optimizations, will be available only in the Professional and above editions
of Visual Studio 2005." (see:
http://msdn.microsoft.com/vstudio/express/support/faq/#vcpp)

So I'm pretty sure that VC++ Express is only missing the profile guided
optimizations, although again, I am not completely certain.

In any case, using VC++ 2005 would allow for an optimized Windows binary
that makes use of inline expansion and other such optimzations, but which is
still not processor-specific.

--Able



On 6/6/07, James Cook <james at lindenlab.com> wrote:
>
> > I was just running around sims with all stuff enabled (I really don't
> > want to spend much time on this as it's unlikely that anything like
> > a major change in project settings will ever make it into the SL build),
>
> Don't give up on compiler options!  I would happily accept a patch that
> changed compiler optimization options, especially if there were
> benchmark results to demonstrate the benefits.
>
> Keep in mind though that we have to support many different processor and
> OS combinations.  Steve may have more recent stats on what chips our
> users are actually using, but I would be a little nervous, for example,
> deciding to drop support for PIII chips without a solid benchmark.  We
> don't really want to be doing multiple Windows builds internally.
>
> I would be curious about benchmarks where SSE code generation was turned
> on for all files.
>
> James
>
> _______________________________________________
> Click here to unsubscribe or manage your list subscription:
> /index.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/sldev/attachments/20070606/1bb53397/attachment.htm


More information about the SLDev mailing list