How fast is accessing a thread local variables in Linux. From the code generated by the gcc compiler, I can see that is uses the fs
segment register. So apparently, the access to the thread local variable should not cost extra cycles.
However, I keep on reading horror stories about the slowness of thread local variable access. How come? Sure, sometimes different compilers use a different approach than using fs
segment register, but is accessing thread local variable through fs
segment register slow too?