mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-08-04 02:06:31 -04:00
deflate_compress: skip unneeded work in do_end_block_check()
Summing ->new_observations[] is unnecessary, since ->num_new_observations already contains the sum.
This commit is contained in:
parent
dd5b9693cb
commit
4f7fb20776
@ -1934,10 +1934,10 @@ do_end_block_check(struct block_split_stats *stats, u32 block_length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < NUM_OBSERVATION_TYPES; i++) {
|
for (i = 0; i < NUM_OBSERVATION_TYPES; i++) {
|
||||||
stats->num_observations += stats->new_observations[i];
|
|
||||||
stats->observations[i] += stats->new_observations[i];
|
stats->observations[i] += stats->new_observations[i];
|
||||||
stats->new_observations[i] = 0;
|
stats->new_observations[i] = 0;
|
||||||
}
|
}
|
||||||
|
stats->num_observations += stats->num_new_observations;
|
||||||
stats->num_new_observations = 0;
|
stats->num_new_observations = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user