well i dont have any idea cannon has smaller range, is destroing against swarms BUT it can't attack air units and got small damage. a lvl 5+ of this can stop easly a group of starlinators. BUT because of his low damage a tank unit (execpt for strike who fust run int the base and raider who don't attack it) can defeat it.
but sniper got a faster firing rate more range, more damage attack both units but is so weak against swarms... even there is a compactt house lvl 8-9 protecting a lvl 5 of this 35 super marines can broke the house get is and destroy the snipers. BUT their high damage and firing rate, if protected by a building with much health can easly stop colossus.
wath is better for you????