disable threads when recompiling libc

leon zadorin leonleon77 at gmail.com
Mon Dec 21 07:45:46 UTC 2009


Hi,

is it possible to configure libc to be recompiled in a single-threaded
model only (i.e. disable any additional overhead for handling
thread-safety).

Basically what I'd like to do is to build a separate non-multithreaded
copy of libc and use it with the rest of "single threaded
environment":

recompiled gcc (./configure --disable-threads), etc.
c++ boost libs in non-multithreaded mode and so on

I would like to see if there are any additional performance-benefits
to this (my program does not need to be multi-threaded).

I think compiler itself can produce more optimisations (various
speculative loads et al) if it is building code for single-threaded
model only... I wonder if there are also "single-threaded" performance
benefits to libc et al ?


More information about the freebsd-threads mailing list