From owner-dev-commits-src-all@freebsd.org Mon Feb 8 23:13:20 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 25BD65457C7 for ; Mon, 8 Feb 2021 23:13:20 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DZMJc0QVNz3J6w for ; Mon, 8 Feb 2021 23:13:19 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: by mail-yb1-xb2f.google.com with SMTP id 133so3624160ybd.5 for ; Mon, 08 Feb 2021 15:13:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dtqMVTHuWRHAqa5igx+7KUMxAugygD6giRPjnLurKrs=; b=YpunP0Z5P6KGYIJeY/udor51yvgbGS8x5WQa4TzOPY/zeAwtBGta6p7i2LpIts5REj RQkRiyRYipywbufv+Gxuvb5xVMG11UkY44fORPJIbCsjCrcWEioFuhdBnKCz8oTG3hsb Dl195sEBK16rILJRJCg+mllSCUpdyKTNuAri0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dtqMVTHuWRHAqa5igx+7KUMxAugygD6giRPjnLurKrs=; b=s7PCbz5ZxhnwGqE2FctpPPORTZqBzJCNjWM+zxRS9jP81h7t7qHowXVHmvWQToTgzs cKklXBvxEXLSK87bdZhJ2H2oEEo6pPrps7dKIRr8Mn5tUtD6CmTzc5z/pNZf2Wb5O0Y/ FkSSINLHcmfuKFIY4vn/Knb9Yt1JP4jC02oIa71shjayaASKvmyxstFfK9qu4hPOz4SR BXGbXYhWB7SDDggxr8t838qp+5qF8vYw3RcsOOwz7JPkRU1VcFEsRccMaIDSIwIOSqSj 2tscgHjNon6sHxkwQq0a/GmKlNk0k1aKHyQ+UIFqZsZediXvNl9Azkfp4i0Upc4JmDbm GWww== X-Gm-Message-State: AOAM532dEtyLVletHrqMkD5m/667LOHF/mwwu2+bk+W2Fg1G3s8M3Q3r 7fMma0xZQDUix1rZqowNXFGXqP+zDC9X2l7ujqIpAQ== X-Google-Smtp-Source: ABdhPJztm59NWBttU3jOstBzSK0WaOi5dttUFKysUZW0IEUBGlrdkHwE6SuTNrcJSuEGAjkYE9gR42oLD7OVmnuoX9c= X-Received: by 2002:a25:7453:: with SMTP id p80mr28199124ybc.297.1612825998183; Mon, 08 Feb 2021 15:13:18 -0800 (PST) MIME-Version: 1.0 References: <202102081915.118JFXkJ067892@gitrepo.freebsd.org> <3E64387A-42DD-4470-8893-5B774F19754E@freebsd.org> In-Reply-To: <3E64387A-42DD-4470-8893-5B774F19754E@freebsd.org> From: Kevin Bowling Date: Mon, 8 Feb 2021 16:13:05 -0700 Message-ID: Subject: Re: git: af366d353b84 - main - amd64: implement strlen in assembly To: Jessica Clarke Cc: Mateusz Guzik , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DZMJc0QVNz3J6w X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Feb 2021 23:13:20 -0000 FreeBSD does not require pre-commit approval unless called out specifically. Are you volunteering to review the changes, and if so where is your guidance? These messages are otherwise unhelpful. On Mon, Feb 8, 2021 at 12:37 PM Jessica Clarke wrote: > > On 8 Feb 2021, at 19:15, Mateusz Guzik wrote: > > > > The branch main has been updated by mjg: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=af366d353b84bdc4e730f0fc563853abc338271c > > > > commit af366d353b84bdc4e730f0fc563853abc338271c > > Author: Mateusz Guzik > > AuthorDate: 2021-02-08 17:01:48 +0000 > > Commit: Mateusz Guzik > > CommitDate: 2021-02-08 19:15:21 +0000 > > > > amd64: implement strlen in assembly > > > > The C variant in libkern performs excessive branching to find the > > non-zero byte instead of using the bsfq instruction. The same code > > patched to use it is still slower than the routine implemented here > > as the compiler keeps neglecting to perform certain optimizations > > (like using leaq). > > > > On top of that the routine can is a starting point for copyinstr > > which operates on words instead of bytes. > > > > Tested with glibc test suite. > > > > Sample results (calls/s): > > > > Haswell: > > $(perl -e "print 'A' x 3"): > > stock: 211198039 > > patched:338626619 > > asm: 465609618 > > > > $(perl -e "print 'A' x 100"): > > stock: 83151997 > > patched: 98285919 > > asm: 120719888 > > > > AMD EPYC 7R32: > > $(perl -e "print 'A' x 3"): > > stock: 282523617 > > asm: 491498172 > > > > $(perl -e "print 'A' x 100"): > > stock: 114857172 > > asm: 112082057 > > No Reviewed by? More than one pair of eyes on non-trivial assembly is > almost always a good idea. > > Jess > > _______________________________________________ > dev-commits-src-main@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main > To unsubscribe, send any mail to "dev-commits-src-main-unsubscribe@freebsd.org"