On 7/15/22 21:01, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries via Gdb-patches writes: > > Tom> +#define PARALLEL_FOR_EACH_DEBUG 0 > > Probably needs a short comment. > Done. Also changed this into a const variable. > Tom> +#if PARALLEL_FOR_EACH_DEBUG > Tom> + fprintf (stderr, "Parallel for: n_elements: %zu\n", n_elements); > Tom> + fprintf (stderr, "Parallel for: minimum elements per thread: %u\n", n); > > I'm meh on this kind of logging but if it helped you it seems fine. > I've reworked the output to the slightly more clear: ... Parallel for: n_elements: 7271 Parallel for: minimum elements per thread: 10 Parallel for: elts_per_thread: 1817 Parallel for: elements on worker thread 0 : 1817 Parallel for: elements on worker thread 1 : 1817 Parallel for: elements on worker thread 2 : 1817 Parallel for: elements on worker thread 3 : 0 Parallel for: elements on main thread : 1820 ... It was a surprise for me to find that worker thread 3 is idle, so I think the information is useful enough. Committed as attached. Thanks, - Tom