They're blindingly different guns, so it's hard to really make a fair comparison. The only thing they have in common
Polaris is used for aoe damage, knockbacks, shock spreading, turret silencing, trolling and panic-run-away-ing.
AP is used for precision damage and dps (although note that AP is not the best gun for high dps).
The same applies for "overall". The main thing to note is that swordies do like AP as a sidearm for its ease of use and quick firing, but its damage/asi takes a kicking, whereas polaris can be used by anyone, anywhere for any reason, ever.