In this paper we analyze the performance of some popular algorithms used to solve distributed optimization problems involving quadratic cost functions in a multi agent system. Namely, we study the performance of standard consensus, accelerated consensus and ADMM. We analyze the scalar quadratic function case, under different scenarios and with structured graphs. We find that accelerated consensus is the algorithm with the best performance in all the cases analyzed. On the other hand, ADMM has performance comparable to the accelerated consensus when the graph is scarcely connected, while for dense graphs its performance deteriorates and becomes worse than the one of standard consensus. The results therefore suggest that the choice of the algorithm to solve the problem we analyze strongly depends on the graph, and that accelerated consensus should always be preferred.