First of all.. I wouldn't pay 47k for any used e46 m3.. Find some better deals, there are some good finds for under 25kmiles that are under 40k. You have to really dig for them though.
Anyways, If it was a week ago, I would have said a E46 M3 before I test drove once again (My best friend had a e46 m3 that i drove on a weekly basis before he sold it about half a year ago). Take the 335. Its newer, much more refined, better engineering and technology. Bottom line, its newer, more recent which means better thoughts have gone into every aspect of the car (assuming that bmw hails their 3-series as one of the most important models).
Either way though, drive one for yourself and make your decision. I can't really see you dispointed in each. They're both seriously nice cars
Peanut Butter Chunky