public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@redhat.com>
To: Will Hawkins <whh8b@virginia.edu>, libc-help@sourceware.org
Subject: Re: Question about the highly optimized aspects of libc implementation
Date: Thu, 30 Nov 2017 06:56:00 -0000	[thread overview]
Message-ID: <20aa9deb-0a4a-91bd-fff2-79fda3a91752@redhat.com> (raw)
In-Reply-To: <CAE+MWFsT5vu4yW0zDKgyinZky=2s-i2wzK7N-fnKuQP0kGQ_Bw@mail.gmail.com>

On 11/29/2017 10:47 PM, Will Hawkins wrote:
> I've been digging through the glibc implementation and looking for
> examples of where compiler directives or hand-written assembly have
> been used to improve performance at the "expense" of standards or
> conventions.

Let me address the "standards" side of this...

No such thing exists and has a public interface that conforming programs
can call. Such things may exist internal to glibc, but then we have
control over the API/ABI and can do what we want.

We have some functions which have standards for them, but for which
we don't follow the standard because Linux did it one way and
that's the only supportable way e.g. group scheduling etc.

Let me address the "conventions" side of this...

The entire math library has "cheats" which would be assembly implementations
that have lower accuracy bounds. We have generally tended to remove these
since we want a certain uniform level of accuracy for all the math functions
where possible. One example was the removal of x86 sincos hardware support
for the generic sin/cos support because the x86 hardware version is not
accurate enough (poor range reduction).

Does that answer your question?

-- 
Cheers,
Carlos.

  parent reply	other threads:[~2017-11-30  6:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-30  6:48 Will Hawkins
2017-11-30  6:54 ` Siddhesh Poyarekar
2017-11-30  8:22   ` Florian Weimer
2017-11-30  6:56 ` Carlos O'Donell [this message]
2017-11-30  7:00   ` Will Hawkins
2017-11-30  8:36 ` Florian Weimer
2017-12-04  1:15   ` Will Hawkins
2017-12-04  8:12     ` Siddhesh Poyarekar
2017-12-04 12:15     ` Florian Weimer

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=20aa9deb-0a4a-91bd-fff2-79fda3a91752@redhat.com \
    --to=carlos@redhat.com \
    --cc=libc-help@sourceware.org \
    --cc=whh8b@virginia.edu \
    /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).