Re: wined3d/device: Avoid repeated calculations of idx and shift in IWineD3DDeviceImpl_MarkStateDirty(). (resend)
Adam Martinson <amartinson(a)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. -- Alexandre Julliard julliard(a)winehq.org
On 03/16/2011 08:39 AM, Alexandre Julliard wrote:
Adam Martinson<amartinson(a)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%.
participants (2)
-
Adam Martinson -
Alexandre Julliard