I voted for the Mazda 3 because I've driven the 3 and the Cobalt (which is the same as the G5) and the 3 is a lot better, IMO.
However, as I always recommend, get out there, test drive as many cars as you can, and make your own decision. Everyone has a different body type, driving style, likes, dislikes, etc. so the car I like best won't necessarily be the car you like best.