Please follow the below instruction to fix the recent Windows 10 Anniversary update lag bug.
Please note that this procedure is only valid to the Windows 10 OS users and should NOT BE USED FOR ANY OTHER OS USERS.
Go to C:\Windows\SysWOW64\d3d9.dll
Change the name to d3d9_old.dll
Then replace it with the below file.
How to change name
Right mouse click on d3d9.dll and choose properties.
Click on the security tab along the top and then the advanced settings button at the bottom.
Along the top you will see "Owner" click the change button and inside the box type administrators.
Click Administrators from the list.
Click the Edit button and allow full control and click ok.
Click Apply and ok.
You will now be able to change the file name.