|
|
|
|
|
by moonchild
1283 days ago
|
|
I would like such a refutation, notionally. I do not particularly like this refutation, considering that it is just as overabstracted, and probably not much faster (if at all). What I would really like is to see more widespread hoisting of dispatch. Rather than calling 'memcpy', call 'memcpy_small', 'memcpy8', etc. |
|
The GNU way of using a huge, branchy assembly block that is selected at runtime using ifunc means that the compiler never even got a chance.
Regarding the question of whether or not they are faster, see section 4.4 of this paper. Replacing the glibc memcmp with something trivial resulted in up to 1% speedup in Google web search, when considering the whole program. It doesn't microbenchmark as well as glibc memcmp, but it is a better function that doesn't wreck the performance of the rest of the system.
https://storage.googleapis.com/pub-tools-public-publication-...