php-src/ext
Tim Düsterhus 31e2d2b86c
random: Optimize Randomizer::getBytes() (#15228)
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 1fc2ddc996.

Co-authored-by: Saki Takamachi <saki@php.net>
2024-08-05 19:12:29 +02:00
..
bcmath Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
bz2 Autotools: Replace AC_MSG_ERROR with AC_MSG_FAILURE (#15209) 2024-08-04 07:36:37 +02:00
calendar Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
com_dotnet Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
ctype Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
curl Autotools: Replace AC_MSG_ERROR with AC_MSG_FAILURE (#15209) 2024-08-04 07:36:37 +02:00
date Deprecate date_sunrise and date_sunset constants (#12978) 2024-08-04 20:07:52 +02:00
dba [skip ci] Fix typo 2024-08-05 16:15:19 +02:00
dl_test Autotools: Normalize and quote all PHP_NEW_EXTENSION arguments (#15144) 2024-07-29 00:14:59 +02:00
dom Remove DOMImplementation::getFeature() (#15233) 2024-08-04 23:30:52 +02:00
enchant Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
exif Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
ffi Sync preprocessor macros help texts (#15218) 2024-08-04 12:52:16 +02:00
fileinfo Autotools: Normalize ext/fileinfo sources (#15082) 2024-07-24 19:55:37 +02:00
filter Autotools: Normalize and quote all PHP_NEW_EXTENSION arguments (#15144) 2024-07-29 00:14:59 +02:00
ftp Autotools: Improve ftp and mysqlnd SSL configure options (#15164) 2024-08-03 22:13:36 +02:00
gd [skip ci] Fix typo in ext/gd 2024-08-05 16:23:38 +02:00
gettext Autotools: Replace AC_MSG_ERROR with AC_MSG_FAILURE (#15209) 2024-08-04 07:36:37 +02:00
gmp Autotools: Replace AC_MSG_ERROR with AC_MSG_FAILURE (#15209) 2024-08-04 07:36:37 +02:00
hash Sync AC_DEFINE help texts (#15207) 2024-08-03 09:47:39 +02:00
iconv Autotools: Replace AC_MSG_ERROR with AC_MSG_FAILURE (#15209) 2024-08-04 07:36:37 +02:00
intl Autotools: Normalize and quote all PHP_NEW_EXTENSION arguments (#15144) 2024-07-29 00:14:59 +02:00
json Autotools: Normalize headers arguments (#15149) 2024-07-29 10:08:17 +02:00
ldap Sync preprocessor macros help texts (#15218) 2024-08-04 12:52:16 +02:00
libxml Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
mbstring Sync AC_DEFINE help texts (#15207) 2024-08-03 09:47:39 +02:00
mysqli Autotools: Normalize and quote all PHP_NEW_EXTENSION arguments (#15144) 2024-07-29 00:14:59 +02:00
mysqlnd Autotools: Improve ftp and mysqlnd SSL configure options (#15164) 2024-08-03 22:13:36 +02:00
odbc Add and update ext/odbc preprocessor macros help texts (#15223) 2024-08-05 10:12:16 +02:00
opcache Sync preprocessor macros help texts (#15218) 2024-08-04 12:52:16 +02:00
openssl Sync AC_DEFINE help texts (#15207) 2024-08-03 09:47:39 +02:00
pcntl Autotools: Replace AC_MSG_ERROR with AC_MSG_FAILURE (#15209) 2024-08-04 07:36:37 +02:00
pcre Sync preprocessor macros help texts (#15218) 2024-08-04 12:52:16 +02:00
pdo Autotools: Normalize and quote all PHP_NEW_EXTENSION arguments (#15144) 2024-07-29 00:14:59 +02:00
pdo_dblib Autotools: Replace AC_MSG_ERROR with AC_MSG_FAILURE (#15209) 2024-08-04 07:36:37 +02:00
pdo_firebird Autotools: Replace AC_MSG_ERROR with AC_MSG_FAILURE (#15209) 2024-08-04 07:36:37 +02:00
pdo_mysql Sync preprocessor macros help texts (#15218) 2024-08-04 12:52:16 +02:00
pdo_odbc Autotools: Replace AC_MSG_ERROR with AC_MSG_FAILURE (#15209) 2024-08-04 07:36:37 +02:00
pdo_pgsql Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
pdo_sqlite Autotools: Normalize and quote all PHP_NEW_EXTENSION arguments (#15144) 2024-07-29 00:14:59 +02:00
pgsql Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
phar Replace PHP_OUTPUT with AC_CONFIG_FILES (#15186) 2024-08-03 21:52:14 +02:00
posix Sync AC_DEFINE help texts (#15207) 2024-08-03 09:47:39 +02:00
random random: Optimize Randomizer::getBytes() (#15228) 2024-08-05 19:12:29 +02:00
readline Fix bug #51558: shared readline build fails (#15242) 2024-08-05 15:54:50 +02:00
reflection Deprecate date_sunrise and date_sunset constants (#12978) 2024-08-04 20:07:52 +02:00
session Autotools: Improve --with-mm configure option check (#15212) 2024-08-04 21:16:15 +02:00
shmop Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
simplexml Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
skeleton Autotools: Replace AC_MSG_ERROR with AC_MSG_FAILURE (#15209) 2024-08-04 07:36:37 +02:00
snmp Autotools: Replace AC_MSG_ERROR with AC_MSG_FAILURE (#15209) 2024-08-04 07:36:37 +02:00
soap Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
sockets Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
sodium Autotools: Normalize and quote all PHP_NEW_EXTENSION arguments (#15144) 2024-07-29 00:14:59 +02:00
spl Autotools: Normalize headers arguments (#15149) 2024-07-29 10:08:17 +02:00
sqlite3 Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
standard Autotools: Check for cross_compiling=yes (#15238) 2024-08-05 08:52:09 +02:00
sysvmsg Autotools: Replace AC_MSG_ERROR with AC_MSG_FAILURE (#15209) 2024-08-04 07:36:37 +02:00
sysvsem Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
sysvshm Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
tidy Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
tokenizer Autotools: Normalize and quote all PHP_NEW_EXTENSION arguments (#15144) 2024-07-29 00:14:59 +02:00
xml Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
xmlreader Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
xmlwriter Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
xsl Sync AC_DEFINE help texts (#15207) 2024-08-03 09:47:39 +02:00
zend_test Allow optimizer to depend on preloaded symbols (#15021) 2024-08-02 17:35:27 +02:00
zip Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
zlib Sync HAVE_<extension> help texts (#15167) 2024-08-02 01:41:47 +02:00
ext_skel.php