Thanks for your question. The first thing to say would be that the main improvement maybe explained by the raw convertion.
So if you compare RGB picture made by the final canon ISP versus the RGB picture made by the 6 years old canon ISP available on the 40D there will be more than 2 or 3 stops of difference…
But if you are only checking RAW measurement, differences are not so huge.
Here is the comparison Canon EOS 40D vs Canon EOS 70D vs Nikon D7100: http://www.dxomark.com/Cameras/Compare-Camera-Sensors/Compare-cameras-side-by-side/%28appareil1%29/895
The difference is more close to 1/3 of Stop : the sensor of the D7100 is close to 1/3 Stop better than the 70D sensor which is around 1/3 of a stop better.
The DxOMark team