@Levi

> However, I still see CPU related code in get_cpu_features. Are you
> sure you pushed the right thing?

I think it's correct, yes, the problem is ext/hash/blake3/blake3_dispatch.c,
which is just a copypaste of the upstream
https://github.com/BLAKE3-team/BLAKE3/blob/master/c/blake3_dispatch.c
(specifically version 0.3.7, with 2 patches that will be part of
0.3.8.. specifically https://github.com/BLAKE3-team/BLAKE3/pull/128
and https://github.com/BLAKE3-team/BLAKE3/pull/131
, both of which were accepted upstream)

Unfortunately the upstream blake3_dispatch.c always run cpu feature
detection when compiled for x86,
even when it's only compiling the portable implementation.

we are free to rip out that part for PHP's copy, and it should be a
pretty easy job to do too (i'm guessing ~30min including `make test`
on decent hardware),
 note that if we do it, comparing php's version with the upstream
version is slightly more work, and updating to newer upstream versions
will be slightly more work
(we'll need to rip out the cpu-detection stuff next time we want to
sync with upstream and the upstream dispatch code changed. I'm
guessing it will be years between each time someone actually has a
good reason to do this, though.)

if ripping out the cpu feature detection code in blake3_dispatch is
desired, i can volunteer for that, if nobody else want to ^^

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

Reply via email to