[all-commits] [llvm/llvm-project] c9d475: [libc++abi] Improve performance of __dynamic_cast

Sirui Mu via All-commits all-commits at lists.llvm.org
Sun Mar 19 02:05:17 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c9d475c937d2dc7e72ffa78acebaac3f6a2b5015
      https://github.com/llvm/llvm-project/commit/c9d475c937d2dc7e72ffa78acebaac3f6a2b5015
  Author: Sirui Mu <msrlancern at gmail.com>
  Date:   2023-03-19 (Sun, 19 Mar 2023)

  Changed paths:
    M libcxx/benchmarks/CMakeLists.txt
    A libcxx/benchmarks/libcxxabi/dynamic_cast.bench.cpp
    M libcxx/docs/ReleaseNotes.rst
    M libcxxabi/src/private_typeinfo.cpp

  Log Message:
  -----------
  [libc++abi] Improve performance of __dynamic_cast

The original `__dynamic_cast` implementation does not use the ABI-provided `src2dst_offset` parameter which helps improve performance on the hot paths. This patch improves the performance on the hot paths in `__dynamic_cast` by leveraging hints provided by the `src2dst_offset` parameter. This patch also includes a performance benchmark suite for the `__dynamic_cast` implementation.

Reviewed By: philnik, ldionne, #libc, #libc_abi, avogelsgesang

Spies: mikhail.ramalho, avogelsgesang, xingxue, libcxx-commits

Differential Revision: https://reviews.llvm.org/D138005




More information about the All-commits mailing list