title: How do the execution speeds of snprintf and strncat compare?
body: <p>I have a program which concatenates some number of strings in a buffer.</p>
  
  <p>I was using strncpy before. After looking into some suggetions on web to use snprintf instead of strncat, I switched to snprintf. However, I have noticed a delay in execution of this part of program(string concatenation) then before. Is this possible, that snprintf can slow down the program exucution speed? If not then I will look for some other factors in my program.</p>
  
  <pre><code>if(iOffset&lt;MAX_BUFF_SIZE &amp;&amp; iOffset&gt;0)
  {
    ....... 
    iOffset += snprintf(cBuff+iOffset, sizeof(cBuff)-iOffset, "%s", "String1");
    ...... 
  }
  </code></pre>
  
  <p>I repeat the above code snippet like 12 times in order to append strings to cBuff.</p>
  
  <p>Edit : It repeats 12 times after each 1 sec.</p>