Re: [PHP-DEV] SHA3 is very slow

2017-04-05 Thread Yasuo Ohgaki
Hi Christian, On Thu, Apr 6, 2017 at 12:45 AM, Christian Schneider wrote: > > 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

Re: [PHP-DEV] SHA3 is very slow

2017-04-05 Thread Sara Golemon
On a similarly superficial scan, I have no issues with this. The only tiny thing which gives me pause is https://github.com/php/php-src/pull/2453/files#diff-0bb62bbdac4073ae183a857299826533R24 as I don't recall 100% if that redefinition will leak out to other parts of the runtime (my instinct

Re: [PHP-DEV] SHA3 is very slow

2017-04-05 Thread Christian Schneider
Am 05.04.2017 um 04:31 schrieb Yasuo Ohgaki : > 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

Re: [PHP-DEV] SHA3 is very slow

2017-04-04 Thread Yasuo Ohgaki
Hi Christian, On Mon, Apr 3, 2017 at 8:44 PM, Christian Schneider wrote: > Two things I noticed: > 1) As far as I understand Ruby (and as far as I tested it) this does not > execute the function at all. You probably mean something like > while $i > 0 do > Oops,

Re: [PHP-DEV] SHA3 is very slow

2017-04-03 Thread Lauri Kenttä
On 2017-04-03 14:44, Christian Schneider wrote: Am 01.04.2017 um 05:12 schrieb Yasuo Ohgaki : I noticed that our SHA-3 is inefficient. === Ruby SHA3-256 === [yohgaki@dev ~]$ cat t2.rb #!/usr/bin/env ruby require 'digest/sha2' $i = 100 until $i do

Re: [PHP-DEV] SHA3 is very slow

2017-04-03 Thread Christian Schneider
Am 01.04.2017 um 05:12 schrieb Yasuo Ohgaki : > I noticed that our SHA-3 is inefficient. > > === Ruby SHA3-256 === > [yohgaki@dev ~]$ cat t2.rb > #!/usr/bin/env ruby > > require 'digest/sha2' > > $i = 100 > until $i do > Digest::SHA3.hexdigest("abcdedf", 256) >

Re: [PHP-DEV] SHA3 is very slow

2017-04-01 Thread Yasuo Ohgaki
Hi Sara, On Sat, Apr 1, 2017 at 12:24 PM, Sara Golemon wrote: > On Fri, Mar 31, 2017 at 10:12 PM, Yasuo Ohgaki wrote: > > I noticed that our SHA-3 is inefficient. > > > Entirely possible. Feel free to improve it. :D I would like to, but it wouldn't

Re: [PHP-DEV] SHA3 is very slow

2017-03-31 Thread Sara Golemon
On Fri, Mar 31, 2017 at 10:12 PM, Yasuo Ohgaki wrote: > I noticed that our SHA-3 is inefficient. > Entirely possible. Feel free to improve it. :D -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] SHA3 is very slow

2017-03-31 Thread Yasuo Ohgaki
Hi all, I noticed that our SHA-3 is inefficient. === Ruby SHA3-256 === [yohgaki@dev ~]$ cat t2.rb #!/usr/bin/env ruby require 'digest/sha2' $i = 100 until $i do Digest::SHA3.hexdigest("abcdedf", 256) $i -= 1 end [yohgaki@dev ~]$ time ruby t2.rb real 0m0.438s user 0m0.216s sys 0m0.222s