[all-commits] [llvm/llvm-project] fb6feb: [ADT] Restore handwritten vector find in SmallSet ...
Victor Campos via All-commits
all-commits at lists.llvm.org
Mon Sep 30 08:40:17 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fb6feb86a7dc324dcb2516397ba3fc5fe05ea584
https://github.com/llvm/llvm-project/commit/fb6feb86a7dc324dcb2516397ba3fc5fe05ea584
Author: Victor Campos <victor.campos at arm.com>
Date: 2024-09-30 (Mon, 30 Sep 2024)
Changed paths:
M llvm/include/llvm/ADT/SmallSet.h
Log Message:
-----------
[ADT] Restore handwritten vector find in SmallSet (#110254)
This patch restores handwritten linear searches instead of the use of
std::find.
After PR #109412, a performance regression was observed that's caused by
the use of std::find for linear searches.
The exact cause wasn't pinpointed, but, at the time of writing, the most
likely culprit is the forced loop unrolling in the definition of
libstdc++'s std::find. Presumably this is done to optimise for larger
containers.
However for the case of small containers such as SmallVector, this
actually hurts performance.
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