I have the exact same problem. I have a macbook pro 13 (2011) and the screen freezes every 20 seconds while the sound continues.
I tried with my girlfriends Retina 13 inch pro from this year and the result was much better however not as smooth as with the Iphone. I'm thinking that the enhanced graphical performance of the intel 4000 graphics vs. 3000 in the 2011 pro makes some difference.
I am in no way qualified to answer way the iphone gives better performance when it comes to mirroring with airplay, but I think it must be because of the different way the two platforms use airplay.
The iphone uses quicktime and streams "just" the video of your choice and does make a mirror of the iphone in the same sense.
The macbook makes a direct mirror onto the tv of everything on the macbooks screen. This might require a lot more from the computer compared to the iphone. Because the macbook is of course on all parameters much more powerful than the iphone.
It would be nice if Apple were able to make the macbook use airplay in the same, what seems to be a more efficient way, as the Iphone.
It is kind of bugging me because I have used money buying an airport express and new cables since I got the impression that this was what was causing the poor performance. But now i know that it isn't inference since:
1) of the networks I can detect, my network is the only one running 5ghz(dual).
2) my network works perfectly and has a persistently high signal.
3) since the airplay works flawlessly with the Iphone and works a lot better with a newer computer with better graphics.
I really hope Apple will address this problem.