This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Ways to fill the stack
11.02.2013, 20:28, "Ian Lance Taylor" <iant@google.com>:
> Still, you may be right that in this case it would be slightly more
> efficient to construct the local arrays using push instructions.
I did some tests for clang v 2.3 and gcc v 4.5.4 http://yadi.sk/d/_F00QtcN2YJsE
Clang uses xmm in case of small chunks and calls memcpy in case of large chunk. Most likely it is faster than push.
It does not write const string in stack, it builds the array separately and transfers address into the function.