16.67 ms, and where it goes
At 60 fps the game has 16.67 milliseconds to finish each frame, and input, game logic, physics and rendering all share that time. A frame that takes longer misses the screen refresh, and the player sees a stutter. Measure how long each system takes and fix the largest one first, like the physics spikes that push frames over the red line here.
Before optimising, time input, update, physics and render every frame with performance.now(), show each one in milliseconds against the 16.67 ms budget for 60 fps, and optimise the largest one first.