From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by sourceware.org (Postfix) with ESMTPS id A9CE23858C53 for ; Thu, 25 Jan 2024 12:07:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A9CE23858C53 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A9CE23858C53 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::233 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706184465; cv=none; b=I+cCpD9kq6RPMfHspCJ6OvKCWLlBQruT+LZUj4c/eMsJj8LELHIWMTS9a/+muvjPrTtZit0K64inNnPx1ffzk9mAT/jtAe92LG+ipKHFBKN2QpxN1FKqr+8K9T7yvGv2zSBmo8dYIBipJ+VxcP/xJGqil/K9e1Sev9OYu34m/1w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706184465; c=relaxed/simple; bh=O/W/NVjtntoTiyzcrhcWYpiViNjQPH2xCB6HzM+fRgQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=ajqNdU0TNtsD2iO4KolOkCIt6Nes36q6N7hMSeZYhm4mWUzGrOxSoqeKGoOD9u8xaYL1Bxqff+MzmjVI1R8tRfQXv8WG4ZFHsivtqEBDtTvqnZJSf3y9YVXd72uUaUBPj2r0klBuQ0nV5jcLDgmnrKJm9ADRsJZCugBixG8UTHM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-3bba50cd318so6088247b6e.0 for ; Thu, 25 Jan 2024 04:07:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706184461; x=1706789261; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=SivB91kQGPdr+sdc+6lPXVQSRhd3AzdKgv8xEYsFAwo=; b=wQTr9W8KeUHU9GxLPywrrPUwyXX7sv2LPJawdukMBAwlGqCuZvV+qXhPnxZx+cD6Vw n7myNVPSn/gd8JOAgiD/3894OLLWz6VJNJQ32+wtMyWXZ+YrGJEM6/UcyNEi/k0DwaWL KFGjAMx9UOls3shz5+EmZVXX7uKlNAJ4RJtu+++mYvAus8a548tQG1osPpMRHHYDMFbN Uco6MYgujdWcCZViUW7VuZfqE6/QoOzuhKR7Pw/jtOf1ElNDYaUhu9+8NSD8qo1uAp/V 1HqkmCkd3v+XtKE3YqNd65EewpHiph4Y9EBzEFI+43TRibCLekTtEfmItn1YvYg35K+M 6TMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706184461; x=1706789261; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SivB91kQGPdr+sdc+6lPXVQSRhd3AzdKgv8xEYsFAwo=; b=C5wCr5tKTSbjAF5NYppQ6R42b1sXRwoFjQ9PNJJJn9EsfTnN38XoFJnYLJsrqqyzoF 9HMRrAifbnWQeTnTGgLb56srL9AwhS4SZv/+ClKK4cyc4jgdBDkVI1VQzKN+PBguux+Y 8cjowMVJRUaizvoJLUN31ry47Buz3hyYlnoA/hM9D9F40FkQjbBQgZO4mRYkb6Jhg35I /2JOcyyor+m7ojNJokjkvCV89ZjOZCmT1UIRhS7S4bJeOXSBD9bUb8zOgEkIAoy487m+ L0BD9RXTnwaGSkJQxZnu0hdwtUfF4GJhzdew5bJGKYop5Af4A7sugSb+iuxYrc6LMDoX lScg== X-Gm-Message-State: AOJu0YygcHg8b1y8Jqhf4MF4nTyoTsn7SaTVmRqT17P4OlEc/4C/3AJh WLYyKRYHoIYvnO3tqZqKUyw6iJ4u/JmQX2V0A1E/RbitQBkh1Tb5x2L4/UF76DsmTUPKW5b7Hhe 7 X-Google-Smtp-Source: AGHT+IFOIIf79EVL3HWrrF85yBs1W5qpxaJSczcuaV14tTzGIBFZ97F5KMHppBCUVv0XCIxHM2raNA== X-Received: by 2002:a05:6808:bc8:b0:3bd:dc4a:11e6 with SMTP id o8-20020a0568080bc800b003bddc4a11e6mr765779oik.60.1706184460940; Thu, 25 Jan 2024 04:07:40 -0800 (PST) Received: from ?IPV6:2804:1b3:a7c2:c10c:844b:51b3:3dbb:a3d3? ([2804:1b3:a7c2:c10c:844b:51b3:3dbb:a3d3]) by smtp.gmail.com with ESMTPSA id i18-20020aa79092000000b006d9a7a48bbesm15582689pfa.116.2024.01.25.04.07.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jan 2024 04:07:40 -0800 (PST) Message-ID: Date: Thu, 25 Jan 2024 09:07:38 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] benchtests: Add more benchtests for rounding functions. To: Junxian Zhu , libc-alpha@sourceware.org References: <20240122021619.941-1-zhujunxian@oss.cipunited.com> Content-Language: en-US From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20240122021619.941-1-zhujunxian@oss.cipunited.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 21/01/24 23:16, Junxian Zhu wrote: > From: Junxian Zhu > > This patch adds more benchtests for rounding functions. > The double inputs are copied from trunc-inputs, the float inputs are copied from truncf-inputs. and the rintf is copied from rint-inputs. LGTM, thanks. Reviewed-by: Adhemerval Zanella > --- > benchtests/Makefile | 11 +++++++++++ > benchtests/ceil-inputs | 22 ++++++++++++++++++++++ > benchtests/ceilf-inputs | 21 +++++++++++++++++++++ > benchtests/floor-inputs | 22 ++++++++++++++++++++++ > benchtests/floorf-inputs | 21 +++++++++++++++++++++ > benchtests/llrint-inputs | 22 ++++++++++++++++++++++ > benchtests/llrintf-inputs | 21 +++++++++++++++++++++ > benchtests/lrint-inputs | 22 ++++++++++++++++++++++ > benchtests/lrintf-inputs | 21 +++++++++++++++++++++ > benchtests/nearbyint-inputs | 22 ++++++++++++++++++++++ > benchtests/nearbyintf-inputs | 21 +++++++++++++++++++++ > benchtests/rintf-inputs | 7 +++++++ > 12 files changed, 233 insertions(+) > create mode 100644 benchtests/ceil-inputs > create mode 100644 benchtests/ceilf-inputs > create mode 100644 benchtests/floor-inputs > create mode 100644 benchtests/floorf-inputs > create mode 100644 benchtests/llrint-inputs > create mode 100644 benchtests/llrintf-inputs > create mode 100644 benchtests/lrint-inputs > create mode 100644 benchtests/lrintf-inputs > create mode 100644 benchtests/nearbyint-inputs > create mode 100644 benchtests/nearbyintf-inputs > create mode 100644 benchtests/rintf-inputs > > diff --git a/benchtests/Makefile b/benchtests/Makefile > index 4fb9bae023..05b8751c55 100644 > --- a/benchtests/Makefile > +++ b/benchtests/Makefile > @@ -32,6 +32,8 @@ bench-math := \ > atan2 \ > atanh \ > cbrt \ > + ceil \ > + ceilf \ > cos \ > cosf \ > cosh \ > @@ -44,6 +46,8 @@ bench-math := \ > exp2f \ > expf \ > expm1 \ > + floor \ > + floorf \ > fmax \ > fmaxf \ > fmin \ > @@ -60,6 +64,8 @@ bench-math := \ > j0 \ > j1 \ > lgamma \ > + llrint \ > + llrintf \ > log \ > log10 \ > log1p \ > @@ -68,10 +74,15 @@ bench-math := \ > logb \ > logbf \ > logf \ > + lrint \ > + lrintf \ > modf \ > + nearbyint \ > + nearbyintf \ > pow \ > powf \ > rint \ > + rintf \ > roundeven \ > roundevenf \ > sin \ > diff --git a/benchtests/ceil-inputs b/benchtests/ceil-inputs > new file mode 100644 > index 0000000000..49ff407a6a > --- /dev/null > +++ b/benchtests/ceil-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/ceilf-inputs b/benchtests/ceilf-inputs > new file mode 100644 > index 0000000000..c37c5dacba > --- /dev/null > +++ b/benchtests/ceilf-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 > diff --git a/benchtests/floor-inputs b/benchtests/floor-inputs > new file mode 100644 > index 0000000000..49ff407a6a > --- /dev/null > +++ b/benchtests/floor-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/floorf-inputs b/benchtests/floorf-inputs > new file mode 100644 > index 0000000000..c37c5dacba > --- /dev/null > +++ b/benchtests/floorf-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 > diff --git a/benchtests/llrint-inputs b/benchtests/llrint-inputs > new file mode 100644 > index 0000000000..49ff407a6a > --- /dev/null > +++ b/benchtests/llrint-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/llrintf-inputs b/benchtests/llrintf-inputs > new file mode 100644 > index 0000000000..c37c5dacba > --- /dev/null > +++ b/benchtests/llrintf-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 > diff --git a/benchtests/lrint-inputs b/benchtests/lrint-inputs > new file mode 100644 > index 0000000000..49ff407a6a > --- /dev/null > +++ b/benchtests/lrint-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/lrintf-inputs b/benchtests/lrintf-inputs > new file mode 100644 > index 0000000000..c37c5dacba > --- /dev/null > +++ b/benchtests/lrintf-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 > diff --git a/benchtests/nearbyint-inputs b/benchtests/nearbyint-inputs > new file mode 100644 > index 0000000000..49ff407a6a > --- /dev/null > +++ b/benchtests/nearbyint-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/nearbyintf-inputs b/benchtests/nearbyintf-inputs > new file mode 100644 > index 0000000000..c37c5dacba > --- /dev/null > +++ b/benchtests/nearbyintf-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 > diff --git a/benchtests/rintf-inputs b/benchtests/rintf-inputs > new file mode 100644 > index 0000000000..f7c6f06789 > --- /dev/null > +++ b/benchtests/rintf-inputs > @@ -0,0 +1,7 @@ > +## args: float > +## ret: float > +## includes: math.h > +78.5 > +-78.5 > +4503599627370497.0 > +-4503599627370497.0