https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81806
--- Comment #14 from Oleksandr Kulkov <adamant.pwn at gmail dot com> --- Hi all, I wanted to bump this thread very briefly. I think going with the fix at https://gcc.gnu.org/bugzilla/attachment.cgi?id=47615&action=diff from Xi would make sense, unless someone proposes a solution that also improves the performance further (which is unlikely). Even though, according to Xi, it's still quite slow, at least this would fix the discrepancy with official documentation that says "red-black trees are split and joined in poly-logarithmic complexity" (https://gcc.gnu.org/onlinedocs/libstdc++/ext/pb_ds/tree_based_containers.html). I think if the patch is accepted, it would be sufficient to close this bug, even if the result is still not that useful for competitive programming.