From c46f633dbf3c63a67f090701c01c1d439a547417 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Tue, 12 Nov 2024 13:25:29 -0800 Subject: [PATCH] Skip sorting if already sorted for skip list --- SkipList.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SkipList.cpp b/SkipList.cpp index e2e1a4e..b3708c2 100644 --- a/SkipList.cpp +++ b/SkipList.cpp @@ -767,7 +767,9 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl { false, true); } - sortPoints(points); + if (!std::is_sorted(points.begin(), points.end())) { + sortPoints(points); + } int activeWriteCount = 0; std::vector> combinedWriteConflictRanges;