This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/81501] Unneccessary calls to __tls_get_addr() in simple thread-singleton pattern


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81501

--- Comment #1 from Julian Andres Klode <jak@jak-linux.org> ---
To qualify the performance overhead, I added empty constructors and destructors
with noinline, and compiled the code with g++ and clang++, and then ran a loop
100000000 over the function.

The clang code took 6 nanosecond, the g++ code 8 nanosecond per iteration,
that's 33% worse. I think it's probably a neglectable overhead after all, but
it seems like that would be a sensible and maybe an easy optimization to do.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]