From: http://blog.chinaunix.net/u2/74100/showart_1154283.html
Difference between printf () and retailmsg ()
This printf () may be familiar to everyone, and retailmsg () is used in the embedded development of S3C2410, ARM9. it is used in the EVC operating system. When debugging information, you usually use these functions to display output information. EVC also supports both functions. However, if the system requires high real-time performance, the two functions will be very different. The time used by the printf function is much larger than that of retailmsg. The call of the printf function takes about 100 milliseconds, while the retailmsg () takes about 10 milliseconds. Therefore, in debugging of the debug version, where the output information is located, use retailmsg () to use retailmsg (); Do not use printf as much as possible; of course, in real‑version, all the functions that output debugging information should be shielded as much as possible; the method is to use # ifdef, as follows: # ifdef debug
Printf ("\ n broadcast hello ");
# Endif; [or] # ifdef debug
Retailmsg (1, (text ("receive a packet \ t \ n"); # endif; then, in the debug version, why the printf function and retailmsg () what is the difference in time ?? This question is to be studied ???????