From b6268ea791bc989679227facbf528cc98f096ff4 Mon Sep 17 00:00:00 2001 From: HÃ¥vard Pettersen Date: Thu, 12 Nov 2020 16:08:46 +0000 Subject: added spin lock with test The micro-benchmark shows promise (run test manually with 'verbose' as parameter). It indicates that taking and releasing the spin lock from a single thread is cheaper than doing the same with a normal mutex (as expected based on previous tests). However, it also indicates that it is competitive with a normal mutex for short critical sections with multiple threads involved. (on my laptop, only the cases using more threads than cores run faster with a normal mutex, which is a better result than expected). --- vespalib/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'vespalib/CMakeLists.txt') diff --git a/vespalib/CMakeLists.txt b/vespalib/CMakeLists.txt index 278d32c118d..dbcf2beadd8 100644 --- a/vespalib/CMakeLists.txt +++ b/vespalib/CMakeLists.txt @@ -100,6 +100,7 @@ vespa_define_module( src/tests/slime src/tests/slime/external_data_value src/tests/slime/summary-feature-benchmark + src/tests/spin_lock src/tests/stash src/tests/stllike src/tests/stringfmt -- cgit v1.2.3