In C ++, the philosophy of the language has always been "you do not pay for what you do not need." If your program works with a single thread and does not require repeated functions, there is no real incentive to add -pthread.
The cost of using a reentrant function will always be higher or equal to the non-tolerant version of the function. Either on time (you need to lock the mutexes to protect variables), or allocate memory to call each function, and not use a static buffer.
, pthreads (pthreads - POSIX).