I'm playing with the same config, at least as far as GPU in the iMac goes. Core i5 2.66 on the CPU side. What settings are you using to get 20-40fps in full screen? I get nowhere near that and currently play at 720p in a window.
I can PM you the specifics if you want, but my first suggestion is that you simply compare your fps between 1280x720 windowed, and 2560x1440 full screen. I suspect the difference will be negligeable. And if so, look for the culprit outside of graphics settings.
{ To try to provide you with better data, I went to the village of Shaemoor and entered Divinity Reach. From where you end up when entering, (Plaza of Dwayna) I have 26 fps.
There are a number of settings, but a neat feature is that they get applied in realtime, so you can see the effect from the fps counter in lower right hand corner of the overlaid settings panel.
None of the setting affect my fps much. In fact, if I go down to 1280x720 (full screen or windowed) I still get no more than 29-30 fps, and incidentally this is exactly the same as my fps when I do the reverse experiment, and go from Divinity Reach to face the vista of Shaemoor.
It seems to be largely system limited rather than GPU limited.
I have a 2.8GHz core i7, with 16GB of 1333MHz memory.
GW doesn't require tons of memory (1.38GB atm, I have it in the background as I type) so unless you have a ton of other cruft going you should be fine there. Memory speed is a factor, but couldn't do more than 25% maximum between us and that's the upper bound. The only reason I can see for your fps to be significantly lower than mine is if you have background tasks running that draw a lot of resources. My fps only increased by a single fps when I shot down 2GB worth of safari + app store + iTunes running at the same time. You'll have to experiment. I have shadows on low (don't care about them much) and post-processing low because I find DoF effects obnoxious. Other settings are decent to high.}
Edit: I run OSX 10.8.2. Drivers could of course be an issue as well.