I'm choosing between two laptops with an AMD A6-3400 and Intel Core i3 Sandy Bridge. I want to know which CPU is better with Ubuntu as in performance? Using laptop for browsing and programming.
They are nearly the same. The only thing that matters whether all the hardware is recognized by ubuntu. If you can try the laptops with a live cd, bring one, and test. Personally I think AMD did a great job with the Liano platform, it preforms better when it comes to graphics, 3D rendering, HD movies and it even has nice Turbo speeds. Also it has 4 physical cores, and Intel i3 has only 2 physical + 2 virtual (HT). So I would choose the AMD.
While I realize that I am late for the party, I am putting my 2 cents for future readers. If I was in your shoes, I would opt for the Intel Core i3 processor. Sandy Bridge has been a magnificent line of processors, all of which where great all around performers.
As for the performance of the two, it may look like the i3 is crippled with only 2 physical cores and 2 logical via Hyperthreading, however you have to note that the i3 2100 was (in many) benchmarks surpassing the amd fx 4100 performance, which is a chip from the bulldozer architecture, known to be superior to Llano architecture, unless you take into account the integrated graphics of the Llano architecture.
Some discussion on this:
I have Ubuntu 12.04 on an Intel atom netbook. If you talk about speed, don't worry because Ubuntu is perfect on every processor.
It works (very, very, very well) on my netbook, and with every hardware, webcam, all usb ports, touchpad. Even much better then with Windows 7.
If your budget is not quite small, buy a laptop, then install a Samsung SSD 125Gb (150$ max). Ubuntu at startup is a bomb on the SSD. Not talking about the speed on the programs :D