[libcxx-commits] [libcxx] Optimize std::__tree::__assign_multi to insert the provided range at the end of the tree every time (PR #131030)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 24 01:08:34 PDT 2025
https://github.com/philnik777 requested changes to this pull request.
> @philnik777 just one last bump -- given we haven't had any further concerns the past couple of weeks, and that this optimization already exists everywhere else I've seen in the codebase, I plan to merge this soon (probably in the next couple of days).
Please do not merge libc++ patches without approval from @llvm/reviewers-libcxx, as that is a general requirement for libc++ patches to be landed. I realize that this patch has been open for a while. Feel free to ping in the libc++ channel on Discord if patches get stale. There it's much more likely to be seen by someone.
> If you still see any concrete reasons not to, please let me know. So far as I can tell, it seems to be a clear win for some usages, and I believe we haven't seen any cases where it's detrimental.
Given that you haven't provided any benchmarks for non-optimal cases that's not exactly surprising. How does the performance look if you e.g. insert a range that contains random elements or is sorted inversely?
https://github.com/llvm/llvm-project/pull/131030
More information about the libcxx-commits
mailing list