From eb1741d0d4dc29807375f3ccb11f0f5ca358b7dc Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Mon, 18 Sep 2023 21:27:22 +0100 Subject: [PATCH] [+] Benchmark std::shared_timed_mutex [*] Update RT/Bug fixes [*] Update build scripts --- Aurora/Runtime | 2 +- Build_Scripts | 2 +- Tests/Public/2. Hello Threading/Main.cpp | 25 ++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/Aurora/Runtime b/Aurora/Runtime index 5d12f1a..2a0ff9a 160000 --- a/Aurora/Runtime +++ b/Aurora/Runtime @@ -1 +1 @@ -Subproject commit 5d12f1a203ff731b685c0163ad62671857b34f4d +Subproject commit 2a0ff9ab0cfb3d4235000559e6ea8bc8ef5d9a52 diff --git a/Build_Scripts b/Build_Scripts index 21e2df1..af12c8a 160000 --- a/Build_Scripts +++ b/Build_Scripts @@ -1 +1 @@ -Subproject commit 21e2df1ebb589c4845fb644c255ca0b2d7129782 +Subproject commit af12c8ac8c20bdf48f038f2ecc96c13830e8f57f diff --git a/Tests/Public/2. Hello Threading/Main.cpp b/Tests/Public/2. Hello Threading/Main.cpp index dc6e902..2a2e702 100644 --- a/Tests/Public/2. Hello Threading/Main.cpp +++ b/Tests/Public/2. Hello Threading/Main.cpp @@ -15,6 +15,8 @@ #include #endif +#include + TEST(Allocationless, SOO) { { @@ -322,6 +324,29 @@ TEST(Mutex, Benchmark) } } + { + SysBenchmark("RW-Lock 19 Benchmark 1'000'000\t\t[std::shared_timed_mutex]\t"); + + + for (AU_ITERATE_N(i, 1'000'000)) + { + std::shared_timed_mutex rwLock; + rwLock.lock(); + rwLock.unlock(); + } + } + + { + SysBenchmark("RW-Lock 20 Benchmark 1'000'000 [no-new]\t[std::shared_timed_mutex]\t"); + std::shared_timed_mutex rwLock; + + for (AU_ITERATE_N(i, 1'000'000)) + { + rwLock.lock(); + rwLock.unlock(); + } + } + /* Windows 7, i9 9900k (Q4 2018) @ 5GHz under KVM (v5.16.16), modified OVMF/EDK II, and modified QEMU: 08:13:17 [Debug] | [Benchmark] Mutex Benchmark 1'000'000 took 10.23965ms