From patchwork Mon May 3 08:44:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Noah Goldstein X-Patchwork-Id: 43205 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 496CA3898521; Mon, 3 May 2021 08:45:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 496CA3898521 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1620031539; bh=dnmUg4hj1uHdE/Ms6ATbXwrhqJX/0fTvtdAlhjUkDqA=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=bbQkHE6JXYRnbvSNcaFDJdxzoIyEyoWungReKMSBqtQOXELRBOHVJ/e2+OXgd1vW8 5relYWfkN3mH3Cp5MbMeI5soa9MXghKrXcEUKUBNPtX8mUqhss7ZI/nhU254h8jZeZ PA4q2JlrwEfGXv7/LweeMAvRWqYMGr9AUK7W9OsA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) by sourceware.org (Postfix) with ESMTPS id D6826385DC33 for ; Mon, 3 May 2021 08:45:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D6826385DC33 Received: by mail-qk1-x72c.google.com with SMTP id 197so4014985qkl.12 for ; Mon, 03 May 2021 01:45:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dnmUg4hj1uHdE/Ms6ATbXwrhqJX/0fTvtdAlhjUkDqA=; b=BeuBfmRZQ+jBfxrf3mlIKBKPX+aN36ce6hOcmhxFL5Vy8hNHIGm5de/O+CHasEoWjL cDp6Z7Uv3b+BmPVdudLIelwfPSFcWAWS5AWJ1zoyqiINZNjZXsYi5UZVpe9enrbRYobV Qj4UMZRqidnsB1oGKA3Yhk7sZCG4+5WI4jMG1oeB71W3ZqfWmXBliWiEm3oNIsLFYDXQ 1ZLDHbHXADvcAHaoQrMp16EiYxPAyb0IjlBV+sx7oydmy7h5GsxehKzrQXNvM2vIIE50 yx98mjrPdBNUOGx5Qs/QNLDj80lRFxR3hVSN+AosHQ0rsqSlTg+JjnaFoGd5EiW+2qno ENkg== X-Gm-Message-State: AOAM531o/lwkuPLBIPz+Ay5MVKQGkd9zdTsuGsiQRsdSiO6vYVTlaBX+ WhB4jQCeNVCXlw+P5yOx5KUxHN6OoPQ= X-Google-Smtp-Source: ABdhPJyP1JKxtauc+oOdyrGtNwz8vIZ7nzaD80IG4RJEmxKqmG1Kw/bv7vhqsHys6hHO/KI2kgxaVQ== X-Received: by 2002:a37:ba83:: with SMTP id k125mr17812373qkf.336.1620031536165; Mon, 03 May 2021 01:45:36 -0700 (PDT) Received: from localhost.localdomain (pool-71-245-178-39.pitbpa.fios.verizon.net. [71.245.178.39]) by smtp.googlemail.com with ESMTPSA id a3sm7954970qto.2.2021.05.03.01.45.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 01:45:35 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH v1 1/3] Bench: Expand bench-memchr.c Date: Mon, 3 May 2021 04:44:35 -0400 Message-Id: <20210503084435.160548-1-goldstein.w.n@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Noah Goldstein via Libc-alpha From: Noah Goldstein Reply-To: Noah Goldstein Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" No bug. This commit adds some additional cases for bench-memchr.c including testing medium sizes and testing short length with both an inbound match and out of bound match. Signed-off-by: Noah Goldstein --- benchtests/bench-memchr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/benchtests/bench-memchr.c b/benchtests/bench-memchr.c index f5ced9d80d..5573f93312 100644 --- a/benchtests/bench-memchr.c +++ b/benchtests/bench-memchr.c @@ -135,12 +135,25 @@ test_main (void) do_test (i, i, 256, 0); #endif } + for (i = 1; i < 8; ++i) + { + do_test (i, i << 5, 192, 23); + do_test (i, i << 5, 192, 0); + do_test (i, i << 5, 256, 23); + do_test (i, i << 5, 256, 0); + do_test (i, i << 5, 512, 23); + do_test (i, i << 5, 512, 0); + } for (i = 1; i < 32; ++i) { do_test (0, i, i + 1, 23); do_test (0, i, i + 1, 0); do_test (i, i, i + 1, 23); do_test (i, i, i + 1, 0); + do_test (0, i, i - 1, 23); + do_test (0, i, i - 1, 0); + do_test (i, i, i - 1, 23); + do_test (i, i, i - 1, 0); #ifdef USE_AS_MEMRCHR /* Also test the position close to the beginning for memrchr. */ do_test (0, 1, i + 1, 23);