Stored procedures and functions only get compiled the first time. Once and only once.
As far as what is fastest. Well, that really depends on a lot of factors. But I would say without out other features like caching or other mechanisms, if the procedure is about data, then a stored procedure/function will be faster than say coding it in another language.