PS3 by a long margin.
3DS doesn't have competition, PS3 had the Xbox360 that launched a year earlier and the Wii that took the world by storm, PS3 was sold at a loss so it was difficult to lower the astronomical price of $599, at least for a while. Besides, MS did everything to kill the PS3 by taking away a lot of exclusives, the only one (of the big ones) that stayed was Metal Gear Solid 4, a lot of people that watched E3 2008 declared that PS3 was doomed after the so called "MEGATON" from Don Mattrick and Yoichi Wada (the FF13 announcement), Sony had the worst 3 years ever before rising again with the Slim, new campaign ads (whoever came up with Kevin Butler is just a genius), a flood of 1st party titles, focusing on different markets (not just USA and Japan), i mean, they did everything in their power to survive this gen, and they went from distant 3rd place to 2nd place, beating the 360 in every market (except USA and UK i believe), and beating the Wii in Europe (or at least they're in the way to do that), no console ever had this turn of events...
The 3DS only had 2 problems: No games at launch and high price, nothing that they couldn't fix in a finger snap, and the PSVita is doing nothing to stop it, like MS did with Sony last gen...