Those are synthetic benchmarks. The difference in application performance between the two is actually very small. In fact, there's only a 4 point difference in their Speedmark 6.5 scores (223 vs 227), and at many tasks the 21.5" 2.7GHZ is as fast or faster.
http://www.macworld.com/article/159692/2011/05/imacmid2011benchmarks.html?lsrc=top_1
😉
Haven't you wondered why the iMac 21.5" scores 223 vs the 27" 222points? 😀 ..simply because in the Speedmark bench there are 2 or 3 "tests" that use the GPU power (games FPS) and the 21.5" has less pixel to render on the monitor, remove these "GPU tests" and the 27" 2.7ghz will be faster than 21.5" and with a lot of probability faster than the 27" 3.1ghz (which use an indisputably better Graphic Card, but If you don't need it 😀 )
PS: the 2.7GHz always with 65W TDP rather than 95W TDP in the 3.1GHz 😎