Functions: avoid triggering multi-threading with too few tasks

I found this to cause small slow-downs.
This commit is contained in:
Jacques Lucke
2025-10-04 13:40:24 +02:00
parent 8f420e13cc
commit f105d0c83f

View File

@@ -435,7 +435,7 @@ class Executor {
reinterpret_cast<NodeState **>(buffer + self_.init_buffer_info_.node_states_array_offset),
nodes.size()};
threading::parallel_for(nodes.index_range(), 256, [&](const IndexRange range) {
threading::parallel_for(nodes.index_range(), 1024, [&](const IndexRange range) {
for (const int i : range) {
const Node &node = *nodes[i];
char *memory = buffer + self_.init_buffer_info_.node_states_offsets[i];