Differences between research in private labs and university (computer science)
Salary: Private labs will 90% of the time pay more (with slight variances when comparing small companies and large university labs). 

Freedom: Unfortunately freedom isn't vary high no matter where you UNTIL you become well-established. At Universities, you have to research where you can get grants and people won't give grants unless they like what you propose. Companies obviously need you to be doing research that is their best profit interest. When you get well-established some universities and companies will want you so much that they will give you the liberty to do what you want because of how successful you have proven to be. This doesn't happen very often.

Competition: They are about the same actually. A renown university like Carnegie Mellon is just as competitive as places like Apple and Google. 

Stability: Typically, companies are more known to give out longer contract agreements, so even if your project fails, you are guaranteed to be moved around to other research areas. Sometimes at Universities, if the project you are working on tanks, there goes your grant and sometimes there is no where else to transfer to.