[all-commits] [llvm/llvm-project] 2f14d7: [lldb][NFC] Use DenseMap in ObjCLanguageRuntime
Felipe de Azevedo Piovezan via All-commits
all-commits at lists.llvm.org
Wed May 13 06:31:24 PDT 2026
Branch: refs/heads/users/felipepiovezan/objc_speedup2
Home: https://github.com/llvm/llvm-project
Commit: 2f14d7561f9f3326a0715b5e88b07ba102b8b8f4
https://github.com/llvm/llvm-project/commit/2f14d7561f9f3326a0715b5e88b07ba102b8b8f4
Author: Felipe de Azevedo Piovezan <fpiovezan at apple.com>
Date: 2026-05-13 (Wed, 13 May 2026)
Changed paths:
M lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
M lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
Log Message:
-----------
[lldb][NFC] Use DenseMap in ObjCLanguageRuntime
This is a multimap of Hash -> ObjCISA (lldb::addr_t), and it shows up
cpu traces of swift applications. This commit replaces
`std::multimap<hash, addr_t>` with `DenseMap<hash, SmallVector<addr_t, 3>>`.
This data structure was chosen because of the following experiment. When
evaluating a frame variable command for a SwiftUI variable, this object
gets populated with ~186,000 entries:
* over a thousand of them had 2 hash collisions.
* 300 of them had 3 hash collisions.
* 21 of them had 4 hash collisions.
* 1 of them had 5 hash collisions.
On a release build (no asserts), this patch brought down the CPU cycles
measured for that command from 487M cycles to 389M cycles.
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