No brainer. You already had a 335, get an E46 M3.
I went from a E92 335 to an E46 M3 before getting the E92 M3. I didnt regret it one bit. If you are looking to have the NEW car and the easy to tune for straightaway speed, get a 335.
If thats not a concern to you, get an M3. The two cars are close to eachother with straightaway speeds. But, you will not get the same thrill from a 335 that you will from an M3.
So, what are you looking for... Stats or Feel? Because when you push the two, the rush and feel of the E46 M3 is not debatable.