This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Set/restore rounding mode only when needed


On Wed, 5 Jun 2013, Siddhesh Poyarekar wrote:

> Hi,
> 
> The most common use case of math functions is with default rounding
> mode, i.e. rounding to nearest.  Setting and restoring rounding mode
> is an unnecessary overhead for this, so I've added support for a
> context, which does the set/restore only if the FP status needs a
> change.  The code is written such that only x86 uses these.  Other
> architectures should be unaffected by it, but would definitely benefit
> if the set/restore has as much overhead relative to the rest of the
> code, as the x86 bits do.

Could you explain further why you need new interfaces for this - why you 
can't just generally make the code setting the rounding mode (both 
internally in glibc, and the public fesetround etc.) check whether it 
would be changing anything before executing the store?

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]