https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113504
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- Using GCC 15.2.0 (before the Bug 117276 fix) and GCC 15.2.1 20251211 (after the fix): | Executable | Size | Time | Max Resident Memory | | ------------------ | ----------- | -------- | ------------------- | | ./pstl_sort.before | 33554432 | 0:00.45 | 366568k | | ./tbb_sort.before | 33554432 | 0:00.81 | 135396k | | ./seq_sort.before | 33554432 | 0:03.54 | 134476k | | ./pstl_sort.before | 1073741824 | 0:18.54 | 14171232k | | ./tbb_sort.before | 1073741824 | 0:31.69 | 4197836k | | ./seq_sort.before | 1073741824 | 2:20.32 | 4197840k | | ./pstl_sort.after | 33554432 | 0:00.45 | 228604k | | ./tbb_sort.after | 33554432 | 0:00.82 | 135472k | | ./seq_sort.after | 33554432 | 0:03.56 | 134552k | | ./pstl_sort.after | 1073741824 | 0:17.04 | 8349924k | | ./tbb_sort.after | 1073741824 | 0:29.72 | 4197884k | | ./seq_sort.after | 1073741824 | 2:18.19 | 4197884k | So the PSTL versions still use nearly twice as much memory as TBB and the sequential sorts, but that factor is constant; it doesn't grow with the size of the input. So I think this was fixed by fixing the memory leak, and this is a duplicate of Bug 117276
