From 77603174052b8b6a7e5d90ddf94fb9699f78e085 Mon Sep 17 00:00:00 2001 From: bill Date: Wed, 2 Nov 2022 05:14:41 +0800 Subject: [PATCH] Update 'README.md' --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9b4f929..e7af530 100644 --- a/README.md +++ b/README.md @@ -2,23 +2,24 @@ This code tests the best way to collaborate between threads -Platform tested: +## Platform tested: - Windows (MSVC, gcc-12.2, WSL-gcc11.2, WSL-clang-14) - macOS (clang-13, gcc-12.2) - Linux (gcc-12.1, gcc-11.3, clang-12) - arm64 Linux (gcc-12.1, clang-12) -Method tested: +## Method tested: - C++20 std::semaphores - Native semaphores - Condition Variables - Busy waiting (spinlock) with or without delay -Results: +## Results: +``` macOS linux win, msc win, gcc -cv 6000 10000 700 26000 -busy 360 300 550 300 -nsmph 600 4418 6000 1200 -smph 240 1000/dl 660 dl - +cv 6000 10000 700 26000 +busy 360 300 550 300 +nsmph 600 4418 6000 1200 +smph 240 1000/dl 660 dl +``` Bug on g++ 12.2.0 might cause deadlock, see: gcc12.2.0deadlockbug.cpp