[all-commits] [llvm/llvm-project] 61efe3: [lldb] Avoid unnecessary regex check in dwim-print...
Dave Lee via All-commits
all-commits at lists.llvm.org
Fri Mar 7 21:57:27 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 61efe360f9ba70736ca27ad289277c5c8268ffc0
https://github.com/llvm/llvm-project/commit/61efe360f9ba70736ca27ad289277c5c8268ffc0
Author: Dave Lee <davelee.com at gmail.com>
Date: 2025-03-07 (Fri, 07 Mar 2025)
Changed paths:
M lldb/source/Commands/CommandObjectDWIMPrint.cpp
Log Message:
-----------
[lldb] Avoid unnecessary regex check in dwim-print (#114608)
An (unmeasured) improvement to performance of `dwim-print` when used as `po`.
This change lifts the check for `note_shown` to the top of the lambda, to avoid all subsequent work when the hint has already been shown. The main effect is to avoid performing a regex match when the hint is not going to be shown.
This change also constructs the `std::regex` only once, by making it static.
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