Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112155 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 76448 invoked from network); 31 Oct 2020 03:57:36 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 31 Oct 2020 03:57:36 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D7E841804D1 for ; Fri, 30 Oct 2020 20:17:10 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 30 Oct 2020 20:17:10 -0700 (PDT) Received: by mail-io1-f53.google.com with SMTP id u62so9511541iod.8 for ; Fri, 30 Oct 2020 20:17:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datadoghq.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oZN/XuZMewJX8T5mPCAtwhCFJbmE8OTO7uJndshGyW8=; b=K/eflbzGqW5vd6uKYw9kkCHv46nJZcYEs3n/dduL419X1PgHNZ8YYInykq6mHiKKsi SKvIyTM+TLgGu7g3YT89NO9KPJerl2I9Mbi6qBEALq6jYTVEkQisGFErvnIrKN00YFVI z+EEVUlOb65wr1mEauOxYB0Ki4FC3Q1U8qi+o= 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=oZN/XuZMewJX8T5mPCAtwhCFJbmE8OTO7uJndshGyW8=; b=O8AUXZGbl54BJEq83IXBj9Lx1BuIPluG/3F3EFbl/UocDTtBsbGkRAbsWMCv52CLqI WE7/wGFfpjwqs18VGC1hGA9jNKTwODXaQDrxjIgpaM5Xr3JUtN0zckhvDZknkLoey+3T wteeWGjtvja6ef2agqP0xW8OrELwxNvNCXmjWOCCSV73g+GmlAPE6K+9rxpGRSDkjFn+ RWeyBDFT1yyh2L7/KGZGtXPoMfHEH/apyapBohSrCl1Qh8BSwS6O2+mYQlzw81N1jJSA mXHmp8c4Yk6BKUz6uqTkQ2rwhteZjByvYEO4B1dJAZE4H5Y8qbT3oiOF5CUTWh6Mxsxe fSnw== X-Gm-Message-State: AOAM533ZCZvDQ8GF41bbhf+xnXANlm69LPrR4ufpjDgHy/TTcH9xLnOx q35Cc/iN1mdJ2wglrZqwVzJ6NHVzx31jy/zih2F0tA== X-Google-Smtp-Source: ABdhPJwLd1lrk2MD502HzAAI8ZOTSvZg7RZc0lvJDeaSyOo8DIrNQJPhg8gnPN+n8DyVWBuOhLOSbotWhLHZVF/e5Ew= X-Received: by 2002:a5d:91d2:: with SMTP id k18mr3986608ior.119.1604114229630; Fri, 30 Oct 2020 20:17:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Reply-To: Levi Morrison Date: Fri, 30 Oct 2020 21:16:59 -0600 Message-ID: To: Hans Henrik Bergan Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Re: hash BLAKE3 From: internals@lists.php.net ("Levi Morrison via internals") On Fri, Oct 30, 2020 at 6:08 PM Hans Henrik Bergan wrote: > > hmm i'll try again, > made another PR: https://github.com/php/php-src/pull/6393 > > this PR is an alternative to https://github.com/php/php-src/pull/6358 > with some notable differences, > > - this PR is roughly 1700 SLOC, compared to #6358 at roughly 31,000 SLOC > > - this PR only bundles the "portable C" version of BLAKE3, it does not > contain any of the SSE/AVX/NEON cpu-optimized non-portable > implementations (hence the huge SLOC difference) > > the idea here is that just having BLAKE3 supported in PHP, even if > it's not the most performant implementation, is better than no support > at all, > > unsurprisingly, the portable version of BLAKE3 isn't nearly as fast as > in #6358 , being beaten by MD4 (still beats MD5 though), but it still > does a pretty good job in /ext/hash/bech.php, being roughly 1.9 times > faster than sha3-224 on my laptop (compared to 4.2 times faster in > #6358 ), and being the fastest secure hash on the list, for exact > numbers check the PR. > > thoughts? I think the slower, portable version will be fine. However, I still see CPU related code in get_cpu_features. Are you sure you pushed the right thing?