updated 12:30 pm EDT, Wed July 7, 2010
Nexus One trumps iPhone 4 in some web tests
Apple's mobile version of Safari has often been touted as the fastest, but the loss of a speed edge has been credited largely to an upgrade of the rendering engine in Android, which as of 2.2 uses the same Chrome engine as the desktop. The OS itself has a slew of extra upgrades as it now has a just-in-time compiler and other optimizations that speed up apps on the same hardware.
Hardware may not necessarily be a factor. Apple hasn't detailed the clock speed of the A4 in the iPhone 4, but any drop below the Nexus One's 1GHz may be offset by the significantly newer, faster graphics core. Both phones have 512MB of RAM.
The speed may only apply to a pure install of Android 2.2, as Flash 10 bogs it down to where a previous-generation iPhone 3GS with 3.x firmware is noticeably faster.