[all-commits] [llvm/llvm-project] c9e5af: [DenseMap] Optimize find/erase
Fangrui Song via All-commits
all-commits at lists.llvm.org
Thu Jul 25 14:07:52 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c9e5af3944e85c5f1272c48522b4e9eda398b462
https://github.com/llvm/llvm-project/commit/c9e5af3944e85c5f1272c48522b4e9eda398b462
Author: Fangrui Song <i at maskray.me>
Date: 2024-07-25 (Thu, 25 Jul 2024)
Changed paths:
M llvm/include/llvm/ADT/DenseMap.h
Log Message:
-----------
[DenseMap] Optimize find/erase
`LookupBucketFor` is used for `find`, `insert`, `erase`, and their
variants. While tombstone comparison isn't needed by `find`/`erase`,
`LookupBucketFor` calls `getTombstoneKey` regardless, which might have
an opaque implementation or just not optimized out, leading to
unnecessary overhead for `find` and `erase`.
Pull Request: https://github.com/llvm/llvm-project/pull/100517
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