Am 05.04.2017 um 04:31 schrieb Yasuo Ohgaki <yohg...@ohgaki.net>: > PHP's sha3 seems slower than it could be.
I created a pull request at https://github.com/php/php-src/pull/2453 for a version using the KeccakCodePackage version from https://github.com/gvanas/KeccakCodePackage which yields ~30 times faster results for a simple test. I don't know whether the PHP maintainers prefer to keep the (very short) inline reference implementation which is slow or whether the optimised version from KeccakCodePackage with around a dozen files would be acceptable. I put the (part which is used from the) KeccakCodePackage code (without modifications!) in a separate directory under ext/hash/sha3 and I also implemented switching between a 64bit and a 32bit version. Don't know if this is necessary and following all the guidelines. Oh, I also only superficially scanned https://github.com/gvanas/KeccakCodePackage#under-which-license-is-the-kcp-distributed but it looked like it should be ok. Not an expert on this though ;-) Regards, - Chris -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php