Re: wined3d/device: Avoid repeated calculations of idx and shift in IWineD3DDeviceImpl_MarkStateDirty(). (resend)
On 03/16/2011 08:39 AM, Alexandre Julliard wrote: Adam Martinsonamartin...@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%.
Re: wined3d/device: Avoid repeated calculations of idx and shift in IWineD3DDeviceImpl_MarkStateDirty(). (resend)
On 03/16/2011 02:24 PM, Alexandre Julliard wrote: Adam Martinsonamartin...@codeweavers.com writes: 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%. What compiler are you using? I don't see any difference here. GCC 4.4.5, running the 3DMark06 batch size tests.
Re: wined3d/device: Avoid repeated calculations of idx and shift in IWineD3DDeviceImpl_MarkStateDirty(). (resend)
On 03/16/2011 02:55 PM, Alexandre Julliard wrote: Adam Martinsonamartin...@codeweavers.com writes: On 03/16/2011 02:24 PM, Alexandre Julliard wrote: Adam Martinsonamartin...@codeweavers.com writes: 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%. What compiler are you using? I don't see any difference here. GCC 4.4.5, running the 3DMark06 batch size tests. I don't see any difference with 4.4.5 either, the generated code is basically identical. If gcc really doesn't notice the loop invariant for you, something is wrong with your setup. Oh wow... you're correct, I'm retarded xD I have another patch that overwrites these changes, and didn't bench them separately LOL xD Very sorry!
Re: wined3d/device: Avoid repeated calculations of idx and shift in IWineD3DDeviceImpl_MarkStateDirty(). (resend)
Adam Martinson amartin...@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 julli...@winehq.org
Re: wined3d/device: Avoid repeated calculations of idx and shift in IWineD3DDeviceImpl_MarkStateDirty(). (resend)
Adam Martinson amartin...@codeweavers.com writes: On 03/16/2011 02:24 PM, Alexandre Julliard wrote: Adam Martinsonamartin...@codeweavers.com writes: 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%. What compiler are you using? I don't see any difference here. GCC 4.4.5, running the 3DMark06 batch size tests. I don't see any difference with 4.4.5 either, the generated code is basically identical. If gcc really doesn't notice the loop invariant for you, something is wrong with your setup. -- Alexandre Julliard julli...@winehq.org