Ways to fill the stack
sztfg@yandex.ru
sztfg@yandex.ru
Mon Feb 11 21:25:00 GMT 2013
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.
More information about the Gcc-help
mailing list