Files
semi-libc/src/math/i386
Rich Felker baa43bca0a optimize scalbn family
the fscale instruction is slow everywhere, probably because it
involves a costly and unnecessary integer truncation operation that
ends up being a no-op in common usages. instead, construct a floating
point scale value with integer arithmetic and simply multiply by it,
when possible.

for float and double, this is always possible by going to the
next-larger type. we use some cheap but effective saturating
arithmetic tricks to make sure even very large-magnitude exponents
fit. for long double, if the scaling exponent is too large to fit in
the exponent of a long double value, we simply fallback to the
expensive fscale method.

on atom cpu, these changes speed up scalbn by over 30%. (min rdtsc
timing dropped from 110 cycles to 70 cycles.)
2012-03-20 00:51:32 -04:00
..
2012-03-19 04:56:07 -04:00
2012-03-19 04:56:07 -04:00
2012-03-19 04:56:07 -04:00
2012-03-19 04:56:07 -04:00
2012-03-19 04:56:07 -04:00
2012-03-19 04:56:07 -04:00
2012-03-19 04:56:07 -04:00
2012-03-19 04:56:07 -04:00
2012-03-19 04:56:07 -04:00
2012-03-19 04:56:07 -04:00
2012-03-19 04:56:07 -04:00
2012-03-19 05:42:04 -04:00
2012-03-19 05:42:04 -04:00
2012-03-19 05:42:04 -04:00
2012-03-18 21:43:43 -04:00
2012-03-18 21:43:43 -04:00
2012-03-18 21:43:43 -04:00
2012-03-19 21:55:53 -04:00
2012-03-18 21:43:43 -04:00
2012-03-18 21:43:43 -04:00
2012-03-19 09:00:30 -04:00
2012-03-18 21:43:43 -04:00
2012-03-18 21:43:43 -04:00
2012-03-19 05:42:04 -04:00
2012-03-19 05:42:04 -04:00
2012-03-19 05:42:04 -04:00
2012-03-19 05:15:30 -04:00
2012-03-19 05:15:30 -04:00
2012-03-19 05:15:30 -04:00
2012-03-18 22:05:20 -04:00
2012-03-19 10:59:41 -04:00
2012-03-19 10:59:41 -04:00
2012-03-19 10:59:41 -04:00
2012-03-19 10:43:28 -04:00
2012-03-19 10:43:28 -04:00
2012-03-19 10:43:28 -04:00
2012-03-18 23:50:54 -04:00
2012-03-18 23:50:54 -04:00
2012-03-18 23:50:54 -04:00
2012-03-18 23:50:54 -04:00
2012-03-18 23:50:54 -04:00
2012-03-18 23:50:54 -04:00
2012-03-18 22:05:20 -04:00
2012-03-18 22:05:20 -04:00
2012-03-18 22:05:20 -04:00
2012-03-19 06:22:54 -04:00
2012-03-19 06:22:54 -04:00
2012-03-19 06:22:54 -04:00
2012-03-19 09:42:51 -04:00
2012-03-19 09:42:51 -04:00
2012-03-19 05:15:30 -04:00
2012-03-19 05:15:30 -04:00
2012-03-19 05:15:30 -04:00
2012-03-20 00:51:32 -04:00
2012-03-20 00:51:32 -04:00
2012-03-20 00:51:32 -04:00
2012-03-13 01:17:53 -04:00
2012-03-19 05:42:04 -04:00
2012-03-19 05:42:04 -04:00
2012-03-19 05:42:04 -04:00