mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
31e2d2b86c
This patch greatly improves the performance for the common case of using a
64-bit engine and requesting a length that is a multiple of 8.
It does so by providing a fast path that will just `memcpy()` (which will be
optimized out) the returned uint64_t directly into the output buffer,
byteswapping it for big endian architectures.
The existing byte-wise copying logic was mostly left alone. It only received an
optimization of the shifting and masking that was previously applied to
`Randomizer::getBytesFromString()` in
|
||
---|---|---|
.. | ||
tests | ||
config.m4 | ||
config.w32 | ||
CREDITS | ||
csprng.c | ||
engine_mt19937.c | ||
engine_pcgoneseq128xslrr64.c | ||
engine_secure.c | ||
engine_user.c | ||
engine_xoshiro256starstar.c | ||
gammasection.c | ||
php_random_csprng.h | ||
php_random_uint128.h | ||
php_random_zend_utils.h | ||
php_random.h | ||
random_arginfo.h | ||
random.c | ||
random.stub.php | ||
randomizer.c | ||
zend_utils.c |