Compensators on pistols generally don't reduce recoil or muzzle flip.
On the other hand, muzzle brakes do.
A "compensator" is usually a series of vent ports in the top of the barrel, near the muzzle, to direct propellant gases upward in attempt to create a retro-jet effect that pushes the muzzle downward.
A "muzzle brake" has a flat surface forward of the muzzle that, after the bullet passes through, propellant gases impinge upon to "pull" the pistol forward. Muzzle brakes are easily recognized by large open vent ports on the muzzle side of the flat surface.
Cheers!