public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Wilco Dijkstra <Wilco.Dijkstra@arm.com>,
	Szabolcs Nagy <Szabolcs.Nagy@arm.com>,
	Joseph Myers <joseph@codesourcery.com>,
	"libc-alpha@sourceware.org" <libc-alpha@sourceware.org>
Cc: nd <nd@arm.com>
Subject: Re: Improving math function wrappers
Date: Thu, 16 Mar 2017 21:22:00 -0000	[thread overview]
Message-ID: <3623011d-1a3a-c499-6b42-1d5506c6a71a@redhat.com> (raw)
In-Reply-To: <AM5PR0802MB261064538EBF55E8B7CF1F7783260@AM5PR0802MB2610.eurprd08.prod.outlook.com>

On 03/16/2017 02:52 PM, Wilco Dijkstra wrote:
> While the wrappers may be bypassed when building with -Ofast, this uses C header
> magic (ie. it doesn't work in languages other than C and C++). Given other languages
> don't even have the concept of errno, C99 doesn't require it, and no application ever
> reads errno, it is inefficient to force the use of the wrappers in almost all cases.

What's the expensive part?  Computing what errno value to set, or 
obtaining the location of errno?

We have recently removed the PID cache from the TCB.  We could store the 
errno value there, instead of going through __errno_location.  (Code 
outside glibc would still use __errno_location, of course.)

Florian

  parent reply	other threads:[~2017-03-16 21:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AM5PR0802MB2610AA7EDC518B39F6D7152683260@AM5PR0802MB2610.eurprd08.prod.outlook.com>
2017-03-16 13:53 ` Wilco Dijkstra
2017-03-16 14:39   ` Joseph Myers
2017-03-16 14:41     ` Joseph Myers
2017-03-16 18:07     ` Szabolcs Nagy
2017-03-16 18:24       ` Joseph Myers
2017-04-04 17:25         ` Szabolcs Nagy
2017-04-04 17:34           ` Joseph Myers
2017-04-07 15:54           ` Szabolcs Nagy
2017-04-04 17:41         ` Zack Weinberg
2017-03-16 21:22   ` Florian Weimer [this message]
2017-03-16 21:36     ` Joseph Myers
2017-03-16 22:49       ` Wilco Dijkstra

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=3623011d-1a3a-c499-6b42-1d5506c6a71a@redhat.com \
    --to=fweimer@redhat.com \
    --cc=Szabolcs.Nagy@arm.com \
    --cc=Wilco.Dijkstra@arm.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=nd@arm.com \
    /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).