https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96942
--- Comment #10 from Dmitriy Ovdienko <dmitriy.ovdienko at gmail dot com> --- Looks like I know why C++ sample does not use all the CPU resources. C++ does not load threads equally. Last thread gets the most heavy task (MAX_DEPTH) and performs N iterations alone. Rust code instead creates a loop from MIN_DEPTH..MAX_DEPTH and runs iterations in the threads. So at first, N threads are working on Depth=1, then all the threads are working on Depth=2... and then all the threads are working on Depth=MAX