brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.6 KiB · 6ea323c Raw
124 lines · plain
1===========================================2Libc++ 22.0.0 (In-Progress) Release Notes3===========================================4 5.. contents::6   :local:7   :depth: 28 9Written by the `Libc++ Team <https://libcxx.llvm.org>`_10 11.. warning::12 13   These are in-progress notes for the upcoming libc++ 22.0.0 release.14   Release notes for previous releases can be found on15   `the Download Page <https://releases.llvm.org/download.html>`_.16 17Introduction18============19 20This document contains the release notes for the libc++ C++ Standard Library,21part of the LLVM Compiler Infrastructure, release 22.0.0. Here we describe the22status of libc++ in some detail, including major improvements from the previous23release and new feature work. For the general LLVM release notes, see `the LLVM24documentation <https://llvm.org/docs/ReleaseNotes.html>`_. All LLVM releases may25be downloaded from the `LLVM releases web site <https://llvm.org/releases/>`_.26 27For more information about libc++, please see the `Libc++ Web Site28<https://libcxx.llvm.org>`_ or the `LLVM Web Site <https://llvm.org>`_.29 30Note that if you are reading this file from a Git checkout or the31main Libc++ web page, this document applies to the *next* release, not32the current one. To see the release notes for a specific release, please33see the `releases page <https://llvm.org/releases/>`_.34 35What's New in Libc++ 22.0.0?36==============================37 38Implemented Papers39------------------40 41- P2321R2: ``zip`` (`Github <https://llvm.org/PR105169>`__) (The paper is partially implemented. ``zip_transform_view``42  is implemented in this release)43- P2988R12: ``std::optional<T&>`` (`Github <https://llvm.org/PR148131>`__)44- P3044R2: sub-``string_view`` from ``string`` (`Github <https://llvm.org/PR148140>`__)45- P3223R2: Making ``std::istream::ignore`` less surprising (`Github <https://llvm.org/PR148178>`__)46- P3060R3: Add ``std::views::indices(n)`` (`Github <https://llvm.org/PR148175>`__)47- P2641R4: Checking if a ``union`` alternative is active (``std::is_within_lifetime``)48  (`Github <https://llvm.org/PR105381>`__)49- P2835R7: Expose ``std::atomic_ref``'s object address (`Github <https://llvm.org/PR118377>`__)50- P2944R3: Comparisons for ``reference_wrapper`` (`Github <https://llvm.org/PR105424>`__)51- P3168R2: Give ``std::optional`` Range Support (`Github <https://llvm.org/PR105430>`__)52 53Improvements and New Features54-----------------------------55 56- The performance of ``map::map(const map&)`` has been improved up to 2.3x57- The performance of ``map::operator=(const map&)`` has been improved by up to 11x58- The performance of ``unordered_set::unordered_set(const unordered_set&)`` has been improved by up to 3.3x.59- The performance of ``unordered_set::operator=(const unordered_set&)`` has been improved by up to 5x.60- The performance of ``map::erase`` and ``set::erase`` has been improved by up to 2x61- The performance of ``find(key)`` in ``map``, ``set``, ``multimap`` and ``multiset`` has been improved by up to 2.3x62- Some reallocations are now avoided in `std::filesystem::path::lexically_relative`, resulting in a performance63  improvement of up to 1.7x.64- The performance of the ``(iterator, iterator)`` constructors of ``map``, ``set``, ``multimap`` and ``multiset``65  has been improved by up to 3x66- The performance of ``insert(iterator, iterator)`` of ``map``, ``set``, ``multimap`` and ``multiset`` has been improved67  by up to 2.5x68- The performance of ``erase(iterator, iterator)`` in the unordered containers has been improved by up to 1.9x69- The performance of ``map::insert_or_assign`` has been improved by up to 2x70- ``ofstream::write`` has been optimized to pass through large strings to system calls directly instead of copying them71  in chunks into a buffer.72- Multiple internal types have been refactored to use ``[[no_unique_address]]``, resulting in faster compile times and73  reduced debug information.74 75- The performance of ``std::find`` has been improved by up to 2x for integral types76- The ``std::distance`` and ``std::ranges::distance`` algorithms have been optimized for segmented iterators (e.g.,77  ``std::join_view`` iterators), reducing the complexity from ``O(n)`` to ``O(n / segment_size)``. Benchmarks show78  performance improvements of over 1600x in favorable cases with large segment sizes (e.g., 1024).79- The ``std::{fill, fill_n}`` and ``std::ranges::{fill, fill_n}`` algorithms have been optimized for segmented iterators,80  resulting in a performance improvement of at least 10x for ``std::deque<int>`` iterators and81  ``std::join_view<std::vector<std::vector<int>>>`` iterators.82- The ``std::{generate, generate_n}`` and ``std::ranges::generate_n`` algorithms have been optimized for segmented83  iterators, resulting in a performance improvement for ``std::deque<short>`` and84  ``std::join_view<vector<vector<short>>>`` iterators.85 86- The ``num_get::do_get`` integral overloads have been optimized, resulting in a performance improvement of up to 2.8x.87 88Deprecations and Removals89-------------------------90 91Potentially breaking changes92----------------------------93 94- The algorithm for ``multi{map,set}::find`` has been modified such that it doesn't necessarily return an iterator to95  the first equal element in the container. This was never guaranteed by the Standard, but libc++ previously happened to96  always return the first equal element, like other implementations do. Starting with this release, code relying on the97  first element being returned from ``find`` will be broken, and ``lower_bound`` or ``equal_range`` should be used98  instead.99 100- The ABI flag ``_LIBCPP_ABI_NO_REVERSE_ITERATOR_SECOND_MEMBER`` has been split off from101  ``_LIBCPP_ABI_NO_ITERATOR_BASES``. If you are using this flag and care about ABI stability, you should set102  ``_LIBCPP_ABI_NO_REVERSE_ITERATOR_SECOND_MEMBER`` as well.103 104Announcements About Future Releases105-----------------------------------106 107ABI Affecting Changes108---------------------109 110- The ABI flag ``_LIBCPP_ABI_NO_REVERSE_ITERATOR_SECOND_MEMBER`` has been split off from111  ``_LIBCPP_ABI_NO_ITERATOR_BASES``. If you are using this flag and care about ABI stability, you should set112  ``_LIBCPP_ABI_NO_REVERSE_ITERATOR_SECOND_MEMBER`` as well.113 114- The internal types ``__map_value_compare``, ``__unordered_map_hasher``, ``__unordered_map_equal``,115  ``__hash_map_hasher`` and ``__hash_map_equal`` have been refactored to use ``_LIBCPP_COMPRESSED_ELEMENT`` instead of116  potentially inheriting from the types they wrap. At this point in time we are not aware of any ABI changes caused by117  this.118 119- ``ranges::iota_view`` is now aware of ``__int128``. This causes ``iota_view::difference_type`` to change from120  ``long long`` to ``__int128`` in some cases.121 122Build System Changes123--------------------124