Here is a comparison chart between the E4500 (close to the E4400) and the E8400:http://www.anandtech.com/bench/default.aspx?p=56&p2=65
The E8400 is about 50 percent better than the E4500 on average. This is a substantial boost in performance.
The i3-540 has not been out very long so there is not a lot of benchmark data available. However, I would expect the i3 to outperform the E8400 because of its newer architecture, but they should be close.
However, you are really comparing apples and oranges when you compare the i3 to the E4400. These processors operate on different motherboard chipsets, and you cannot plug an i3 processor into a E4400 motherboard. You would have to buy a new motherboard, and most likely memory to use the i3 processor.
If you are looking to upgrade your gaming performance, oftentimes you get a much better performance boost by upgrading your graphics card rather than the processor.
Good luck with your decisions.