From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16932 invoked by alias); 21 Apr 2013 17:27:56 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 16909 invoked by uid 48); 21 Apr 2013 17:27:52 -0000 From: "ondra at iuuk dot mff.cuni.cz" To: glibc-bugs@sourceware.org Subject: [Bug math/15384] One constant fewer in ieee754/dbl-64/wordsize-64/s_finite.c Date: Sun, 21 Apr 2013 17:27:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: math X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ondra at iuuk dot mff.cuni.cz X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: ondra at iuuk dot mff.cuni.cz X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg00127.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15384 --- Comment #7 from OndrejBilka 2013-04-21 17:27:51 UTC --- Created attachment 6995 --> http://sourceware.org/bugzilla/attachment.cgi?id=6995 benchmark for inlines I updated your benchmark. Use for i in `seq 0 7`; do echo finite$i; gcc test.c -O3 -Wall -W -fno-builtin-finite -Dfinite=finite$i; for j in `seq 1 8`; do /usr/bin/time -f "%U" ./a.out; done; done which works in bash. > and your new code does not appear to beat the old one in speed (for size, the > non-null version looks great). Interestingly, __builtin_finite wins this test, > although you can feed it a denormal if you want to beat it. This depends on platform and benchmark. Performance of noninlined function does not make lot of sense because gcc inlines them all. This was partly reason I optimize for size. As I bet that 99% of use cases are something like if (isfinite(x)) stuff() else error(); I added benchmark for testing a branch. Then my modified versions seem to win. on nehalem Last implementation correctly computed 1 for infinite values and 0 otherwise. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.