Good news, everyone! The software update that was "coming soon" to resolve iOS 4.0's terrible performance on the iPhone 3G has gone "gold master" (GM) and should be available to the general public next week. I've had the opportunity to test this update out on my wife's iPhone 3G, and I'm happy to report that it does indeed appear to resolve all the stuttering, crashing, and generalized slowness the iPhone 3G was suffering under even previous beta builds of iOS 4.1.
I tested her iPhone 3G out under the iOS 4.1 GM by doing things that would have brought her iPhone to a standstill before. First, I started a playlist in the iPod app and let it play in the background. Then I went into Safari, where she had four "tabs" open, and navigated to an image-heavy page.
Normally just loading such a page would have caused the background music from iPod.app to start stuttering, but even though I started scrolling back and forth through the page before all images finished loading, I couldn't get Safari to freeze or iPod.app to stutter.
Next, I loaded up the Maps app and started navigating along an input route with music still playing in the background. This was a guaranteed way to bring her iPhone 3G to a screeching halt before, but no matter how much demand I placed on the iPhone, it took it like a champ. I tested Google Earth's app as well, and it was far more responsive than I've ever seen it in iOS 4.
I'm not sure what under-the-hood changes Apple made to get iOS 4 running on the iPhone 3G at an acceptable speed (finally), but I did notice one thing: Spotlight Search on the iPhone 3G no longer searches through text messages. I verified this by comparing the Spotlight settings side-by-side with my iPhone 4; "Messages" was missing as an option on the iPhone 3G. On previous iOS 4 builds, one of the most popular suggestions for improving iPhone 3G performance was disabling Spotlight, so maybe that was the problem all along.
Your mileage certainly may vary, but for at least one iPhone 3G, iOS 4.1's gold master release has finally made the phone just as responsive and useful as it was before iOS 4. And there was much rejoicing.