From: Anatol Belski Date: Fri, 9 Feb 2018 16:26:30 +0000 (+0100) Subject: Improve loop vectorization X-Git-Tag: php-7.3.0alpha1~468^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e6492f30578cc72d90b74c026179314cabaaf5f;p=php Improve loop vectorization --- diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 889577e87f..df17deef96 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -529,10 +529,11 @@ PHP_FUNCTION(hash_final) digest = zend_string_alloc(digest_len, 0); hash->ops->hash_final((unsigned char *) ZSTR_VAL(digest), hash->context); if (hash->options & PHP_HASH_HMAC) { - int i; + int i, block_size; /* Convert K to opad -- 0x6A = 0x36 ^ 0x5C */ - for(i=0; i < hash->ops->block_size; i++) { + block_size = hash->ops->block_size; + for(i=0; i < block_size; i++) { hash->key[i] ^= 0x6A; }