1
0

template.c: precalculate before loop where applicable

This commit is contained in:
Intel A80486DX2-66 2024-05-19 20:47:38 +03:00
parent 3bab4c8373
commit 24317101c0
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -241,13 +241,6 @@ main(void)
#endif
#if SEQUENTIAL_MODE
size_t time = 0;
for (size_t seq = 0; seq < MAX; seq++) {
if ((time + BLOCK_SIZE) >= GEN_LENGTH)
calc_block_size = GEN_LENGTH - time;
#endif
// * bytebeat generating loop
const uintmax_t gen_length_minus_1 = GEN_LENGTH - 1,
bit_depth_limiter = BIT_DEPTH_LIMITER
#if FP_RETURN_TYPE
@ -259,6 +252,13 @@ main(void)
#endif
;
size_t time = 0;
for (size_t seq = 0; seq < MAX; seq++) {
if ((time + BLOCK_SIZE) >= GEN_LENGTH)
calc_block_size = GEN_LENGTH - time;
#endif
// * bytebeat generating loop
#if SEQUENTIAL_MODE
for (size_t idx = 0; idx < BLOCK_SIZE && time < GEN_LENGTH; idx++,
time++) {