More reliable?
Better gas milage/safer?
One can no longer knock Hyundai, they build a good car. If I had to choose, I like the Mazda 6 styling better than the Elantra's. Gas mileage is somewhat subjective because so much depends on your club foot. lol.
I am guessing safety ratings are on par with each other. I do know Mazda has consistently high safety ratings, but I don't know if they are doing something Hyundai is not doing or don't know how. Years ago, what made Volvo stand out was the safety cage, now everybody is doing the something. Then Volvo went to a roof that couldn't be crushed so easily compared to others, plus the safety cage, then five point safety belts and so forth….ok. At some point, I am safe. When it comes to reliability here is where they part ways. You can look at Consumer Reports ratings before Hyundai built a car and see Mazda has been building the 6 for a long time. Mazda has a longer track record to argue reliability.
You are comparing cars that aren't in the same class. Mazda 3 compares to Elantra, Mazda 6 is significantly larger and compares to the Sonata. In both cases, the Mazda's are better cars to drive. They have a little bit more of an upscale feel also. Reliability, mileage, and safety are similar between brands, with the Edge to Mazda with their Skyactive technology (the 6 gets better mileage on the highway than either Hyundai), but the Hyundai's have better warranties. I have a Veloster, it's been a very reliable car for 3 years and over 50K miles.
The two cars aren't really competitors: the 6 is one size class larger. You'd cross-shop the 6 with the Sonata, the 3 with the Elantra. In either case, the Mazda is a little more amusing to drive, but the Hyundai is a good second choice, especially since Hyundai's dealer network is far more extensive than Mazda's.
2014 Mazda 6 - one of the best-looking and most enjoyable family sedans around. Mazda has cut lots of weight while strengthening the body, and with a curb weight of just 3,200 pounds the new 6 feels friskier than the output numbers suggest. It has Smooth and responsive powertrain; quick acceleration; impressive fuel economy; sporty handling; well-built interior with top-quality materials; stylish looks. Drivers of the Mazda 6 always like to point out how their cars handle like a dream, putting yet another checkmark in the vehicle's column.
Mazda 6