From patchwork Mon Sep 18 23:20:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 22927 Received: (qmail 30094 invoked by alias); 18 Sep 2017 23:20:12 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 30080 invoked by uid 89); 18 Sep 2017 23:20:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=0999, representative X-HELO: relay1.mentorg.com Date: Mon, 18 Sep 2017 23:20:02 +0000 From: Joseph Myers To: Subject: Add benchtests for trunc and truncf Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) This patch adds benchtests for the trunc and truncf functions. The inputs listed are fairly arbitrary; I do not assert they are representative of any particular application. 2017-09-18 Joseph Myers * benchtests/Makefile (bench-math): Add trunc and truncf. (CFLAGS-bench-trunc.c): New variable. (CFLAGS-bench-truncf.c): Likewise. * benchtests/trunc-inputs: New file. * benchtests/truncf-inputs: Likewise. diff --git a/benchtests/Makefile b/benchtests/Makefile index a0c3470..886ec58 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -23,7 +23,7 @@ subdir := benchtests include ../Makeconfig bench-math := acos acosh asin asinh atan atanh cos cosh exp exp2 log log2 \ modf pow rint sin sincos sinh sqrt tan tanh fmin fmax fminf \ - fmaxf powf + fmaxf powf trunc truncf bench-pthread := pthread_once thread_create @@ -76,6 +76,8 @@ CFLAGS-bench-fmin.c += -fno-builtin CFLAGS-bench-fminf.c += -fno-builtin CFLAGS-bench-fmax.c += -fno-builtin CFLAGS-bench-fmaxf.c += -fno-builtin +CFLAGS-bench-trunc.c += -fno-builtin +CFLAGS-bench-truncf.c += -fno-builtin bench-malloc := malloc-thread diff --git a/benchtests/trunc-inputs b/benchtests/trunc-inputs new file mode 100644 index 0000000..49ff407 --- /dev/null +++ b/benchtests/trunc-inputs @@ -0,0 +1,22 @@ +## args: double +## ret: double +## includes: math.h +0.0 +-0.0 +0.001 +-0.001 +0.5 +-0.5 +0.999 +-0.999 +1.0 +-1.0 +1.001 +-1.001 +123.5 +-123.5 +12345.1 +-1000000.1 +1e15 +-1e30 +1e200 diff --git a/benchtests/truncf-inputs b/benchtests/truncf-inputs new file mode 100644 index 0000000..c37c5da --- /dev/null +++ b/benchtests/truncf-inputs @@ -0,0 +1,21 @@ +## args: float +## ret: float +## includes: math.h +0.0f +-0.0f +0.001f +-0.001f +0.5f +-0.5f +0.999f +-0.999f +1.0f +-1.0f +1.001f +-1.001f +123.5f +-123.5f +12345.1f +-1000000.5f +1e15f +-1e30f