Minecraft causes an update to the currently displayed menu/game every time it detects the cursor updated, so if you use a high poll rate mouse, it causes a lot of updates, each time forcing a function to be run. This lags the game significantly, so I'd recommend using a lower poll rate on Minecraft.
EDIT: I've figured out that this issue occurs any time my mouse cursor is moving rapidly when over Minecraft, which includes playing the game, the inventory or the pause menu. As soon as the cursor is not over Minecraft (such as on a separate monitor, or the task bar or title bar) the fps is stable and high. Upon trying a different mouse, the issue is gone. So the issue is with the Logitech Gaming software. If anyone else has a similar issue, I recommend experimenting with any mouse drivers.
Reading: how to fix mouse lag in minecraft
The issue seems to be my 1000Hz poll rate. Halving that to 500Hz mostly fixed the issue, but I still noticed some lag, so I dropped it to 333Hz, and the issue is gone altogether.
Maybe a month ago, my mouse started going crazy in Minecraft. It was only in Minecraft, and occurred whether I was using mods, or using a completely brand new installation of Minecraft. Yesterday I completely wiped my hard drive and reinstalled Windows and Minecraft, it was fine for a day, but today the issue started occurring again.
View more: SCP-343 – God (SCP Animation)
Here's some videos of the issue occurring across versions and modded and vanilla.
17w50a (Latest Snapshot at Time of Posting)
1.10.2 Modded (Project Ozone Lite)
As you can see at the end of the modded video, I'm smoothly moving my mouse side to side, however it periodically does little jumps. Especially around 20 seconds, the effect is very noticeable. I am definitely moving my mouse smoothly, and at the end, I open the chat box to show that the cursor does move smoothly.
This issue occurs on all installations of Minecraft, whether they are vanilla or not.
Initially, I was able to solve the issue by getting my own installation of Java, 8u151 and using that instead of the outdated version included, and this worked for a month or so, but the issue started occurring, so I reinstalled Windows, and it was fine, but the problem came back. I am using 8u152 after reinstalling Windows. This issue is completely isolated to Minecraft, and affects both the current and old versions as well as the new Snapshot that uses the latest LWJGL. However, in the snapshots, rather than jerky camera movements, I get extreme, unplayable lag when moving, down to 0fps, but the fps returns when standing still. Any idea what may be causing this issue? I can't seem to solve it. It will be fixed for some time, maybe a month, maybe 10 minutes, then it comes back again.
Sorry this might be a bit confusing, it's late..