On Fri, Oct 30, 2020 at 6:08 PM Hans Henrik Bergan <divinit...@gmail.com> 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?

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to