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
..
2024-08-02 01:41:47 +02:00
2024-08-04 07:36:37 +02:00
2024-08-02 01:41:47 +02:00
2024-08-02 01:41:47 +02:00
2024-08-02 01:41:47 +02:00
2024-08-04 07:36:37 +02:00
2024-08-04 20:07:52 +02:00
2024-08-05 16:15:19 +02:00
2024-07-29 00:14:59 +02:00
2024-08-04 23:30:52 +02:00
2024-08-02 01:41:47 +02:00
2024-08-02 01:41:47 +02:00
2024-08-04 12:52:16 +02:00
2024-07-24 19:55:37 +02:00
2024-07-29 00:14:59 +02:00
2024-08-03 22:13:36 +02:00
2024-08-05 16:23:38 +02:00
2024-08-04 07:36:37 +02:00
2024-08-04 07:36:37 +02:00
2024-08-03 09:47:39 +02:00
2024-08-04 07:36:37 +02:00
2024-07-29 00:14:59 +02:00
2024-07-29 10:08:17 +02:00
2024-08-04 12:52:16 +02:00
2024-08-02 01:41:47 +02:00
2024-08-03 09:47:39 +02:00
2024-07-29 00:14:59 +02:00
2024-08-03 22:13:36 +02:00
2024-08-05 10:12:16 +02:00
2024-08-04 12:52:16 +02:00
2024-08-03 09:47:39 +02:00
2024-08-04 07:36:37 +02:00
2024-08-04 12:52:16 +02:00
2024-07-29 00:14:59 +02:00
2024-08-04 07:36:37 +02:00
2024-08-04 07:36:37 +02:00
2024-08-04 12:52:16 +02:00
2024-08-04 07:36:37 +02:00
2024-08-02 01:41:47 +02:00
2024-07-29 00:14:59 +02:00
2024-08-02 01:41:47 +02:00
2024-08-03 21:52:14 +02:00
2024-08-03 09:47:39 +02:00
2024-08-05 19:12:29 +02:00
2024-08-05 15:54:50 +02:00
2024-08-04 20:07:52 +02:00
2024-08-04 21:16:15 +02:00
2024-08-02 01:41:47 +02:00
2024-08-02 01:41:47 +02:00
2024-08-04 07:36:37 +02:00
2024-08-04 07:36:37 +02:00
2024-08-02 01:41:47 +02:00
2024-08-02 01:41:47 +02:00
2024-07-29 00:14:59 +02:00
2024-07-29 10:08:17 +02:00
2024-08-02 01:41:47 +02:00
2024-08-05 08:52:09 +02:00
2024-08-04 07:36:37 +02:00
2024-08-02 01:41:47 +02:00
2024-08-02 01:41:47 +02:00
2024-08-02 01:41:47 +02:00
2024-07-29 00:14:59 +02:00
2024-08-02 01:41:47 +02:00
2024-08-02 01:41:47 +02:00
2024-08-02 01:41:47 +02:00
2024-08-03 09:47:39 +02:00
2024-08-02 17:35:27 +02:00
2024-08-02 01:41:47 +02:00
2024-08-02 01:41:47 +02:00