2x speedup for hash_pbkdf2

From: Date: Sat, 04 Jul 2015 20:57:30 +0000
Subject: 2x speedup for hash_pbkdf2
Groups: php.internals 
Request: Send a blank email to internals+get-87017@lists.php.net to get a copy of this message
Hi folks, I've just filed PR #1387: https://github.com/php/php-src/pull/1387 This moves invariant parts of the HMAC calculation out of the inner PBKDF2 loop. That means half the compression function applications are needed; performance is ~doubled as a result. A non-scientific comparison for doing 2**23 iterations with SHA1: - Python 3.4: 7.67s - OpenSSL 1.0.1f: 7.95s - PHP 5.6.10: 12.74s - PHP 5.6.10 (with this change): 6.71s Thanks, Joe

« previous php.internals (#87017) next »