I can confirm what exq0867 is saying. I ran an "update" on my iphone 3g and it slowed way down. It bogged down constantly. I was still usable, but not at all pleasant, since it use to be much snappier. I read a few placed to try and "restore" my phone, and it worked. Now I don't notice much difference between 3.1.3 and 4.0. 4.0 is probably still a little bit slower due to the increase in the operating system size, but not enough to notice and cause great aggregation.
I was skeptical at first since I thought that an update basically did the same thing as a restore on the iphone, but apparently not. My only guess is that an update works somethings like a linux update where some libraries and other system files that are shared are left, unneeded ones are deleted, and new ones are put on, leaving the operating system bloated. A "Restore" completely cleans off the iphone, and installs only the new operating system leaving only what was designed to be there instead of a merging of two operating systems. Then you can use a backup to put all of your music, apps, etc back just as they were. The concept of how apple does their updates sounds a little sketchy to me (and I'm the one who wrote it, but its my only guess), but fact stands; my iphone was much faster after a "restore" compared to the "update."