jseigh
2024-11-22 12:42:54 UTC
Apparently class type thread_local variable with are initialized
dynamically, not at load time. This means every time the
thread_local variable is accessed, the code checks to see if
the variable needs initialization. This doesn't appear to be
the case for native types.
This caused the c++ version of smrproxy to go from about
0.6 nanoseconds for a lock()/unlock() operation in c to
about 3.2 nanoseconds.
Joe Seigh
dynamically, not at load time. This means every time the
thread_local variable is accessed, the code checks to see if
the variable needs initialization. This doesn't appear to be
the case for native types.
This caused the c++ version of smrproxy to go from about
0.6 nanoseconds for a lock()/unlock() operation in c to
about 3.2 nanoseconds.
Joe Seigh