TITLE: REP STRING IDENTIFICATION
REP strings are the common name given to instructions that contain the rep prefix. The most typical usage is a “rep mov” to inline a memcpy or a “rep sto” in inline a memset.
REP strings are relevant for all architectures on all OS’s. REP strings are often the most efficient way to accomplish a memcpy or memset operation. The Atom architecture on cores codenamed Bonnell, Silverthorne or Saltwell are an exception where there are usually more efficient ways to accomplish a memcpy or memset.
On Atom architecture (codenamed Bonnell, Silverthorne or Saltwell), the best methodology is to utilize a more efficient implementation for memcpy/memset. The Intel compiler comes with optimized implementations and the libraries used in glibc 2.12.1 (and on) are optimized.