[all-commits] [llvm/llvm-project] 7717a5: [libc++] Optimize ranges::equal for vector<bool>::...

Peng Liu via All-commits all-commits at lists.llvm.org
Wed Feb 26 09:18:47 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7717a549e91c4fb554b78fce38e75b0147fb6cac
      https://github.com/llvm/llvm-project/commit/7717a549e91c4fb554b78fce38e75b0147fb6cac
  Author: Peng Liu <winner245 at hotmail.com>
  Date:   2025-02-26 (Wed, 26 Feb 2025)

  Changed paths:
    M libcxx/docs/ReleaseNotes/21.rst
    M libcxx/include/__algorithm/equal.h
    M libcxx/include/__bit_reference
    M libcxx/include/__vector/comparison.h
    M libcxx/include/bitset
    M libcxx/test/benchmarks/algorithms/equal.bench.cpp
    M libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp
    M libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/ranges.equal.pass.cpp

  Log Message:
  -----------
  [libc++] Optimize ranges::equal for vector<bool>::iterator (#121084)

This PR optimizes the performance of `std::ranges::equal` for
`vector<bool>::iterator`, addressing a subtask outlined in issue #64038.
The optimizations yield performance improvements of up to 188x for
aligned equality comparison and 82x for unaligned equality
comparison. Moreover, comprehensive tests covering up to 4 storage words
(256 bytes) with odd and even bit sizes are provided, which validate the
proposed optimizations in this patch.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list