Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp796494ybl; Thu, 12 Dec 2019 05:09:35 -0800 (PST) X-Google-Smtp-Source: APXvYqzJZkgLW6a0aTFJkgFBLnRNoomqz1EQExJiVHp30eRlebaIKyp5HY9gPVvfwPgyeP0+dxQ7 X-Received: by 2002:a9d:4c08:: with SMTP id l8mr7962246otf.360.1576156175489; Thu, 12 Dec 2019 05:09:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576156175; cv=none; d=google.com; s=arc-20160816; b=niODdONSHqf37iqjYk32OFGUSCDca4pZBRVpxkvNdxYSyJPkeVeUvQ0alvO9FMR2PA Q+JPgy/L/XmnYn6eeitA0UPLgHRdlwlXJA1nPBckKfq0IAiLm/hO4WPuDA0AW45ztQOm yhKlqYBDWF6nfiwPOLtxFzevMIAl3vcgEqcMFFJfAcI+k1TPVKEVTJ8Pk3laTkyFRYiT +ryCQBHjXfcDFuzkEyAMF7XBeKio7eq28Z8Z0MV1xkCwdPvmzO8plsD5oxe2JAV/mAgD 2cqHl+ZPM+XzWjUfQV7qZ52N2bMbhu2VT74bHVI+m9P5R0gZfjwQQdItOVIeKh25/608 oVRg== 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=D/nt3BnlaUSIi6n1rxE/tfdFN38ks6d3BaySJxvSqrY=; b=pi4s/q87WF/46b7JUBuEP/WJMeHzF08aIgFf2g1Wtb0P3lea9k2RCs/hFxjizV93zv D+rB63fFLnwNHTJQEk+0lvvu/wvhOU2VIKLKh+mqttQJnSoXqsFXaMOE7RnoW0AmdxDh hB3FXry9oV4AhaTr9n7rUieeP+NQomPzhFu24cht2ZD7c/ZI4Xj9qQ0KnWM4Z1X2dize b1++9BLa+9/jTIR3m4ozAXoMQftkSmgSU8rGHLafjQZPMBkKvYwWDHooIlagh5YSD6yN rrBk1jxtMOoPpXg5Ogw1d26VOhsbkxYeTVelunqVHvePFaAsc1Kjo3cDYB0O3HOAgpO7 I+fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=3aV9BqcQ; 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=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b15si2298041oib.234.2019.12.12.05.09.17; Thu, 12 Dec 2019 05:09:35 -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=@zx2c4.com header.s=mail header.b=3aV9BqcQ; 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=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729368AbfLLNJJ (ORCPT + 99 others); Thu, 12 Dec 2019 08:09:09 -0500 Received: from frisell.zx2c4.com ([192.95.5.64]:33917 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729366AbfLLNJJ (ORCPT ); Thu, 12 Dec 2019 08:09:09 -0500 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 2009c6b5 for ; Thu, 12 Dec 2019 12:13:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=mail; bh=mXe+fFi68UesrIG9DZLqgKEnDo8=; b=3aV9Bq cQPWY/+WZu9I5WZ1dmHu0lK21PlNV/ElcxIWMQPSo59DVS717yS54a2xmM5YzsQ0 loYt+DWqYBWHBjzz46KbJJu2v5gLwqa8Tw90SbhCCQKLyuvOHfa1NNsMzkbiiRt+ S3kYUiBL2+fOvJ4ksO945vlU1oXQ6/+IuomKOuLcdGyx/bE6G4p0fnr6BOfJ7yfB 9IJB+7KjTa1JqtY8ixvMcTSQHRpRuV9NSkYXnTbjvpLjzBmJjm9F0pCdRKNZTauT 1/cXKiuh1sYotDYrAnhfdzyVp+76NzKm8VAzZn1m8RyhCRQLGrv1oL/pSV6Mts+y Py6HLG3QqsZUrB/Q== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 31c70c87 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Thu, 12 Dec 2019 12:13:19 +0000 (UTC) Received: by mail-oi1-f181.google.com with SMTP id b8so354926oiy.5 for ; Thu, 12 Dec 2019 05:09:07 -0800 (PST) X-Gm-Message-State: APjAAAXBO7HmablKTSM4iHi19U/A6RTB9SDyeGCNU5fYyWCCMzv7VKdi 4dzGuabWq6eSuZpUM08C+sI8m4CH9SW84KcYIuU= X-Received: by 2002:aca:5cc1:: with SMTP id q184mr4078014oib.122.1576156146330; Thu, 12 Dec 2019 05:09:06 -0800 (PST) MIME-Version: 1.0 References: <20191211170936.385572-1-Jason@zx2c4.com> <20191212093008.217086-1-Jason@zx2c4.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Thu, 12 Dec 2019 14:08:54 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH crypto-next v2 1/3] crypto: poly1305 - add new 32 and 64-bit generic versions To: Martin Willi Cc: 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 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. > The 64-bit version is roughly 10% faster. However, what are the > platforms where the 64-bit version matters? Won't any SIMD version > outperform the 64-bit version anyway? Depending on the platform, it's sometimes more than 10% faster. Not all 64-bit platforms have the luxury of a SIMD version. And not all code paths wind up hitting the SIMD version, either. The code is very short and simple -- and compiles shorter than the 32-bit one actually -- and placed side by side with the new 32-bit one, you can pretty easily compare them as clean standalone things. I think there's no good reason for being attached to your old code here; it's all mostly Andrew's stuff anyway. Jason