lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] MinGW-w64 gcc-6.3.0 std::rint() anomaly


From: Greg Chicares
Subject: Re: [lmi] MinGW-w64 gcc-6.3.0 std::rint() anomaly
Date: Wed, 23 Aug 2017 23:54:09 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 2017-08-23 18:59, Greg Chicares wrote:
[...]
> Let's use this command:
>   /opt/lmi/src/lmi[0]$time make $coefficiency system_test >../log 2>&1
> to measure lmi's speed: three runs one way versus three the other way.

Let's use a different command:
  time for x in 0 1 2 3 4 5 6 7 8 9; do wine 
/opt/lmi/src/build/lmi/Linux/gcc/ship/round_to_test.exe -a; done | grep system
and see whether results are comparable.

> WITH the new gcc '-fno-rounding-math' default:
> 
> make $coefficiency system_test > ../log 2>&1  124.43s user 49.21s system 586% 
> cpu 29.618 total
> make $coefficiency system_test > ../log 2>&1  123.50s user 50.56s system 584% 
> cpu 29.780 total
> make $coefficiency system_test > ../log 2>&1  124.07s user 49.38s system 588% 
> cpu 29.479 total

0.00s user 0.00s system 0% cpu 0.626 total
0.00s user 0.00s system 0% cpu 0.638 total
0.00s user 0.00s system 0% cpu 0.645 total
0.00s user 0.00s system 0% cpu 0.645 total
0.00s user 0.00s system 0% cpu 0.624 total

> OVERRIDING that new default with '-frounding-math':
> 
> make $coefficiency system_test > ../log 2>&1  125.26s user 49.99s system 595% 
> cpu 29.430 total
> make $coefficiency system_test > ../log 2>&1  125.90s user 50.12s system 598% 
> cpu 29.425 total
> make $coefficiency system_test > ../log 2>&1  126.02s user 50.36s system 593% 
> cpu 29.706 total

0.00s user 0.00s system 0% cpu 0.637 total
0.00s user 0.00s system 0% cpu 0.617 total
0.00s user 0.00s system 0% cpu 0.614 total
0.00s user 0.00s system 0% cpu 0.620 total
0.00s user 0.00s system 0% cpu 0.630 total

> I don't believe that the cost of conforming to the C, C++, and IEEE754
> standards is actually negative, but this evidence suggests that it is
> at worst too small to measure with this test, and therefore too small
> to matter.

This alternative test suggests the same conclusion. And the overall
effect in lmi can hardly be greater, because lmi uses std::rint()
only in 'round_to.cpp', and this unit test exercises round_to<>()
more intensively than lmi itself does.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]