There are different methods to print a string. printf(3) is often used to do this. But, it is also often misused. There are many articles that prefer the use of printf("%s", str); over printf(str); because of format string attacks. The graph below shows a benchmark of all three alternatives.

printf benchmark graph