wined3d/device: Avoid repeated calculations of idx and shift in IWineD3DDeviceImpl_MarkStateDirty(). (resend)

Adam Martinson amartinson at codeweavers.com
Wed Mar 16 13:37:10 CDT 2011


On 03/16/2011 08:39 AM, Alexandre Julliard wrote:
> Adam Martinson<amartinson at codeweavers.com>  writes:
>
>> ---
>>   dlls/wined3d/device.c |   17 ++++++++---------
>>   1 files changed, 8 insertions(+), 9 deletions(-)
> You still need to demonstrate that this is an improvement. Compilers are
> pretty good nowadays, and doing such micro-optimizations at the source
> level is usually futile.
>
Look at any d3d app with oprofile.  That function is called EVERYWHERE. 
  In my testing this reduces IWineD3DDeviceImpl_MarkStateDirty() from 
4.8% of wined3d CPU time to 3.3%.



More information about the wine-devel mailing list