[opensource-dev] Compiler optimizations on Viewer and LLKDU

Zabb65 zabb65 at gmail.com
Thu Sep 9 14:41:38 PDT 2010


KDU automatically detects and uses cpu optimization if its available.
The only compiler options I'm aware of are those that enable or
disable threading of decoding, which I suspect won't be of much
benefit for the type of images uses in SL(small and fast to decode).
Compiling the base code with optimizations for CPU instruction
sets(SSE,etc) might help slightly, but the results would be minimal.

In the long ago days of Emerald, compiler optimizations were evil, and
caused obscure bugs that were hard to find, most of them would show up
on linux and mac, but there were some on windows too, related to using
SSE2 instruction sets that would cause the builds to crash at random.
At the time, I think LL has managed to balance optimization flags with
stability, It might be wise to leave what is known to work alone, save
there is enough manpower and time to extensively test the use of new
instruction sets across a great number of machine setups.

In the testing that was done internally for Emerald, results were
rather surprising, using SSE2 either causing a major slowdown and
choppy behavior for the client on some setups, or the results were
between 3 and 8% frame rate increase for a test scene. The major
improvement that I remember was in avatar rendering time, as well the
rebuilding of face geometry, where it could take advantage of doing
multiple things at once. None of the testing done was terribly
organized or reliable though, so I hope somebody else can set up some
tests and compare this a bit more accurately.

Summary: Might want to leave this as is, for stability, because the
gains are either negative, or small enough that its not worth the
possible losses.


More information about the opensource-dev mailing list