It has a very slight lead. In real world, there will not be a significant difference. I have seen some videos of people significantly overclocking their iMac's 680mx and maintaining stability, but I haven't tried it myself.The main difference between the computers will be what hard drive you go with. The 2013 model has PCIE flash storage, which will be faster than the 2012 model, if you go that route instead of a platter hard drive. I would invest in a fusion drive at the very least in either model. The performance on both machines will be about a wash, although the power consumption on the 2013 model will be lower than the 2012 model for the same performance if that matters to you. They are very similar computers.
TL;DR: The only differences will be the haswell cpu(about equal performance with less electricity), PCIE flash if you get a SSD(faster boot and general performance), and updated graphics(the 680mx is really powerful though). I would go with whichever one is cheaper, but that is just my opinion, and there may be other differences I am not aware of. Graphics should not be your determining factor for either model though.