Lead compensator vs lag compensator?
$$ H(s) = {K*\frac{s-z}{s-p}}\\
\\
$$

when |z| &lt; |p|, you have a lead compensator. It adds phase between a certain band, and can help you improve your phase margin. It can also increase your bandwidth. You typically use it to improve your transient as you mentionned. You can think of it as a PD controller cascaded with a low-pass filter. The gain K is optional, but if you set it to $\frac{p}{z}$, the DC gain is 1 which is usefull if you cascade the lead compensator to an existing controller.

I actually never used a PID with a pure derivative in real-life. I have always used a PI controller cascaded with a lead compensator, which is almost the same as a PID but as the advantage of limiting the high-frequency gain, thus improving stability at high frequencies.

When |z| > |p|, you have a lag compensator, which is almost the same as a PI controller. However, you won't have an infinite DC gain. Think of it as a PI controller with a soft reset. I have also seen the term "leaky integrator" used. It could be useful as an alternative to a PI to prevent integrator windup, or if you want a PI controller with a soft reset to slowly reset the integrator.

I have never really used one in real-life. Because, I use appropriate anti-windup strategies. And in the few cases where I needed a "soft reset" for my integrator (for a PLL), I implemented a conditional soft-reset that was only enabled in certain conditions.

If I have time, I will add the Bode plots of both.