I gave this a try because my iPhone 4 is slower than my 3GS with a wifi connection. It seemed to help so I figured I'd pass this find along.
Every time you visit a website, your computer performs a DNS lookup. Complex pages often require multiple DNS lookups before they start loading.
So your computer or iPhone browser may be performing hundreds of lookups a day. By using Google Public DNS you can Speed up your browsing experience and improve your security.
To use this we'll have to change your wifi connections DNS number. But before we do that let's save your current DNS number so you can change it back if you want to.
Go to settings then Wifi.
Tap the blue arrow next to the wifi connection you're using.
Scroll down and copy your DNS number to your clip board.
Then past it in a your notes. This is just so you can change the DNS number back if you want to later. So what I'm about to have you try is reversible. So no worries. :)
Before we make the change. Go to a couple of website and note how fast they load. Then compare it to how fast they'll load after you set it to google DNS.
Now go back to the wifi setting and change the DNS number to this. 220.127.116.11, 18.104.22.168 it must be exact. Notice there's a comma then a space in the center.
Once you have changed this setting, you can safely go back to the previous screen and press the Home button. It may vary on the speed increase. But I do notice a difference when pages load.
Now browse some websites. See if you notice any speed increase. Let me know how it turns out for you. You can read more about the google DNS online.