There are many things in After Effects that depend on single core processing. Therefore, the 3.4 GHz iMac would clearly blow away the 2.66 GHz Mac Pro.
Info on making AE run better is here: http://blogs.adobe.com/aftereffects/2011/02/optimizing-for-performance-adobe-premiere-pro- and-after-effects.html
http://bit.ly/hvsX8SThere is some great info there. If you really want to know about how to make AE run better, that set of resources is invaluable.
Now, the future version of AE that is coming may change all of that. A majority of the AE team is dedicated to re-writing AE's core to make it more responsive and faster in general. This may make a computer with more cores perform better. We'll just have to wait and see. (And I'm very excited about seeing it when it comes.)
And yet, I am embarrassed that my computer, which essentially has to run faster than iMac in practice can not do this