Have you noticed a lag in the speed at which your iPhone 3G or 3Gs loads SMS text messages or web browser pages?
Remember that your iPhone is basically a small computer, it runs an operating system just like Windows XP or Mac OS X. And just like those systems, there are background tasks running that may slow down the performance of your iPhone. So in order to speed up your iPhone, you should properly quit the applications that you are not using.
Important note (common misconception):
When you press the ‘Home’ button on the front of the iPod Touch, you are not quitting the application. You are simply closing it, but the application is still open and running in the background.
Suppose you open a game that you downloaded or an application on your iPhone that constantly updates via the internet. But you don’t use that application often. Then it is smart to quit those applications so it is not hogging the bandwidth (speed) of your iPhone in the background.
So, in order to properly quit these applications on iPhone 3G or 3Gs, perform the following steps:
1. Open the application that you wish to quit by pressing its button on the home screen.
2. Once the app opens, hold the power button (on the top of the iPhone) until the ‘Slide to Power Off’ with a red button shows up.
3. Then let go of the power button and press and hold the ‘Home’ button on the front-bottom of the iPhone.
4. When the interface returns to the home screen, you have successfully quit the application.
Perform steps 1-4 on any applications that you don’t use often. This will speed up the performance of your iPhone.
Bonus: Clear the cache of your Safari browser regularly by doing the following:
Home Screen > Settings > Safari > Clear Cache
This will help speed up the performance of Safari when surfing the web.
Source: http://geekwhat.com/2009/09/14/how-to-speed-up-iphone-3g-or-3gs/