[PATCH 11/20] alpha: add assembly mempcpy sharing the ev6 memcpy
Wilco Dijkstra <[email protected]>
| Newsgroups | gmane.comp.lib.glibc.alpha |
|---|---|
| Message-ID | <PAWPR08MB8982FB47E308FED93EBAADC783DB2@PAWPR08MB8982.eurprd08.prod.outlook.com> |
Hi, > Do we really need to essentially duplicate the memcpy code for this optimization? > The alpha ABI cost us a bit more instruction for the function call (compare to > aarch64 for instance), but it does cost a lot less i-cache. > > The aarch64 uses the generic mempcpy.c and it seems not be a problem. It's not an optimization, in general it makes things worse (either slowing down a shared implementation or wasting L1 cache space for separate implementations). For this reason both GCC and LLVM optimize mempcpy into memcpy. Hence optimizing a mempcpy is completely missing the point since it will never be called. That's why the C version is fine. Cheers, Wilco