[all-commits] [llvm/llvm-project] e04d12: [libc++] Call basic_string_view's assume-valid con...
Christopher Di Bella via All-commits
all-commits at lists.llvm.org
Mon Aug 26 08:58:57 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e04d124a96311d3714522125bf703950863e0540
https://github.com/llvm/llvm-project/commit/e04d124a96311d3714522125bf703950863e0540
Author: Christopher Di Bella <cjdb at google.com>
Date: 2024-08-26 (Mon, 26 Aug 2024)
Changed paths:
M libcxx/include/string
M libcxx/include/string_view
Log Message:
-----------
[libc++] Call basic_string_view's assume-valid constructor from basic_string operations (#105863)
`basic_string` frequently calls `basic_string_view(data(), size())`,
which accounts for ~15% of the observed overhead when hardening is
enabled. This commit removes unnecessary checks when `basic_string` is
known to already have valid data, by bypassing the public constructor,
so that we eliminate that overhead.
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