public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: dumblob <dumblob@gmail.com>
To: libc-help@sourceware.org
Subject: glibc pthreads and optimized locks
Date: Mon, 7 Jun 2021 15:30:30 +0200	[thread overview]
Message-ID: <CAGnk-Z-U4oOmAcn=UfuS7mZ-cebnVQnkFjmQKzicZLAHNHf0TA@mail.gmail.com> (raw)

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

             reply	other threads:[~2021-06-07 13:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 13:30 dumblob [this message]
2021-06-07 21:53 ` Adhemerval Zanella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGnk-Z-U4oOmAcn=UfuS7mZ-cebnVQnkFjmQKzicZLAHNHf0TA@mail.gmail.com' \
    --to=dumblob@gmail.com \
    --cc=libc-help@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).