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] Improves __ieee754_exp() performance by greater than 5x on sparc/x86.


On Monday 16 October 2017 10:26 PM, Patrick McGehearty wrote:
> The extreme max times for the old (ieee754) exp are due to the
> multiprecision computation in the old algorithm when the true value is
> very near 0.5 ulp away from an value representable in double
> precision. The new algorithm does not take special measures for those
> cases. The current glibc exp perf tests overrepresent those values.
> Informal testing suggests approximately one in 200 cases might
> invoke the high cost computation. The performance advantage of the new
> algorithm for other values is still large but not as large as indicated
> by the chart above.

The inputs were curated such that the multiple precision ones were
weeded out into separate tests to avoid seeing such deviations.  This
was based on the premise that the result precision for these inputs
would be consistent (not necessarily the same) across platforms but that
doesn't seem to be the case and some inputs seem to have sneaked in.

On a related note, if we are comfortable dropping exp slow path, we
should probably take a serious look at the log slow path too since IIRC
I wasn't even able to trigger it after days of running the test and it's
quite possible that nobody cares.  We could drop it and see if anybody
notices.

Siddhesh


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