15MP on 50D & 10MP on the 40D
ISO expansion is higher in 50D
50D is Compact Flash UDMA compatible, which means it accepts the new faster CF cards, but the 40D does fine without this.
Both shoot about the same burst rate, 40D 6.5 fps 50D 6.3 fps
Both have a huge buffer
The 50D is the upgrade of the 40D so it's obviously the more powerful camera,