public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* glibc pthreads and optimized locks
@ 2021-06-07 13:30 dumblob
  2021-06-07 21:53 ` Adhemerval Zanella
  0 siblings, 1 reply; 2+ messages in thread
From: dumblob @ 2021-06-07 13:30 UTC (permalink / raw)
  To: libc-help

Dear glibc experts,

Does anybody know whether glibc pthreads implement the fast lock
algorithms as https://github.com/AlexeyAB/object_threadsafe does?

A detailed description of these algorithms is in
https://www.codeproject.com/Articles/1183423/We-Make-a-std-shared-mutex-10-Times-Faster
and some more optimizations in
https://www.codeproject.com/Articles/1183446/Thread-safe-std-map-with-the-speed-of-lock-free-ma
. Btw. I'm aware these articles discuss C++, but the same principles
apply to locks in C.

I'm asking because pthreads are known to be rather slower in general
and if such optimized variants of locks are not implemented, I'll
propose implementing them in few specific apps which would benefit
from the optimizations (e.g. the main implementation of the V
language).

Thanks,

dumblob

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-07 21:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07 13:30 glibc pthreads and optimized locks dumblob
2021-06-07 21:53 ` Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).