Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp884673ybl; Thu, 12 Dec 2019 06:27:37 -0800 (PST) X-Google-Smtp-Source: APXvYqxB7kzpU+rDUNsJbfGnzK1x/84pIANcJMG1r/IG6EKxCk39CrHs9vpQSSP3iKlDApFtXn5m X-Received: by 2002:a05:6808:aa8:: with SMTP id r8mr4808945oij.7.1576160857040; Thu, 12 Dec 2019 06:27:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576160857; cv=none; d=google.com; s=arc-20160816; b=UzgocgBmc/D8MMJ5zIFWYO66t3rAYRA0Fx4iPG12DYNpD67hcg50Mr2Zdq0FE+nPP4 BvoBOTl6Xi1/pTsl9I+CxSg748jCf9zYUmke1d2tEG5U4GNmsjeZx1QJHUNwGoxpn5tH jKDfseEt34TJL22HeL5Z72JBckZ4KO727lrHLQZUzLJ9m0QGIFQgXpfEzxorWjdYR/Cu iKsbmsRCQX0MRstGi/KCEmr6qHQOaIksuppn9m3UyV+OHQvBbFND2CQsI7jsv7kTlYNm 8Mqp/b1g+W1kY75gWVrTq1qhx6dw5Yq7uIjmXvk50qmOg27pATPoZly0AB/zRkPbi9lu aODQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=/DN6p2Ch7R+6bHk3UTVmBnzdRsugLPXoWrAyTdUkcw8=; b=PcRlVn4VTCrIGuc6Wpz2S1t3fn2ukgaZdlPkFW1asz/Opqgy1GnpMNCueZVctqZWGE audk1DV9e+h2puwGGJLaMa9/PonOyHAL7e3ZKzeZoKyIpSUd8SDw/hQIkDj1+VTs1LeI PQgZUXDqslSTPfn8F/B4KXwo9f6DifN7rAeDnXFqq+kEVL8UGD4zaaja/KFL20CR9SQG sZ+IotnziIDMarwzJ9Hwyv+KuNmT612fmRDn5YTJy/MMhLvtkkdtVUlheN+q2NbMD6G2 rRYDuOVhhCtkyFoYh/GWZ7Qyslj2/3+JtFFo9JHb+o30zkLJzrY5AcVL4TsoEsrfFJzm xvuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u6i604Gu; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a197si3170913oii.199.2019.12.12.06.27.17; Thu, 12 Dec 2019 06:27:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u6i604Gu; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729591AbfLLO0g (ORCPT + 99 others); Thu, 12 Dec 2019 09:26:36 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:55155 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729392AbfLLO0g (ORCPT ); Thu, 12 Dec 2019 09:26:36 -0500 Received: by mail-wm1-f68.google.com with SMTP id b11so2572672wmj.4 for ; Thu, 12 Dec 2019 06:26:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/DN6p2Ch7R+6bHk3UTVmBnzdRsugLPXoWrAyTdUkcw8=; b=u6i604GuOCZ/0XT4pJYSmeCPPhoaB8Nf6Nt1XZ/4jFfXgxRBzoSoOpyW1iVkLiaJh/ o8bcEVve9Pw5JOmbj+4meLGvI52cyB+yUkGMpZRPAhP4/7+JnjE3Rjbp/tLiP2vu7DcB eDF1Q1IPKyi0A+qmExTdXWZtie++lmgp599WBoYZ/LrKsjC4aOJAOtXMQjaUIYe3SGCL f4g3PFQ5KHZacG+sYT4+BgHMJJ/iO95JLi0QXl94RBbveszEQDC+2iyKLvmdTg83wizG 5VgnvW8mDhNyATj+u/KtzTcJtd1pTKayejX0sILRz+K0r5duGwV1DUPVoNW701+J8SPQ 8mpw== 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=/DN6p2Ch7R+6bHk3UTVmBnzdRsugLPXoWrAyTdUkcw8=; b=t2HjrM2vaILiblMXuEneJi9LqHw98XcWgp5PC5w+BAnPZOKQ8OtiU1Et39+d0RcWdo ZGBBVNjI2uyt4yjwsySp0cI2NJ4/U65C1WscZrK8iILYbwc6l+trQeqsXM/nZ9IfzE8R 1gXrKF7xSz/TsXOcmKLZNJX2yGw6Ll8/6a7j6FEq7pBzN+4ElX9bVqebZhkIwQeQtTFU S3EIMFrPmmQcCRihyMOyJfcJIJlEf4r6WL3glJSchO/oQ7Aw82Zyb56ANNcwzA62tc6T 5IqnEix9u7qNHIWBW1ApQXrI2vjfEWfAGh3AddyXrWq7zR81sQJ22S5i+0CDsJV5fTzk Oz/Q== X-Gm-Message-State: APjAAAUWG4VfS5Bs3G0esnaEbFT/OM4fwbXldXuP6RHsmqbCKzaz8R/Y LlQRq5sSswn6NBkPYYIXYEq00V3Dq2bK/QXMrtuv+tkA5HDr/w== X-Received: by 2002:a1c:a795:: with SMTP id q143mr6684960wme.52.1576160794693; Thu, 12 Dec 2019 06:26:34 -0800 (PST) MIME-Version: 1.0 References: <20191211170936.385572-1-Jason@zx2c4.com> <20191212093008.217086-1-Jason@zx2c4.com> In-Reply-To: From: Ard Biesheuvel Date: Thu, 12 Dec 2019 15:26:22 +0100 Message-ID: Subject: Re: [PATCH crypto-next v2 1/3] crypto: poly1305 - add new 32 and 64-bit generic versions To: "Jason A. Donenfeld" Cc: Martin Willi , Linux Crypto Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, 12 Dec 2019 at 14:47, Jason A. Donenfeld wrote: > > On Thu, Dec 12, 2019 at 2:08 PM Jason A. Donenfeld wrote: > > > > Hi Martin, > > > > On Thu, Dec 12, 2019 at 1:03 PM Martin Willi wrote: > > > Can you provide some numbers to testify that? In my tests, the 32-bit > > > version gives me exact the same results. > > > > On 32-bit, if you only call update() once, then the results are the > > same. However, as soon as you call it more than once, this new version > > has increasing gains. Other than that, they should behave pretty much > > identically. > > Oh, you asked for numbers. I just fired up an Armada 370/XP and am > seeing a 8% increase in performance on calls to the update function. It would help if we could get some actual numbers. I usually try to capture the performance delta for a small set of block sizes that are significant for the use case at hand, e.g., like so [0], and also include blocksizes that are not 2^n. If the change improves the general case without causing any significant regressions elsewhere, I don't think we need to continue this debate. [0] https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git/commit/?id=11031c0d7d6e9bca0df233a8acfd6708d2b89470