react-native-windows 0.81.34 → 0.81.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Directory.Build.props +1 -16
- package/Folly/ThreadNameStub.cpp +4 -6
- package/Microsoft.ReactNative/Fabric/Composition/BorderPrimitive.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +27 -4
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +8 -4
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +7 -3
- package/Microsoft.ReactNative/Fabric/Composition/TooltipService.cpp +48 -2
- package/Microsoft.ReactNative/Fabric/WindowsImageManager.cpp +40 -13
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +1 -7
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +0 -3
- package/Microsoft.ReactNative/TurboModulesProvider.cpp +30 -13
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/PropertySheets/React.Cpp.props +3 -3
- package/ReactCommon/ReactCommon.vcxproj +0 -10
- package/ReactCommon/packages.lock.win32.json +0 -10
- package/Scripts/Tfs/Layout-Desktop-Headers.ps1 +4 -37
- package/Scripts/creaternwlib.cmd +2 -2
- package/Shared/Shared.vcxitems +2 -0
- package/{Folly → external}/.clang-format +0 -1
- package/external/External.vcxitems +10 -0
- package/external/fast-float/.syncignore +10 -0
- package/external/fast-float/LICENSE-APACHE +190 -0
- package/external/fast-float/LICENSE-BOOST +23 -0
- package/external/fast-float/LICENSE-MIT +27 -0
- package/external/fast-float/README.md +545 -0
- package/external/fast-float/cgmanifest.json +15 -0
- package/external/fast-float/fast-float.vcxitems +14 -0
- package/external/fast-float/include/fast_float/ascii_number.h +588 -0
- package/external/fast-float/include/fast_float/bigint.h +638 -0
- package/external/fast-float/include/fast_float/constexpr_feature_detect.h +46 -0
- package/external/fast-float/include/fast_float/decimal_to_binary.h +212 -0
- package/external/fast-float/include/fast_float/digit_comparison.h +457 -0
- package/external/fast-float/include/fast_float/fast_float.h +59 -0
- package/external/fast-float/include/fast_float/fast_table.h +708 -0
- package/external/fast-float/include/fast_float/float_common.h +1240 -0
- package/external/fast-float/include/fast_float/parse_number.h +399 -0
- package/external/fast-float/sync-config.json +8 -0
- package/external/fmt/.syncignore +10 -0
- package/external/fmt/CONTRIBUTING.md +20 -0
- package/external/fmt/LICENSE +27 -0
- package/external/fmt/README.md +484 -0
- package/{fmt → external/fmt}/cgmanifest.json +1 -1
- package/external/fmt/doc/ChangeLog-old.md +3290 -0
- package/external/fmt/doc/api.md +650 -0
- package/external/fmt/doc/fmt.css +61 -0
- package/external/fmt/doc/fmt.js +4 -0
- package/external/fmt/doc/get-started.md +222 -0
- package/external/fmt/doc/index.md +151 -0
- package/external/fmt/doc/perf.svg +1 -0
- package/external/fmt/doc/python-license.txt +290 -0
- package/external/fmt/doc/syntax.md +887 -0
- package/external/fmt/fmt.vcxitems +28 -0
- package/external/fmt/include/fmt/args.h +228 -0
- package/{fmt/TEMP_UntilFmtUpdate/core.h → external/fmt/include/fmt/base.h} +1188 -1036
- package/external/fmt/include/fmt/chrono.h +2432 -0
- package/external/fmt/include/fmt/color.h +612 -0
- package/external/fmt/include/fmt/compile.h +529 -0
- package/external/fmt/include/fmt/core.h +5 -0
- package/external/fmt/include/fmt/format-inl.h +1928 -0
- package/external/fmt/include/fmt/format.h +4427 -0
- package/external/fmt/include/fmt/os.h +439 -0
- package/external/fmt/include/fmt/ostream.h +211 -0
- package/external/fmt/include/fmt/printf.h +656 -0
- package/external/fmt/include/fmt/ranges.h +882 -0
- package/external/fmt/include/fmt/std.h +699 -0
- package/external/fmt/include/fmt/xchar.h +322 -0
- package/external/fmt/src/fmt.cc +135 -0
- package/external/fmt/src/format.cc +43 -0
- package/external/fmt/src/os.cc +403 -0
- package/external/fmt/sync-config.json +8 -0
- package/external/folly/.syncignore +60 -0
- package/external/folly/LICENSE +200 -0
- package/external/folly/README.md +263 -0
- package/{fmt → external/folly/folly}/.clang-format +0 -1
- package/external/folly/folly/AtomicHashArray-inl.h +546 -0
- package/external/folly/folly/AtomicHashArray.h +431 -0
- package/external/folly/folly/AtomicHashMap-inl.h +653 -0
- package/external/folly/folly/AtomicHashMap.h +484 -0
- package/external/folly/folly/AtomicIntrusiveLinkedList.h +206 -0
- package/external/folly/folly/AtomicLinkedList.h +110 -0
- package/external/folly/folly/AtomicUnorderedMap.h +522 -0
- package/external/folly/folly/BUCK +1631 -0
- package/external/folly/folly/BUILD_MODE.bzl +72 -0
- package/external/folly/folly/Benchmark.cpp +986 -0
- package/external/folly/folly/Benchmark.h +680 -0
- package/external/folly/folly/BenchmarkUtil.h +47 -0
- package/external/folly/folly/Bits.h +17 -0
- package/external/folly/folly/CMakeLists.txt +110 -0
- package/external/folly/folly/CPortability.h +338 -0
- package/external/folly/folly/CancellationToken-inl.h +449 -0
- package/external/folly/folly/CancellationToken.cpp +250 -0
- package/external/folly/folly/CancellationToken.h +365 -0
- package/external/folly/folly/Chrono.h +132 -0
- package/external/folly/folly/ClockGettimeWrappers.cpp +93 -0
- package/external/folly/folly/ClockGettimeWrappers.h +29 -0
- package/external/folly/folly/ConcurrentBitSet.h +157 -0
- package/external/folly/folly/ConcurrentLazy.h +74 -0
- package/external/folly/folly/ConcurrentSkipList-inl.h +341 -0
- package/external/folly/folly/ConcurrentSkipList.h +824 -0
- package/external/folly/folly/ConstructorCallbackList.h +158 -0
- package/external/folly/folly/Conv.h +2026 -0
- package/external/folly/folly/CppAttributes.h +170 -0
- package/external/folly/folly/CpuId.h +297 -0
- package/external/folly/folly/DefaultKeepAliveExecutor.h +172 -0
- package/external/folly/folly/Demangle.cpp +255 -0
- package/external/folly/folly/Demangle.h +73 -0
- package/external/folly/folly/DiscriminatedPtr.h +236 -0
- package/external/folly/folly/DynamicConverter.h +17 -0
- package/external/folly/folly/Exception.h +150 -0
- package/external/folly/folly/ExceptionString.cpp +51 -0
- package/external/folly/folly/ExceptionString.h +33 -0
- package/external/folly/folly/ExceptionWrapper-inl.h +264 -0
- package/external/folly/folly/ExceptionWrapper.cpp +37 -0
- package/external/folly/folly/ExceptionWrapper.h +377 -0
- package/external/folly/folly/Executor.cpp +111 -0
- package/external/folly/folly/Executor.h +351 -0
- package/external/folly/folly/Expected.h +1725 -0
- package/external/folly/folly/FBString.h +2888 -0
- package/external/folly/folly/FBVector.h +17 -0
- package/external/folly/folly/File.cpp +180 -0
- package/external/folly/folly/File.h +177 -0
- package/external/folly/folly/FileUtil.cpp +378 -0
- package/external/folly/folly/FileUtil.h +332 -0
- package/external/folly/folly/Fingerprint.cpp +135 -0
- package/external/folly/folly/Fingerprint.h +289 -0
- package/external/folly/folly/FixedString.h +2965 -0
- package/external/folly/folly/FollyMemcpy.cpp +30 -0
- package/external/folly/folly/FollyMemcpy.h +23 -0
- package/external/folly/folly/FollyMemset.cpp +29 -0
- package/external/folly/folly/FollyMemset.h +25 -0
- package/external/folly/folly/Format-inl.h +1152 -0
- package/external/folly/folly/Format.cpp +429 -0
- package/external/folly/folly/Format.h +463 -0
- package/external/folly/folly/FormatArg.h +285 -0
- package/external/folly/folly/FormatTraits.h +65 -0
- package/external/folly/folly/Function.h +1159 -0
- package/external/folly/folly/GLog.h +85 -0
- package/external/folly/folly/GroupVarint.cpp +153 -0
- package/external/folly/folly/GroupVarint.h +630 -0
- package/external/folly/folly/Hash.h +20 -0
- package/external/folly/folly/IPAddress.cpp +490 -0
- package/external/folly/folly/IPAddress.h +667 -0
- package/external/folly/folly/IPAddressException.h +82 -0
- package/external/folly/folly/IPAddressV4.cpp +305 -0
- package/external/folly/folly/IPAddressV4.h +495 -0
- package/external/folly/folly/IPAddressV6.cpp +541 -0
- package/external/folly/folly/IPAddressV6.h +627 -0
- package/external/folly/folly/Indestructible.h +164 -0
- package/external/folly/folly/IndexedMemPool.h +550 -0
- package/external/folly/folly/IntrusiveList.h +17 -0
- package/external/folly/folly/Lazy.h +142 -0
- package/external/folly/folly/Likely.h +76 -0
- package/external/folly/folly/MPMCPipeline.h +280 -0
- package/external/folly/folly/MPMCQueue.h +1556 -0
- package/external/folly/folly/MacAddress.cpp +188 -0
- package/external/folly/folly/MacAddress.h +260 -0
- package/external/folly/folly/MapUtil.h +17 -0
- package/external/folly/folly/Math.h +258 -0
- package/external/folly/folly/MaybeManagedPtr.h +120 -0
- package/external/folly/folly/Memory.h +900 -0
- package/external/folly/folly/MicroLock.cpp +76 -0
- package/external/folly/folly/MicroLock.h +354 -0
- package/external/folly/folly/MicroSpinLock.h +17 -0
- package/external/folly/folly/MoveWrapper.h +76 -0
- package/external/folly/folly/ObserverContainer.h +1026 -0
- package/external/folly/folly/Optional.h +743 -0
- package/external/folly/folly/Overload.h +325 -0
- package/external/folly/folly/PackedSyncPtr.h +147 -0
- package/external/folly/folly/Padded.h +464 -0
- package/external/folly/folly/Poly-inl.h +230 -0
- package/external/folly/folly/Poly.h +1095 -0
- package/external/folly/folly/PolyException.h +43 -0
- package/external/folly/folly/Portability.h +644 -0
- package/external/folly/folly/Preprocessor.h +236 -0
- package/external/folly/folly/ProducerConsumerQueue.h +182 -0
- package/external/folly/folly/RWSpinLock.h +17 -0
- package/external/folly/folly/Random-inl.h +86 -0
- package/external/folly/folly/Random.cpp +184 -0
- package/external/folly/folly/Random.h +434 -0
- package/external/folly/folly/Range.h +1772 -0
- package/external/folly/folly/Replaceable.h +636 -0
- package/external/folly/folly/ScopeGuard.cpp +29 -0
- package/external/folly/folly/ScopeGuard.h +420 -0
- package/external/folly/folly/SharedMutex.cpp +81 -0
- package/external/folly/folly/SharedMutex.h +1751 -0
- package/external/folly/folly/Singleton-inl.h +332 -0
- package/external/folly/folly/Singleton.cpp +512 -0
- package/external/folly/folly/Singleton.h +891 -0
- package/external/folly/folly/SingletonThreadLocal.cpp +53 -0
- package/external/folly/folly/SingletonThreadLocal.h +263 -0
- package/external/folly/folly/SocketAddress.cpp +786 -0
- package/external/folly/folly/SocketAddress.h +768 -0
- package/external/folly/folly/SpinLock.h +55 -0
- package/external/folly/folly/String-inl.h +668 -0
- package/external/folly/folly/String.cpp +777 -0
- package/external/folly/folly/String.h +767 -0
- package/external/folly/folly/Subprocess.cpp +1142 -0
- package/external/folly/folly/Subprocess.h +1055 -0
- package/external/folly/folly/Synchronized.h +1833 -0
- package/external/folly/folly/SynchronizedPtr.h +106 -0
- package/external/folly/folly/ThreadCachedInt.h +175 -0
- package/external/folly/folly/ThreadLocal.h +478 -0
- package/external/folly/folly/TimeoutQueue.cpp +78 -0
- package/external/folly/folly/TimeoutQueue.h +123 -0
- package/external/folly/folly/TokenBucket.h +673 -0
- package/external/folly/folly/Traits.h +1442 -0
- package/external/folly/folly/Try-inl.h +372 -0
- package/external/folly/folly/Try.cpp +23 -0
- package/external/folly/folly/Try.h +728 -0
- package/external/folly/folly/UTF8String.h +56 -0
- package/external/folly/folly/Unicode.cpp +201 -0
- package/external/folly/folly/Unicode.h +94 -0
- package/external/folly/folly/Unit.h +65 -0
- package/external/folly/folly/Uri-inl.h +101 -0
- package/external/folly/folly/Uri.cpp +190 -0
- package/external/folly/folly/Uri.h +142 -0
- package/external/folly/folly/Utility.h +932 -0
- package/external/folly/folly/VERSION +1 -0
- package/external/folly/folly/Varint.h +230 -0
- package/external/folly/folly/VirtualExecutor.h +17 -0
- package/external/folly/folly/algorithm/simd/BUCK +47 -0
- package/external/folly/folly/algorithm/simd/Contains.cpp +42 -0
- package/external/folly/folly/algorithm/simd/Contains.h +116 -0
- package/external/folly/folly/algorithm/simd/FindFixed.h +301 -0
- package/external/folly/folly/algorithm/simd/Ignore.h +52 -0
- package/external/folly/folly/algorithm/simd/Movemask.h +207 -0
- package/external/folly/folly/algorithm/simd/detail/BUCK +70 -0
- package/external/folly/folly/algorithm/simd/detail/ContainsImpl.h +91 -0
- package/external/folly/folly/algorithm/simd/detail/SimdAnyOf.h +83 -0
- package/external/folly/folly/algorithm/simd/detail/SimdForEach.h +209 -0
- package/external/folly/folly/algorithm/simd/detail/SimdPlatform.h +445 -0
- package/external/folly/folly/algorithm/simd/detail/Traits.h +125 -0
- package/external/folly/folly/algorithm/simd/detail/UnrollUtils.h +126 -0
- package/external/folly/folly/base64.h +264 -0
- package/external/folly/folly/chrono/BUCK +29 -0
- package/external/folly/folly/chrono/Clock.h +65 -0
- package/external/folly/folly/chrono/Conv.h +712 -0
- package/external/folly/folly/chrono/test/BUCK +26 -0
- package/external/folly/folly/chrono/test/ClockTest.cpp +68 -0
- package/external/folly/folly/chrono/test/ConvTest.cpp +652 -0
- package/external/folly/folly/concurrency/AtomicSharedPtr.h +387 -0
- package/external/folly/folly/concurrency/BUCK +170 -0
- package/external/folly/folly/concurrency/CacheLocality.h +460 -0
- package/external/folly/folly/concurrency/ConcurrentHashMap.h +822 -0
- package/external/folly/folly/concurrency/CoreCachedSharedPtr.h +232 -0
- package/external/folly/folly/concurrency/DeadlockDetector.cpp +27 -0
- package/external/folly/folly/concurrency/DeadlockDetector.h +44 -0
- package/external/folly/folly/concurrency/DynamicBoundedQueue.h +751 -0
- package/external/folly/folly/concurrency/PriorityUnboundedQueueSet.h +207 -0
- package/external/folly/folly/concurrency/ProcessLocalUniqueId.cpp +46 -0
- package/external/folly/folly/concurrency/ProcessLocalUniqueId.h +38 -0
- package/external/folly/folly/concurrency/SingletonRelaxedCounter.h +325 -0
- package/external/folly/folly/concurrency/ThreadCachedSynchronized.h +227 -0
- package/external/folly/folly/concurrency/UnboundedQueue.h +891 -0
- package/external/folly/folly/concurrency/container/BUCK +77 -0
- package/external/folly/folly/concurrency/container/FlatCombiningPriorityQueue.h +426 -0
- package/external/folly/folly/concurrency/container/LockFreeRingBuffer.h +306 -0
- package/external/folly/folly/concurrency/container/RelaxedConcurrentPriorityQueue.h +1212 -0
- package/external/folly/folly/concurrency/container/SingleWriterFixedHashMap.h +322 -0
- package/external/folly/folly/concurrency/container/atomic_grow_array.h +564 -0
- package/external/folly/folly/concurrency/container/test/BUCK +75 -0
- package/external/folly/folly/concurrency/container/test/FlatCombiningPriorityQueueTest.cpp +570 -0
- package/external/folly/folly/concurrency/container/test/LockFreeRingBufferTest.cpp +276 -0
- package/external/folly/folly/concurrency/container/test/RelaxedConcurrentPriorityQueueTest.cpp +1570 -0
- package/external/folly/folly/concurrency/container/test/SingleWriterFixedHashMapTest.cpp +401 -0
- package/external/folly/folly/concurrency/container/test/atomic_grow_array_test.cpp +187 -0
- package/external/folly/folly/concurrency/detail/AtomicSharedPtr-detail.h +212 -0
- package/external/folly/folly/concurrency/detail/ConcurrentHashMap-detail.h +1911 -0
- package/external/folly/folly/concurrency/memory/AtomicReadMostlyMainPtr.cpp +43 -0
- package/external/folly/folly/concurrency/memory/AtomicReadMostlyMainPtr.h +190 -0
- package/external/folly/folly/concurrency/memory/BUCK +53 -0
- package/external/folly/folly/concurrency/memory/PrimaryPtr.h +338 -0
- package/external/folly/folly/concurrency/memory/ReadMostlySharedPtr.h +511 -0
- package/external/folly/folly/concurrency/memory/TLRefCount.h +228 -0
- package/external/folly/folly/concurrency/memory/test/AtomicReadMostlyMainPtrBenchmark.cpp +56 -0
- package/external/folly/folly/concurrency/memory/test/AtomicReadMostlyMainPtrTest.cpp +454 -0
- package/external/folly/folly/concurrency/memory/test/BUCK +95 -0
- package/external/folly/folly/concurrency/memory/test/PrimaryPtrTest.cpp +303 -0
- package/external/folly/folly/concurrency/memory/test/ReadMostlySharedPtrBenchmark.cpp +138 -0
- package/external/folly/folly/concurrency/memory/test/ReadMostlySharedPtrStressTest.cpp +75 -0
- package/external/folly/folly/concurrency/memory/test/ReadMostlySharedPtrTest.cpp +378 -0
- package/external/folly/folly/concurrency/memory/test/RefCountBenchmark.cpp +90 -0
- package/external/folly/folly/concurrency/memory/test/RefCountTest.cpp +168 -0
- package/external/folly/folly/concurrency/test/AtomicSharedPtrCounted.h +156 -0
- package/external/folly/folly/concurrency/test/AtomicSharedPtrPerformance.cpp +255 -0
- package/external/folly/folly/concurrency/test/AtomicSharedPtrTest.cpp +257 -0
- package/external/folly/folly/concurrency/test/BUCK +229 -0
- package/external/folly/folly/concurrency/test/CacheLocalityBenchmark.cpp +392 -0
- package/external/folly/folly/concurrency/test/CacheLocalityTest.cpp +1229 -0
- package/external/folly/folly/concurrency/test/ConcurrentHashMapBench.cpp +260 -0
- package/external/folly/folly/concurrency/test/ConcurrentHashMapTest.cpp +1242 -0
- package/external/folly/folly/concurrency/test/CoreCachedSharedPtrTest.cpp +408 -0
- package/external/folly/folly/concurrency/test/DynamicBoundedQueueTest.cpp +984 -0
- package/external/folly/folly/concurrency/test/PriorityUnboundedQueueSetTest.cpp +73 -0
- package/external/folly/folly/concurrency/test/ProcessLocalUniqueIdTest.cpp +66 -0
- package/external/folly/folly/concurrency/test/SingletonRelaxedCounterBench.cpp +101 -0
- package/external/folly/folly/concurrency/test/SingletonRelaxedCounterTest.cpp +185 -0
- package/external/folly/folly/concurrency/test/ThreadCachedSynchronizedBench.cpp +76 -0
- package/external/folly/folly/concurrency/test/ThreadCachedSynchronizedTest.cpp +93 -0
- package/external/folly/folly/concurrency/test/UnboundedQueueTest.cpp +1302 -0
- package/external/folly/folly/container/Access.h +57 -0
- package/external/folly/folly/container/Array.h +87 -0
- package/external/folly/folly/container/BUCK +353 -0
- package/external/folly/folly/container/BitIterator.h +203 -0
- package/external/folly/folly/container/Enumerate.h +162 -0
- package/external/folly/folly/container/EvictingCacheMap.h +730 -0
- package/external/folly/folly/container/F14.md +300 -0
- package/external/folly/folly/container/F14Map-fwd.h +113 -0
- package/external/folly/folly/container/F14Map.h +2108 -0
- package/external/folly/folly/container/F14Set-fwd.h +95 -0
- package/external/folly/folly/container/F14Set.h +1603 -0
- package/external/folly/folly/container/FBVector.h +1711 -0
- package/external/folly/folly/container/Foreach-inl.h +316 -0
- package/external/folly/folly/container/Foreach.h +209 -0
- package/external/folly/folly/container/HeterogeneousAccess-fwd.h +33 -0
- package/external/folly/folly/container/HeterogeneousAccess.h +171 -0
- package/external/folly/folly/container/IntrusiveHeap.h +268 -0
- package/external/folly/folly/container/IntrusiveList.h +131 -0
- package/external/folly/folly/container/Iterator.h +843 -0
- package/external/folly/folly/container/MapUtil.h +376 -0
- package/external/folly/folly/container/Merge.h +90 -0
- package/external/folly/folly/container/RegexMatchCache.cpp +521 -0
- package/external/folly/folly/container/RegexMatchCache.h +699 -0
- package/external/folly/folly/container/Reserve.h +109 -0
- package/external/folly/folly/container/SparseByteSet.h +123 -0
- package/external/folly/folly/container/View.h +81 -0
- package/external/folly/folly/container/WeightedEvictingCacheMap.h +651 -0
- package/external/folly/folly/container/detail/BUCK +115 -0
- package/external/folly/folly/container/detail/BitIteratorDetail.h +87 -0
- package/external/folly/folly/container/detail/F14Defaults.h +34 -0
- package/external/folly/folly/container/detail/F14IntrinsicsAvailability.h +67 -0
- package/external/folly/folly/container/detail/F14MapFallback.h +717 -0
- package/external/folly/folly/container/detail/F14Mask.h +235 -0
- package/external/folly/folly/container/detail/F14Policy.h +1523 -0
- package/external/folly/folly/container/detail/F14SetFallback.h +528 -0
- package/external/folly/folly/container/detail/F14Table.cpp +71 -0
- package/external/folly/folly/container/detail/F14Table.h +2680 -0
- package/external/folly/folly/container/detail/Util.h +303 -0
- package/external/folly/folly/container/detail/tape_detail.h +135 -0
- package/external/folly/folly/container/detail/test/BUCK +14 -0
- package/external/folly/folly/container/detail/test/F14DetailTest.cpp +47 -0
- package/external/folly/folly/container/heap_vector_types.h +1683 -0
- package/external/folly/folly/container/range_traits.h +81 -0
- package/external/folly/folly/container/small_vector.h +1476 -0
- package/external/folly/folly/container/sorted_vector_types.h +1652 -0
- package/external/folly/folly/container/span.h +408 -0
- package/external/folly/folly/container/tape.h +608 -0
- package/external/folly/folly/container/test/.clang-tidy +12 -0
- package/external/folly/folly/container/test/AccessTest.cpp +138 -0
- package/external/folly/folly/container/test/ArrayTest.cpp +84 -0
- package/external/folly/folly/container/test/BUCK +568 -0
- package/external/folly/folly/container/test/BitIteratorBench.cpp +112 -0
- package/external/folly/folly/container/test/BitIteratorTest.cpp +109 -0
- package/external/folly/folly/container/test/EnumerateTest.cpp +294 -0
- package/external/folly/folly/container/test/EvictingCacheMapBench.cpp +80 -0
- package/external/folly/folly/container/test/EvictingCacheMapTest.cpp +842 -0
- package/external/folly/folly/container/test/F14AsanSupportTest.cpp +143 -0
- package/external/folly/folly/container/test/F14FwdTest.cpp +37 -0
- package/external/folly/folly/container/test/F14InterprocessTest.cpp +404 -0
- package/external/folly/folly/container/test/F14MapTest.cpp +2543 -0
- package/external/folly/folly/container/test/F14PolicyTest.cpp +49 -0
- package/external/folly/folly/container/test/F14SetTest.cpp +1738 -0
- package/external/folly/folly/container/test/F14SmallOverheads.cpp +215 -0
- package/external/folly/folly/container/test/F14TestUtil.h +117 -0
- package/external/folly/folly/container/test/FBVectorBenchmark.cpp +380 -0
- package/external/folly/folly/container/test/FBVectorBenchmarks.cpp.h +100 -0
- package/external/folly/folly/container/test/FBVectorTest.cpp +326 -0
- package/external/folly/folly/container/test/FBVectorTests.cpp.h +304 -0
- package/external/folly/folly/container/test/ForeachBenchmark.cpp +388 -0
- package/external/folly/folly/container/test/ForeachTest.cpp +338 -0
- package/external/folly/folly/container/test/HashMapsBench.cpp +458 -0
- package/external/folly/folly/container/test/HeterogeneousAccessTest.cpp +242 -0
- package/external/folly/folly/container/test/IntrusiveHeapTest.cpp +262 -0
- package/external/folly/folly/container/test/IteratorTest.cpp +989 -0
- package/external/folly/folly/container/test/MapUtilTest.cpp +365 -0
- package/external/folly/folly/container/test/MergeTest.cpp +66 -0
- package/external/folly/folly/container/test/RegexMatchCacheTest.cpp +634 -0
- package/external/folly/folly/container/test/ReserveTest.cpp +173 -0
- package/external/folly/folly/container/test/SparseByteSetBenchmark.cpp +153 -0
- package/external/folly/folly/container/test/SparseByteSetTest.cpp +117 -0
- package/external/folly/folly/container/test/TrackingTypes.h +584 -0
- package/external/folly/folly/container/test/UtilTest.cpp +609 -0
- package/external/folly/folly/container/test/WeightedEvictingCacheMapTest.cpp +800 -0
- package/external/folly/folly/container/test/heap_vector_types_test.cpp +1774 -0
- package/external/folly/folly/container/test/range_traits_test.cpp +59 -0
- package/external/folly/folly/container/test/small_vector_test.cpp +1571 -0
- package/external/folly/folly/container/test/sorted_vector_test.cpp +1589 -0
- package/external/folly/folly/container/test/span_test.cpp +520 -0
- package/external/folly/folly/container/test/tape_bench.cpp +200 -0
- package/external/folly/folly/container/test/tape_test.cpp +590 -0
- package/external/folly/folly/defs.bzl +238 -0
- package/external/folly/folly/detail/AsyncTrace.cpp +36 -0
- package/external/folly/folly/detail/AsyncTrace.h +44 -0
- package/external/folly/folly/detail/AtomicHashUtils.h +42 -0
- package/external/folly/folly/detail/AtomicUnorderedMapUtils.h +80 -0
- package/external/folly/folly/detail/BUCK +406 -0
- package/external/folly/folly/detail/DiscriminatedPtrDetail.h +172 -0
- package/external/folly/folly/detail/FileUtilDetail.cpp +63 -0
- package/external/folly/folly/detail/FileUtilDetail.h +85 -0
- package/external/folly/folly/detail/FileUtilVectorDetail.h +81 -0
- package/external/folly/folly/detail/FingerprintPolynomial.h +132 -0
- package/external/folly/folly/detail/Futex-inl.h +123 -0
- package/external/folly/folly/detail/Futex.cpp +273 -0
- package/external/folly/folly/detail/Futex.h +109 -0
- package/external/folly/folly/detail/GroupVarintDetail.h +101 -0
- package/external/folly/folly/detail/IPAddress.cpp +37 -0
- package/external/folly/folly/detail/IPAddress.h +57 -0
- package/external/folly/folly/detail/IPAddressSource.h +278 -0
- package/external/folly/folly/detail/Iterators.h +156 -0
- package/external/folly/folly/detail/MPMCPipelineDetail.h +122 -0
- package/external/folly/folly/detail/MemoryIdler.cpp +233 -0
- package/external/folly/folly/detail/MemoryIdler.h +216 -0
- package/external/folly/folly/detail/PerfScoped.cpp +112 -0
- package/external/folly/folly/detail/PerfScoped.h +70 -0
- package/external/folly/folly/detail/PolyDetail.h +921 -0
- package/external/folly/folly/detail/RangeCommon.cpp +55 -0
- package/external/folly/folly/detail/RangeCommon.h +93 -0
- package/external/folly/folly/detail/RangeSse42.cpp +198 -0
- package/external/folly/folly/detail/RangeSse42.h +30 -0
- package/external/folly/folly/detail/SimpleSimdStringUtils.cpp +31 -0
- package/external/folly/folly/detail/SimpleSimdStringUtils.h +27 -0
- package/external/folly/folly/detail/SimpleSimdStringUtilsImpl.h +63 -0
- package/external/folly/folly/detail/Singleton.h +34 -0
- package/external/folly/folly/detail/SlowFingerprint.h +90 -0
- package/external/folly/folly/detail/SocketFastOpen.cpp +175 -0
- package/external/folly/folly/detail/SocketFastOpen.h +89 -0
- package/external/folly/folly/detail/SplitStringSimd.cpp +84 -0
- package/external/folly/folly/detail/SplitStringSimd.h +151 -0
- package/external/folly/folly/detail/SplitStringSimdImpl.h +149 -0
- package/external/folly/folly/detail/Sse.cpp +35 -0
- package/external/folly/folly/detail/Sse.h +45 -0
- package/external/folly/folly/detail/StaticSingletonManager.cpp +119 -0
- package/external/folly/folly/detail/StaticSingletonManager.h +298 -0
- package/external/folly/folly/detail/ThreadLocalDetail.cpp +492 -0
- package/external/folly/folly/detail/ThreadLocalDetail.h +800 -0
- package/external/folly/folly/detail/TrapOnAvx512.cpp +41 -0
- package/external/folly/folly/detail/TrapOnAvx512.h +21 -0
- package/external/folly/folly/detail/TurnSequencer.h +295 -0
- package/external/folly/folly/detail/TypeList.h +551 -0
- package/external/folly/folly/detail/UniqueInstance.cpp +136 -0
- package/external/folly/folly/detail/UniqueInstance.h +68 -0
- package/external/folly/folly/detail/base64_detail/BUCK +102 -0
- package/external/folly/folly/detail/base64_detail/Base64Api.cpp +40 -0
- package/external/folly/folly/detail/base64_detail/Base64Api.h +101 -0
- package/external/folly/folly/detail/base64_detail/Base64Common.h +80 -0
- package/external/folly/folly/detail/base64_detail/Base64Constants.h +79 -0
- package/external/folly/folly/detail/base64_detail/Base64HiddenConstants.h +129 -0
- package/external/folly/folly/detail/base64_detail/Base64SWAR.cpp +161 -0
- package/external/folly/folly/detail/base64_detail/Base64SWAR.h +32 -0
- package/external/folly/folly/detail/base64_detail/Base64Scalar.h +262 -0
- package/external/folly/folly/detail/base64_detail/Base64Simd.h +102 -0
- package/external/folly/folly/detail/base64_detail/Base64_SSE4_2.cpp +42 -0
- package/external/folly/folly/detail/base64_detail/Base64_SSE4_2.h +33 -0
- package/external/folly/folly/detail/base64_detail/Base64_SSE4_2_Platform.h +167 -0
- package/external/folly/folly/detail/base64_detail/README.md +392 -0
- package/external/folly/folly/detail/base64_detail/tests/BUCK +36 -0
- package/external/folly/folly/detail/base64_detail/tests/Base64AgainstScalarTest.cpp +141 -0
- package/external/folly/folly/detail/base64_detail/tests/Base64PlatformTest.cpp +273 -0
- package/external/folly/folly/detail/base64_detail/tests/Base64SpecialCasesTest.cpp +555 -0
- package/external/folly/folly/detail/test/AsyncTraceTest.cpp +43 -0
- package/external/folly/folly/detail/test/BUCK +118 -0
- package/external/folly/folly/detail/test/FileUtilDetailTest.cpp +56 -0
- package/external/folly/folly/detail/test/PerfScopedTest.cpp +107 -0
- package/external/folly/folly/detail/test/SimpleSimdStringUtilsTest.cpp +92 -0
- package/external/folly/folly/detail/test/SplitStringSimdTest.cpp +242 -0
- package/external/folly/folly/detail/test/StaticSingletonManagerTest.cpp +121 -0
- package/external/folly/folly/detail/test/ThreadLocalBenchmark.cpp +116 -0
- package/external/folly/folly/detail/test/ThreadLocalDetailTest.cpp +194 -0
- package/external/folly/folly/detail/test/TrapOnAvx512TestNegative.cpp +29 -0
- package/external/folly/folly/detail/test/UniqueInstanceTest.cpp +60 -0
- package/external/folly/folly/detail/thread_local_globals.cpp +69 -0
- package/external/folly/folly/detail/thread_local_globals.h +36 -0
- package/external/folly/folly/docs/AtomicHashMap.md +134 -0
- package/external/folly/folly/docs/Benchmark.md +310 -0
- package/external/folly/folly/docs/Conv.md +291 -0
- package/external/folly/folly/docs/Dynamic.md +220 -0
- package/external/folly/folly/docs/DynamicConverter.md +71 -0
- package/external/folly/folly/docs/Executors.md +63 -0
- package/external/folly/folly/docs/FBString.md +46 -0
- package/external/folly/folly/docs/FBVector.md +200 -0
- package/external/folly/folly/docs/Fbvector--graphical_solutions.png +0 -0
- package/external/folly/folly/docs/Format.md +177 -0
- package/external/folly/folly/docs/Function.md +92 -0
- package/external/folly/folly/docs/Futures.md +263 -0
- package/external/folly/folly/docs/GroupVarint.md +46 -0
- package/external/folly/folly/docs/Histogram.md +104 -0
- package/external/folly/folly/docs/MapUtils.md +80 -0
- package/external/folly/folly/docs/Overview.md +263 -0
- package/external/folly/folly/docs/PackedSyncPtr.md +77 -0
- package/external/folly/folly/docs/Poly.md +500 -0
- package/external/folly/folly/docs/ProducerConsumerQueue.md +82 -0
- package/external/folly/folly/docs/Rcu.md +218 -0
- package/external/folly/folly/docs/SmallLocks.md +24 -0
- package/external/folly/folly/docs/Synchronized.md +793 -0
- package/external/folly/folly/docs/ThreadCachedInt.md +98 -0
- package/external/folly/folly/docs/ThreadLocal.md +105 -0
- package/external/folly/folly/docs/Traits.md +161 -0
- package/external/folly/folly/docs/small_vector.md +64 -0
- package/external/folly/folly/docs/style.css +23 -0
- package/external/folly/folly/dynamic-inl.h +17 -0
- package/external/folly/folly/dynamic.h +17 -0
- package/external/folly/folly/folly_extended_library.bzl +28 -0
- package/external/folly/folly/functional/ApplyTuple.h +204 -0
- package/external/folly/folly/functional/BUCK +57 -0
- package/external/folly/folly/functional/Invoke.h +880 -0
- package/external/folly/folly/functional/Partial.h +130 -0
- package/external/folly/folly/functional/protocol.h +203 -0
- package/external/folly/folly/functional/test/ApplyTupleTest.cpp +549 -0
- package/external/folly/folly/functional/test/BUCK +57 -0
- package/external/folly/folly/functional/test/InvokeTest.cpp +483 -0
- package/external/folly/folly/functional/test/PartialTest.cpp +141 -0
- package/external/folly/folly/functional/test/protocol_test.cpp +177 -0
- package/external/folly/folly/functional/test/traits_test.cpp +551 -0
- package/external/folly/folly/functional/traits.h +675 -0
- package/external/folly/folly/hash/BUCK +86 -0
- package/external/folly/folly/hash/Checksum.cpp +275 -0
- package/external/folly/folly/hash/Checksum.h +94 -0
- package/external/folly/folly/hash/FarmHash.h +46 -0
- package/external/folly/folly/hash/Hash.h +1045 -0
- package/external/folly/folly/hash/MurmurHash.h +86 -0
- package/external/folly/folly/hash/SpookyHashV1.cpp +391 -0
- package/external/folly/folly/hash/SpookyHashV1.h +307 -0
- package/external/folly/folly/hash/SpookyHashV2.cpp +392 -0
- package/{Folly/TEMP_UntilFollyUpdate → external/folly/folly}/hash/SpookyHashV2.h +6 -1
- package/external/folly/folly/hash/detail/BUCK +26 -0
- package/external/folly/folly/hash/detail/ChecksumDetail.cpp +296 -0
- package/external/folly/folly/hash/detail/ChecksumDetail.h +137 -0
- package/external/folly/folly/hash/detail/Crc32CombineDetail.cpp +191 -0
- package/external/folly/folly/hash/detail/Crc32cDetail.cpp +303 -0
- package/external/folly/folly/hash/test/BUCK +132 -0
- package/external/folly/folly/hash/test/ChecksumBenchmark.cpp +91 -0
- package/external/folly/folly/hash/test/ChecksumTest.cpp +587 -0
- package/external/folly/folly/hash/test/FarmHashTest.cpp +41 -0
- package/external/folly/folly/hash/test/HashBenchmark.cpp +238 -0
- package/external/folly/folly/hash/test/HashTest.cpp +997 -0
- package/external/folly/folly/hash/test/MurmurHashTest.cpp +76 -0
- package/external/folly/folly/hash/test/SpookyHashV1Test.cpp +559 -0
- package/external/folly/folly/hash/test/SpookyHashV2Test.cpp +549 -0
- package/external/folly/folly/hash/test/traits_test.cpp +69 -0
- package/external/folly/folly/hash/traits.h +115 -0
- package/external/folly/folly/json/BUCK +155 -0
- package/external/folly/folly/json/DynamicConverter.h +464 -0
- package/external/folly/folly/json/DynamicParser-inl.h +316 -0
- package/external/folly/folly/json/DynamicParser.cpp +198 -0
- package/external/folly/folly/json/DynamicParser.h +394 -0
- package/external/folly/folly/json/JSONSchema.cpp +1030 -0
- package/external/folly/folly/json/JSONSchema.h +73 -0
- package/external/folly/folly/json/JsonMockUtil.h +73 -0
- package/external/folly/folly/json/JsonTestUtil.cpp +167 -0
- package/external/folly/folly/json/JsonTestUtil.h +88 -0
- package/external/folly/folly/json/bser/BUCK +24 -0
- package/external/folly/folly/json/bser/Bser.h +107 -0
- package/external/folly/folly/json/bser/Dump.cpp +253 -0
- package/external/folly/folly/json/bser/Load.cpp +246 -0
- package/external/folly/folly/json/bser/test/BUCK +14 -0
- package/external/folly/folly/json/bser/test/BserTest.cpp +149 -0
- package/external/folly/folly/json/dynamic.cpp +552 -0
- package/external/folly/folly/json/dynamic.h +1346 -0
- package/external/folly/folly/json/json.h +238 -0
- package/external/folly/folly/json/json_patch.cpp +325 -0
- package/external/folly/folly/json/json_patch.h +126 -0
- package/external/folly/folly/json/json_pointer.cpp +114 -0
- package/external/folly/folly/json/json_pointer.h +87 -0
- package/external/folly/folly/json/test/BUCK +147 -0
- package/external/folly/folly/json/test/DynamicBenchmark.cpp +146 -0
- package/external/folly/folly/json/test/DynamicConverterTest.cpp +518 -0
- package/external/folly/folly/json/test/DynamicOtherTest.cpp +344 -0
- package/external/folly/folly/json/test/DynamicParserTest.cpp +443 -0
- package/external/folly/folly/json/test/DynamicTest.cpp +1647 -0
- package/external/folly/folly/json/test/JSONSchemaTest.cpp +450 -0
- package/external/folly/folly/json/test/JsonBenchmark.cpp +264 -0
- package/external/folly/folly/json/test/JsonOtherTest.cpp +51 -0
- package/external/folly/folly/json/test/JsonTest.cpp +1153 -0
- package/external/folly/folly/json/test/JsonTestUtilTest.cpp +97 -0
- package/external/folly/folly/json/test/json_patch_test.cpp +361 -0
- package/external/folly/folly/json/test/json_pointer_test.cpp +58 -0
- package/external/folly/folly/json/tool/BUCK +13 -0
- package/external/folly/folly/json/tool/JSONSchemaTester.cpp +58 -0
- package/external/folly/folly/json.h +17 -0
- package/external/folly/folly/json_patch.h +17 -0
- package/external/folly/folly/json_pointer.h +17 -0
- package/external/folly/folly/lang/Access.h +29 -0
- package/external/folly/folly/lang/Align.h +240 -0
- package/external/folly/folly/lang/Aligned.h +92 -0
- package/external/folly/folly/lang/Assume.h +82 -0
- package/external/folly/folly/lang/BUCK +287 -0
- package/external/folly/folly/lang/Badge.h +108 -0
- package/external/folly/folly/lang/Bits.h +570 -0
- package/external/folly/folly/lang/BitsClass.h +312 -0
- package/external/folly/folly/lang/Builtin.h +74 -0
- package/external/folly/folly/lang/CArray.h +34 -0
- package/external/folly/folly/lang/CString.cpp +86 -0
- package/external/folly/folly/lang/CString.h +55 -0
- package/external/folly/folly/lang/Cast.h +51 -0
- package/external/folly/folly/lang/CheckedMath.h +253 -0
- package/external/folly/folly/lang/CustomizationPoint.h +58 -0
- package/external/folly/folly/lang/Exception.cpp +822 -0
- package/external/folly/folly/lang/Exception.h +716 -0
- package/external/folly/folly/lang/Extern.h +55 -0
- package/external/folly/folly/lang/Hint-inl.h +144 -0
- package/external/folly/folly/lang/Hint.h +238 -0
- package/external/folly/folly/lang/Keep.h +98 -0
- package/external/folly/folly/lang/New.h +124 -0
- package/external/folly/folly/lang/Ordering.h +140 -0
- package/external/folly/folly/lang/Pretty.h +159 -0
- package/external/folly/folly/lang/PropagateConst.h +413 -0
- package/external/folly/folly/lang/RValueReferenceWrapper.h +152 -0
- package/external/folly/folly/lang/SafeAssert.cpp +589 -0
- package/external/folly/folly/lang/StaticConst.h +33 -0
- package/external/folly/folly/lang/Thunk.h +100 -0
- package/external/folly/folly/lang/TypeInfo.h +58 -0
- package/external/folly/folly/lang/UncaughtExceptions.cpp +17 -0
- package/external/folly/folly/lang/UncaughtExceptions.h +19 -0
- package/external/folly/folly/lang/test/AlignTest.cpp +87 -0
- package/external/folly/folly/lang/test/AlignedTest.cpp +130 -0
- package/external/folly/folly/lang/test/BUCK +258 -0
- package/external/folly/folly/lang/test/BadgeTest.cpp +89 -0
- package/external/folly/folly/lang/test/BitsBenchmark.cpp +164 -0
- package/external/folly/folly/lang/test/BitsClassBenchmark.cpp +122 -0
- package/external/folly/folly/lang/test/BitsClassTest.cpp +379 -0
- package/external/folly/folly/lang/test/BitsTest.cpp +577 -0
- package/external/folly/folly/lang/test/CStringTest.cpp +60 -0
- package/external/folly/folly/lang/test/CastTest.cpp +47 -0
- package/external/folly/folly/lang/test/CheckedMathTest.cpp +394 -0
- package/external/folly/folly/lang/test/ExceptionBench.cpp +427 -0
- package/external/folly/folly/lang/test/ExceptionTest.cpp +413 -0
- package/external/folly/folly/lang/test/ExternTest.cpp +39 -0
- package/external/folly/folly/lang/test/HintTest.cpp +100 -0
- package/external/folly/folly/lang/test/NewTest.cpp +38 -0
- package/external/folly/folly/lang/test/OrderingTest.cpp +105 -0
- package/external/folly/folly/lang/test/PrettyTest.cpp +44 -0
- package/external/folly/folly/lang/test/PropagateConstTest.cpp +356 -0
- package/external/folly/folly/lang/test/RValueReferenceWrapperTest.cpp +85 -0
- package/external/folly/folly/lang/test/SafeAssertTest.cpp +75 -0
- package/external/folly/folly/lang/test/ThunkTest.cpp +105 -0
- package/external/folly/folly/lang/test/ToAsciiBench.cpp +466 -0
- package/external/folly/folly/lang/test/ToAsciiTest.cpp +266 -0
- package/external/folly/folly/lang/test/TypeInfoTest.cpp +56 -0
- package/external/folly/folly/memcpy.S +292 -0
- package/external/folly/folly/memcpy_select_aarch64.cpp +145 -0
- package/external/folly/folly/memory/Arena-inl.h +83 -0
- package/external/folly/folly/memory/Arena.h +325 -0
- package/external/folly/folly/memory/BUCK +191 -0
- package/external/folly/folly/memory/JemallocHugePageAllocator.cpp +449 -0
- package/external/folly/folly/memory/JemallocHugePageAllocator.h +105 -0
- package/external/folly/folly/memory/JemallocHugePageAllocatorTest.cpp +341 -0
- package/external/folly/folly/memory/JemallocNodumpAllocator.cpp +176 -0
- package/external/folly/folly/memory/JemallocNodumpAllocator.h +119 -0
- package/external/folly/folly/memory/JemallocNodumpAllocatorTest.cpp +61 -0
- package/external/folly/folly/memory/MallctlHelper.cpp +37 -0
- package/external/folly/folly/memory/MallctlHelper.h +167 -0
- package/external/folly/folly/memory/Malloc.h +551 -0
- package/external/folly/folly/memory/MemoryResource.h +57 -0
- package/external/folly/folly/memory/ReentrantAllocator.cpp +162 -0
- package/external/folly/folly/memory/ReentrantAllocator.h +261 -0
- package/external/folly/folly/memory/SanitizeAddress.cpp +75 -0
- package/external/folly/folly/memory/SanitizeAddress.h +117 -0
- package/external/folly/folly/memory/SanitizeLeak.cpp +119 -0
- package/external/folly/folly/memory/SanitizeLeak.h +108 -0
- package/external/folly/folly/memory/ThreadCachedArena.cpp +53 -0
- package/external/folly/folly/memory/ThreadCachedArena.h +90 -0
- package/external/folly/folly/memory/UninitializedMemoryHacks.h +426 -0
- package/external/folly/folly/memory/detail/BUCK +10 -0
- package/external/folly/folly/memory/detail/MallocImpl.cpp +52 -0
- package/external/folly/folly/memory/detail/MallocImpl.h +97 -0
- package/external/folly/folly/memory/not_null-inl.h +522 -0
- package/external/folly/folly/memory/not_null.h +449 -0
- package/external/folly/folly/memory/test/ArenaTest.cpp +354 -0
- package/external/folly/folly/memory/test/BUCK +146 -0
- package/external/folly/folly/memory/test/MallctlHelperTest.cpp +169 -0
- package/external/folly/folly/memory/test/MallocBenchmark.cpp +91 -0
- package/external/folly/folly/memory/test/MallocTest.cpp +78 -0
- package/external/folly/folly/memory/test/MemoryResourceTest.cpp +31 -0
- package/external/folly/folly/memory/test/ReentrantAllocatorTest.cpp +144 -0
- package/external/folly/folly/memory/test/SanitizeAddressTest.cpp +67 -0
- package/external/folly/folly/memory/test/SanitizeLeakTest.cpp +139 -0
- package/external/folly/folly/memory/test/ThreadCachedArenaTest.cpp +276 -0
- package/external/folly/folly/memory/test/UninitializedMemoryHacksODR.cpp +21 -0
- package/external/folly/folly/memory/test/UninitializedMemoryHacksTest.cpp +327 -0
- package/external/folly/folly/memory/test/not_null_test.cpp +608 -0
- package/external/folly/folly/memset.S +245 -0
- package/external/folly/folly/memset_select_aarch64.cpp +72 -0
- package/external/folly/folly/portability/Asm.h +50 -0
- package/external/folly/folly/portability/Atomic.h +31 -0
- package/external/folly/folly/portability/BUCK +456 -0
- package/external/folly/folly/portability/Builtins.cpp +31 -0
- package/external/folly/folly/portability/Builtins.h +161 -0
- package/external/folly/folly/portability/Config.h +43 -0
- package/external/folly/folly/portability/Constexpr.h +145 -0
- package/external/folly/folly/portability/Dirent.cpp +140 -0
- package/external/folly/folly/portability/Dirent.h +41 -0
- package/external/folly/folly/portability/Event.h +44 -0
- package/external/folly/folly/portability/Fcntl.cpp +120 -0
- package/external/folly/folly/portability/Fcntl.h +67 -0
- package/external/folly/folly/portability/Filesystem.cpp +67 -0
- package/external/folly/folly/portability/Filesystem.h +114 -0
- package/external/folly/folly/portability/FmtCompile.h +40 -0
- package/external/folly/folly/portability/GFlags.h +139 -0
- package/external/folly/folly/portability/GMock.h +35 -0
- package/external/folly/folly/portability/GTest.h +35 -0
- package/external/folly/folly/portability/IOVec.h +34 -0
- package/external/folly/folly/portability/Libgen.cpp +59 -0
- package/external/folly/folly/portability/Libgen.h +29 -0
- package/external/folly/folly/portability/Libunwind.h +21 -0
- package/external/folly/folly/portability/Malloc.cpp +31 -0
- package/external/folly/folly/portability/Malloc.h +53 -0
- package/external/folly/folly/portability/Math.h +90 -0
- package/external/folly/folly/portability/Memory.h +26 -0
- package/external/folly/folly/portability/OpenSSL.cpp +17 -0
- package/external/folly/folly/portability/OpenSSL.h +102 -0
- package/external/folly/folly/portability/PThread.cpp +697 -0
- package/external/folly/folly/portability/PThread.h +148 -0
- package/external/folly/folly/portability/README.md +21 -0
- package/external/folly/folly/portability/Sched.cpp +41 -0
- package/external/folly/folly/portability/Sched.h +45 -0
- package/external/folly/folly/portability/Sockets.cpp +245 -0
- package/external/folly/folly/portability/Sockets.h +155 -0
- package/external/folly/folly/portability/SourceLocation.h +49 -0
- package/external/folly/folly/portability/Stdio.cpp +77 -0
- package/external/folly/folly/portability/Stdio.h +32 -0
- package/external/folly/folly/portability/Stdlib.cpp +172 -0
- package/external/folly/folly/portability/Stdlib.h +64 -0
- package/external/folly/folly/portability/String.cpp +53 -0
- package/external/folly/folly/portability/String.h +39 -0
- package/external/folly/folly/portability/SysFile.cpp +46 -0
- package/external/folly/folly/portability/SysFile.h +27 -0
- package/external/folly/folly/portability/SysMembarrier.cpp +104 -0
- package/external/folly/folly/portability/SysMembarrier.h +26 -0
- package/external/folly/folly/portability/SysMman.cpp +242 -0
- package/external/folly/folly/portability/SysMman.h +68 -0
- package/external/folly/folly/portability/SysResource.cpp +108 -0
- package/external/folly/folly/portability/SysResource.h +71 -0
- package/external/folly/folly/portability/SysStat.cpp +66 -0
- package/external/folly/folly/portability/SysStat.h +52 -0
- package/external/folly/folly/portability/SysSyscall.h +73 -0
- package/external/folly/folly/portability/SysTime.cpp +62 -0
- package/external/folly/folly/portability/SysTime.h +50 -0
- package/external/folly/folly/portability/SysTypes.h +44 -0
- package/external/folly/folly/portability/SysUio.cpp +179 -0
- package/external/folly/folly/portability/SysUio.h +51 -0
- package/external/folly/folly/portability/Syslog.h +39 -0
- package/external/folly/folly/portability/Time.cpp +357 -0
- package/external/folly/folly/portability/Time.h +74 -0
- package/external/folly/folly/portability/Unistd.h +111 -0
- package/external/folly/folly/portability/Windows.h +108 -0
- package/external/folly/folly/portability/openat2.c +30 -0
- package/external/folly/folly/portability/openat2.h +39 -0
- package/external/folly/folly/portability/test/BUCK +59 -0
- package/external/folly/folly/portability/test/ConstexprTest.cpp +102 -0
- package/external/folly/folly/portability/test/FilesystemTest.cpp +35 -0
- package/external/folly/folly/portability/test/LibgenTest.cpp +35 -0
- package/external/folly/folly/portability/test/OpenSSLPortabilityTest.cpp +108 -0
- package/external/folly/folly/portability/test/PThreadTest.cpp +80 -0
- package/external/folly/folly/portability/test/TimeTest.cpp +90 -0
- package/external/folly/folly/small_vector.h +17 -0
- package/external/folly/folly/somerge_defs.bzl +399 -0
- package/external/folly/folly/sorted_vector_types.h +17 -0
- package/external/folly/folly/stop_watch.h +317 -0
- package/external/folly/folly/synchronization/AsymmetricThreadFence.cpp +91 -0
- package/external/folly/folly/synchronization/AsymmetricThreadFence.h +60 -0
- package/external/folly/folly/synchronization/AtomicNotification-inl.h +146 -0
- package/external/folly/folly/synchronization/AtomicNotification.cpp +34 -0
- package/external/folly/folly/synchronization/AtomicNotification.h +117 -0
- package/external/folly/folly/synchronization/AtomicRef.h +181 -0
- package/external/folly/folly/synchronization/AtomicStruct.h +150 -0
- package/external/folly/folly/synchronization/AtomicUtil-inl.h +482 -0
- package/external/folly/folly/synchronization/AtomicUtil.h +179 -0
- package/external/folly/folly/synchronization/BUCK +418 -0
- package/external/folly/folly/synchronization/Baton.h +419 -0
- package/external/folly/folly/synchronization/CallOnce.h +263 -0
- package/external/folly/folly/synchronization/DelayedInit.h +179 -0
- package/external/folly/folly/synchronization/DistributedMutex-inl.h +1744 -0
- package/external/folly/folly/synchronization/DistributedMutex.cpp +27 -0
- package/external/folly/folly/synchronization/DistributedMutex.h +342 -0
- package/external/folly/folly/synchronization/EventCount.h +200 -0
- package/external/folly/folly/synchronization/FlatCombining.h +629 -0
- package/external/folly/folly/synchronization/Hazptr-fwd.h +217 -0
- package/external/folly/folly/synchronization/Hazptr.cpp +36 -0
- package/external/folly/folly/synchronization/Hazptr.h +209 -0
- package/external/folly/folly/synchronization/HazptrDomain.cpp +68 -0
- package/external/folly/folly/synchronization/HazptrDomain.h +832 -0
- package/external/folly/folly/synchronization/HazptrHolder.h +431 -0
- package/external/folly/folly/synchronization/HazptrObj.h +533 -0
- package/external/folly/folly/synchronization/HazptrObjLinked.h +315 -0
- package/external/folly/folly/synchronization/HazptrRec.h +68 -0
- package/external/folly/folly/synchronization/HazptrThrLocal.h +180 -0
- package/external/folly/folly/synchronization/HazptrThreadPoolExecutor.cpp +46 -0
- package/external/folly/folly/synchronization/HazptrThreadPoolExecutor.h +25 -0
- package/external/folly/folly/synchronization/Latch.h +160 -0
- package/external/folly/folly/synchronization/LifoSem.h +767 -0
- package/external/folly/folly/synchronization/Lock.h +887 -0
- package/external/folly/folly/synchronization/MicroSpinLock.h +154 -0
- package/external/folly/folly/synchronization/NativeSemaphore.h +187 -0
- package/external/folly/folly/synchronization/ParkingLot.cpp +37 -0
- package/external/folly/folly/synchronization/ParkingLot.h +330 -0
- package/external/folly/folly/synchronization/PicoSpinLock.h +167 -0
- package/external/folly/folly/synchronization/RWSpinLock.h +549 -0
- package/external/folly/folly/synchronization/Rcu.cpp +26 -0
- package/external/folly/folly/synchronization/Rcu.h +553 -0
- package/external/folly/folly/synchronization/RelaxedAtomic.h +336 -0
- package/external/folly/folly/synchronization/SanitizeThread.cpp +141 -0
- package/external/folly/folly/synchronization/SanitizeThread.h +166 -0
- package/external/folly/folly/synchronization/SaturatingSemaphore.h +324 -0
- package/external/folly/folly/synchronization/SmallLocks.h +36 -0
- package/external/folly/folly/synchronization/ThrottledLifoSem.h +362 -0
- package/external/folly/folly/synchronization/WaitOptions.cpp +25 -0
- package/external/folly/folly/synchronization/WaitOptions.h +75 -0
- package/external/folly/folly/synchronization/detail/AtomicUtils.h +59 -0
- package/external/folly/folly/synchronization/detail/BUCK +104 -0
- package/external/folly/folly/synchronization/detail/Hardware.cpp +192 -0
- package/external/folly/folly/synchronization/detail/Hardware.h +75 -0
- package/external/folly/folly/synchronization/detail/HazptrUtils.h +339 -0
- package/external/folly/folly/synchronization/detail/InlineFunctionRef.h +229 -0
- package/external/folly/folly/synchronization/detail/Sleeper.cpp +27 -0
- package/external/folly/folly/synchronization/detail/Sleeper.h +62 -0
- package/external/folly/folly/synchronization/detail/Spin.h +96 -0
- package/external/folly/folly/synchronization/detail/ThreadCachedLists.h +174 -0
- package/external/folly/folly/synchronization/detail/ThreadCachedReaders.h +189 -0
- package/external/folly/folly/synchronization/detail/ThreadCachedTag.h +26 -0
- package/external/folly/folly/synchronization/detail/test/BUCK +28 -0
- package/external/folly/folly/synchronization/detail/test/HardwareTest.cpp +74 -0
- package/external/folly/folly/synchronization/detail/test/InlineFunctionRefTest.cpp +286 -0
- package/external/folly/folly/synchronization/example/BUCK +27 -0
- package/external/folly/folly/synchronization/example/HazptrLockFreeLIFO.h +88 -0
- package/external/folly/folly/synchronization/example/HazptrSWMRSet.h +133 -0
- package/external/folly/folly/synchronization/example/HazptrWideCAS.h +62 -0
- package/external/folly/folly/synchronization/test/AtomicNotificationTest.cpp +236 -0
- package/external/folly/folly/synchronization/test/AtomicRefTest.cpp +170 -0
- package/external/folly/folly/synchronization/test/AtomicStructTest.cpp +65 -0
- package/external/folly/folly/synchronization/test/AtomicUtilBench.cpp +457 -0
- package/external/folly/folly/synchronization/test/AtomicUtilTest.cpp +650 -0
- package/external/folly/folly/synchronization/test/BUCK +495 -0
- package/external/folly/folly/synchronization/test/Barrier.h +52 -0
- package/external/folly/folly/synchronization/test/BarrierTest.cpp +56 -0
- package/external/folly/folly/synchronization/test/BatonBenchmark.cpp +77 -0
- package/external/folly/folly/synchronization/test/BatonTest.cpp +164 -0
- package/external/folly/folly/synchronization/test/BatonTestHelpers.h +118 -0
- package/external/folly/folly/synchronization/test/CallOnceBenchmark.cpp +72 -0
- package/external/folly/folly/synchronization/test/CallOnceTest.cpp +153 -0
- package/external/folly/folly/synchronization/test/DelayedInitTest.cpp +281 -0
- package/external/folly/folly/synchronization/test/DistributedMutexTest.cpp +2074 -0
- package/external/folly/folly/synchronization/test/EventCountTest.cpp +124 -0
- package/external/folly/folly/synchronization/test/FlatCombiningBenchmark.cpp +1789 -0
- package/external/folly/folly/synchronization/test/FlatCombiningExamples.h +222 -0
- package/external/folly/folly/synchronization/test/FlatCombiningTest.cpp +121 -0
- package/external/folly/folly/synchronization/test/FlatCombiningTestHelpers.h +227 -0
- package/external/folly/folly/synchronization/test/HazptrTest.cpp +1689 -0
- package/external/folly/folly/synchronization/test/LatchTest.cpp +224 -0
- package/external/folly/folly/synchronization/test/LifoSemBench.cpp +185 -0
- package/external/folly/folly/synchronization/test/LifoSemTests.cpp +353 -0
- package/external/folly/folly/synchronization/test/LockTest.cpp +1239 -0
- package/external/folly/folly/synchronization/test/NativeSemaphoreTest.cpp +37 -0
- package/external/folly/folly/synchronization/test/ParkingLotBenchmark.cpp +239 -0
- package/external/folly/folly/synchronization/test/ParkingLotTest.cpp +170 -0
- package/external/folly/folly/synchronization/test/RWSpinLockTest.cpp +235 -0
- package/external/folly/folly/synchronization/test/RcuBench.cpp +66 -0
- package/external/folly/folly/synchronization/test/RcuTest.cpp +330 -0
- package/external/folly/folly/synchronization/test/RelaxedAtomicTest.cpp +389 -0
- package/external/folly/folly/synchronization/test/SaturatingSemaphoreTest.cpp +166 -0
- package/external/folly/folly/synchronization/test/Semaphore.h +242 -0
- package/external/folly/folly/synchronization/test/SemaphoreTest.cpp +271 -0
- package/external/folly/folly/synchronization/test/SmallLocksBenchmark.cpp +1296 -0
- package/external/folly/folly/synchronization/test/SmallLocksTest.cpp +510 -0
- package/external/folly/folly/synchronization/test/ThreadCachedEpochBench.h +67 -0
- package/external/folly/folly/synchronization/test/ThreadCachedReadersBench.cpp +42 -0
- package/external/folly/folly/synchronization/test/ThreadCachedReadersTest.cpp +52 -0
- package/external/folly/folly/synchronization/test/ThrottledLifoSemTest.cpp +243 -0
- package/external/folly/folly/system/AtFork.cpp +205 -0
- package/external/folly/folly/system/AtFork.h +116 -0
- package/external/folly/folly/system/AuxVector.h +198 -0
- package/external/folly/folly/system/BUCK +144 -0
- package/external/folly/folly/system/EnvUtil.cpp +93 -0
- package/external/folly/folly/system/EnvUtil.h +113 -0
- package/external/folly/folly/system/HardwareConcurrency.cpp +39 -0
- package/external/folly/folly/system/HardwareConcurrency.h +23 -0
- package/external/folly/folly/system/MemoryMapping.cpp +477 -0
- package/external/folly/folly/system/MemoryMapping.h +287 -0
- package/external/folly/folly/system/Pid.cpp +87 -0
- package/external/folly/folly/system/Pid.h +34 -0
- package/external/folly/folly/system/Shell.cpp +33 -0
- package/external/folly/folly/system/Shell.h +93 -0
- package/external/folly/folly/system/ThreadId.cpp +89 -0
- package/external/folly/folly/system/ThreadId.h +62 -0
- package/external/folly/folly/system/ThreadName.cpp +330 -0
- package/external/folly/folly/system/ThreadName.h +72 -0
- package/external/folly/folly/system/test/AtForkTest.cpp +309 -0
- package/external/folly/folly/system/test/AuxVectorTest.cpp +55 -0
- package/external/folly/folly/system/test/BUCK +120 -0
- package/external/folly/folly/system/test/EnvUtilSubprocess.cpp +26 -0
- package/external/folly/folly/system/test/EnvUtilTest.cpp +197 -0
- package/external/folly/folly/system/test/MemoryMappingTest.cpp +179 -0
- package/external/folly/folly/system/test/PidTest.cpp +46 -0
- package/external/folly/folly/system/test/ShellTest.cpp +66 -0
- package/external/folly/folly/system/test/ThreadIdTest.cpp +114 -0
- package/external/folly/folly/system/test/ThreadNameTest.cpp +85 -0
- package/external/folly/folly.vcxitems +164 -0
- package/external/folly/static/logo.svg +1 -0
- package/external/folly/sync-config.json +8 -0
- package/package.json +3 -3
- package/template/cpp-app/proj/MyApp.sln +0 -33
- package/template/cpp-lib/proj/MyLib.sln +0 -33
- package/template/cs-app/proj/MyApp.sln +0 -33
- package/template/cs-lib/proj/MyLib.sln +0 -33
- package/templates/cpp-app/windows/MyApp.sln +0 -33
- package/templates/cpp-lib/example/metro.config.js +31 -6
- package/templates/cpp-lib/windows/MyLib.sln +0 -33
- package/Folly/Folly.vcxproj +0 -383
- package/Folly/Folly.vcxproj.filters +0 -558
- package/Folly/Folly.win32.vcxproj +0 -11
- package/Folly/packages.lock.win32.json +0 -20
- package/Scripts/Warm-RnwFeedCache.ps1 +0 -413
- package/fmt/fmt.vcxproj +0 -163
- package/fmt/fmt.vcxproj.filters +0 -59
- package/fmt/fmt.win32.vcxproj +0 -10
- package/fmt/pch.cpp +0 -4
- package/fmt/pch.h +0 -2
- /package/{Folly → external/folly}/Folly.natvis +0 -0
- /package/{Folly → external/folly}/cgmanifest.json +0 -0
- /package/{Folly/TEMP_UntilFollyUpdate → external/folly/folly}/ConstexprMath.h +0 -0
- /package/{Folly/TEMP_UntilFollyUpdate → external/folly/folly}/Conv.cpp +0 -0
- /package/{Folly/TEMP_UntilFollyUpdate → external/folly/folly}/chrono/Hardware.h +0 -0
- /package/{Folly/TEMP_UntilFollyUpdate → external/folly/folly}/concurrency/CacheLocality.cpp +0 -0
- /package/{Folly/TEMP_UntilFollyUpdate → external/folly/folly}/json/dynamic-inl.h +0 -0
- /package/{Folly/TEMP_UntilFollyUpdate → external/folly/folly}/json/json.cpp +0 -0
- /package/{Folly/TEMP_UntilFollyUpdate → external/folly/folly}/lang/SafeAssert.h +0 -0
- /package/{Folly/TEMP_UntilFollyUpdate → external/folly/folly}/lang/ToAscii.cpp +0 -0
- /package/{Folly/TEMP_UntilFollyUpdate → external/folly/folly}/lang/ToAscii.h +0 -0
- /package/{Folly/TEMP_UntilFollyUpdate → external/folly/folly}/portability/Unistd.cpp +0 -0
|
@@ -0,0 +1,1296 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
#include <algorithm>
|
|
18
|
+
#include <array>
|
|
19
|
+
#include <cmath>
|
|
20
|
+
#include <condition_variable>
|
|
21
|
+
#include <iostream>
|
|
22
|
+
#include <numeric>
|
|
23
|
+
#include <thread>
|
|
24
|
+
#include <vector>
|
|
25
|
+
|
|
26
|
+
#include <fmt/core.h>
|
|
27
|
+
|
|
28
|
+
#include <folly/Benchmark.h>
|
|
29
|
+
#include <folly/SharedMutex.h>
|
|
30
|
+
#include <folly/lang/Aligned.h>
|
|
31
|
+
#include <folly/synchronization/DistributedMutex.h>
|
|
32
|
+
#include <folly/synchronization/FlatCombining.h>
|
|
33
|
+
#include <folly/synchronization/SmallLocks.h>
|
|
34
|
+
|
|
35
|
+
/* "Work cycle" is just an additional nop loop iteration.
|
|
36
|
+
* A smaller number of work cyles will result in more contention,
|
|
37
|
+
* which is what we're trying to measure. The relative ratio of
|
|
38
|
+
* locked to unlocked cycles will simulate how big critical sections
|
|
39
|
+
* are in production code
|
|
40
|
+
*/
|
|
41
|
+
DEFINE_int32(work, 100, "Number of work cycles");
|
|
42
|
+
DEFINE_int32(unlocked_work, 1000, "Number of unlocked work cycles");
|
|
43
|
+
DEFINE_int32(
|
|
44
|
+
threads,
|
|
45
|
+
std::thread::hardware_concurrency(),
|
|
46
|
+
"Number of threads for fairness test");
|
|
47
|
+
DEFINE_bool(run_fairness, true, "Run fairness benchmarks");
|
|
48
|
+
|
|
49
|
+
static void burn(size_t n) {
|
|
50
|
+
for (size_t i = 0; i < n; ++i) {
|
|
51
|
+
folly::doNotOptimizeAway(i);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
namespace {
|
|
56
|
+
struct SimpleBarrier {
|
|
57
|
+
explicit SimpleBarrier(int count) : count_(count) {}
|
|
58
|
+
void wait() {
|
|
59
|
+
// we spin for a bit to try and get the kernel to schedule threads on
|
|
60
|
+
// different cores
|
|
61
|
+
for (auto i = 0; i < 100000; ++i) {
|
|
62
|
+
folly::doNotOptimizeAway(i);
|
|
63
|
+
}
|
|
64
|
+
num_.fetch_add(1);
|
|
65
|
+
while (num_.load() != count_) {
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
private:
|
|
70
|
+
std::atomic<int> num_{0};
|
|
71
|
+
const int count_;
|
|
72
|
+
};
|
|
73
|
+
} // namespace
|
|
74
|
+
|
|
75
|
+
template <typename Lock>
|
|
76
|
+
class InitLock {
|
|
77
|
+
Lock lock_;
|
|
78
|
+
|
|
79
|
+
public:
|
|
80
|
+
InitLock() { lock_.init(); }
|
|
81
|
+
void lock() { lock_.lock(); }
|
|
82
|
+
void unlock() { lock_.unlock(); }
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
class DistributedMutexFlatCombining {
|
|
86
|
+
public:
|
|
87
|
+
folly::DistributedMutex mutex_;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
class NoLock {
|
|
91
|
+
public:
|
|
92
|
+
void lock() {}
|
|
93
|
+
void unlock() {}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
class FlatCombiningMutexNoCaching
|
|
97
|
+
: public folly::FlatCombining<FlatCombiningMutexNoCaching> {
|
|
98
|
+
public:
|
|
99
|
+
using Super = folly::FlatCombining<FlatCombiningMutexNoCaching>;
|
|
100
|
+
|
|
101
|
+
template <typename CriticalSection>
|
|
102
|
+
auto lock_combine(CriticalSection func, std::size_t) {
|
|
103
|
+
auto record = this->allocRec();
|
|
104
|
+
auto value = folly::invoke_result_t<CriticalSection&>{};
|
|
105
|
+
this->requestFC([&]() { value = func(); }, record);
|
|
106
|
+
this->freeRec(record);
|
|
107
|
+
return value;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
class FlatCombiningMutexCaching
|
|
112
|
+
: public folly::FlatCombining<FlatCombiningMutexCaching> {
|
|
113
|
+
public:
|
|
114
|
+
using Super = folly::FlatCombining<FlatCombiningMutexCaching>;
|
|
115
|
+
|
|
116
|
+
FlatCombiningMutexCaching() {
|
|
117
|
+
for (auto i = 0; i < 256; ++i) {
|
|
118
|
+
this->records_.push_back(this->allocRec());
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
template <typename CriticalSection>
|
|
123
|
+
auto lock_combine(CriticalSection func, std::size_t index) {
|
|
124
|
+
auto value = folly::invoke_result_t<CriticalSection&>{};
|
|
125
|
+
this->requestFC([&]() { value = func(); }, records_.at(index));
|
|
126
|
+
return value;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
std::vector<Super::Rec*> records_;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
template <typename Mutex, typename CriticalSection>
|
|
133
|
+
auto lock_and(Mutex& mutex, std::size_t, CriticalSection func) {
|
|
134
|
+
auto lck = std::unique_lock{mutex};
|
|
135
|
+
return func();
|
|
136
|
+
}
|
|
137
|
+
template <typename F>
|
|
138
|
+
auto lock_and(DistributedMutexFlatCombining& mutex, std::size_t, F func) {
|
|
139
|
+
return mutex.mutex_.lock_combine(std::move(func));
|
|
140
|
+
}
|
|
141
|
+
template <typename F>
|
|
142
|
+
auto lock_and(FlatCombiningMutexNoCaching& mutex, std::size_t i, F func) {
|
|
143
|
+
return mutex.lock_combine(func, i);
|
|
144
|
+
}
|
|
145
|
+
template <typename F>
|
|
146
|
+
auto lock_and(FlatCombiningMutexCaching& mutex, std::size_t i, F func) {
|
|
147
|
+
return mutex.lock_combine(func, i);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Functions to initialize, write and read from data
|
|
152
|
+
*
|
|
153
|
+
* These are used to do different things in the contended benchmark based on
|
|
154
|
+
* the type of the data
|
|
155
|
+
*/
|
|
156
|
+
std::uint64_t write(std::uint64_t& value) {
|
|
157
|
+
return ++value;
|
|
158
|
+
}
|
|
159
|
+
void read(std::uint64_t value) {
|
|
160
|
+
folly::doNotOptimizeAway(value);
|
|
161
|
+
}
|
|
162
|
+
void initialize(std::uint64_t& value) {
|
|
163
|
+
value = 1;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
class alignas(folly::hardware_destructive_interference_size) Ints {
|
|
167
|
+
public:
|
|
168
|
+
std::array<folly::cacheline_aligned<std::uint64_t>, 5> ints_;
|
|
169
|
+
};
|
|
170
|
+
std::uint64_t write(Ints& vec) {
|
|
171
|
+
auto sum = std::uint64_t{0};
|
|
172
|
+
for (auto& integer : vec.ints_) {
|
|
173
|
+
sum += (*integer += 1);
|
|
174
|
+
}
|
|
175
|
+
return sum;
|
|
176
|
+
}
|
|
177
|
+
void initialize(Ints&) {}
|
|
178
|
+
|
|
179
|
+
class alignas(folly::hardware_destructive_interference_size) AtomicsAdd {
|
|
180
|
+
public:
|
|
181
|
+
std::array<folly::cacheline_aligned<std::atomic<std::uint64_t>>, 5> ints_;
|
|
182
|
+
};
|
|
183
|
+
std::uint64_t write(AtomicsAdd& atomics) {
|
|
184
|
+
auto sum = 0;
|
|
185
|
+
folly::makeUnpredictable(sum);
|
|
186
|
+
for (auto& integer : atomics.ints_) {
|
|
187
|
+
sum += integer->fetch_add(1);
|
|
188
|
+
}
|
|
189
|
+
return sum;
|
|
190
|
+
}
|
|
191
|
+
void initialize(AtomicsAdd&) {}
|
|
192
|
+
|
|
193
|
+
class alignas(folly::hardware_destructive_interference_size) AtomicCas {
|
|
194
|
+
public:
|
|
195
|
+
std::atomic<std::uint64_t> integer_{0};
|
|
196
|
+
};
|
|
197
|
+
std::uint64_t write(AtomicCas& atomic) {
|
|
198
|
+
auto value = atomic.integer_.load(std::memory_order_relaxed);
|
|
199
|
+
folly::makeUnpredictable(value);
|
|
200
|
+
while (!atomic.integer_.compare_exchange_strong(value, value + 1)) {
|
|
201
|
+
}
|
|
202
|
+
return value;
|
|
203
|
+
}
|
|
204
|
+
void initialize(AtomicCas&) {}
|
|
205
|
+
|
|
206
|
+
class alignas(folly::hardware_destructive_interference_size) AtomicFetchXor {
|
|
207
|
+
public:
|
|
208
|
+
std::atomic<std::uint64_t> integer_{0};
|
|
209
|
+
};
|
|
210
|
+
std::uint64_t write(AtomicFetchXor& atomic) {
|
|
211
|
+
auto value = std::numeric_limits<std::uint64_t>::max();
|
|
212
|
+
folly::makeUnpredictable(value);
|
|
213
|
+
|
|
214
|
+
// XOR is a good choice here because it allows us to simulate random
|
|
215
|
+
// operation in the hardware. For example, if we were to use the same value
|
|
216
|
+
// to do something like a bitwise or, the hardware is allowed to coalesce
|
|
217
|
+
// the operations into one by treating all of the ones after the first as
|
|
218
|
+
// idempotent, and then it only needs to transfer data across the bus
|
|
219
|
+
// without actually needing to move the cacheline to the remote cores. Very
|
|
220
|
+
// much like the implementation here, but done in the hardware. Coalescing
|
|
221
|
+
// XORs is hard because it requires knowledge of the previous state and is
|
|
222
|
+
// mutating on every operation
|
|
223
|
+
value = atomic.integer_.fetch_xor(value, std::memory_order_acq_rel);
|
|
224
|
+
return value;
|
|
225
|
+
}
|
|
226
|
+
void initialize(AtomicFetchXor&) {}
|
|
227
|
+
|
|
228
|
+
template <typename Lock, typename Data = std::uint64_t>
|
|
229
|
+
static void runContended(
|
|
230
|
+
size_t numOps, size_t numThreads, size_t work = FLAGS_work) {
|
|
231
|
+
folly::BenchmarkSuspender braces;
|
|
232
|
+
size_t totalthreads = std::thread::hardware_concurrency();
|
|
233
|
+
if (totalthreads < numThreads) {
|
|
234
|
+
totalthreads = numThreads;
|
|
235
|
+
}
|
|
236
|
+
size_t threadgroups = totalthreads / numThreads;
|
|
237
|
+
struct lockstruct {
|
|
238
|
+
char padding1[128];
|
|
239
|
+
Lock mutex;
|
|
240
|
+
char padding2[128];
|
|
241
|
+
Data value;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
auto locks = std::vector<lockstruct>(threadgroups);
|
|
245
|
+
for (auto& data : locks) {
|
|
246
|
+
initialize(data.value);
|
|
247
|
+
}
|
|
248
|
+
folly::makeUnpredictable(locks);
|
|
249
|
+
|
|
250
|
+
char padding3[128];
|
|
251
|
+
(void)padding3;
|
|
252
|
+
std::vector<std::thread> threads(totalthreads);
|
|
253
|
+
|
|
254
|
+
SimpleBarrier runbarrier(totalthreads + 1);
|
|
255
|
+
|
|
256
|
+
for (size_t t = 0; t < totalthreads; ++t) {
|
|
257
|
+
threads[t] = std::thread([&, t] {
|
|
258
|
+
lockstruct* mutex = &locks[t % threadgroups];
|
|
259
|
+
runbarrier.wait();
|
|
260
|
+
for (size_t op = 0; op < numOps; op += 1) {
|
|
261
|
+
auto val =
|
|
262
|
+
lock_and(mutex->mutex, t, [&value = mutex->value, work]() noexcept {
|
|
263
|
+
burn(work);
|
|
264
|
+
return write(value);
|
|
265
|
+
});
|
|
266
|
+
read(val);
|
|
267
|
+
burn(FLAGS_unlocked_work);
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
runbarrier.wait();
|
|
273
|
+
braces.dismissing([&] {
|
|
274
|
+
for (auto& thr : threads) {
|
|
275
|
+
thr.join();
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
template <typename Lock>
|
|
281
|
+
static void runFairness(std::size_t numThreads) {
|
|
282
|
+
size_t totalthreads = std::thread::hardware_concurrency();
|
|
283
|
+
if (totalthreads < numThreads) {
|
|
284
|
+
totalthreads = numThreads;
|
|
285
|
+
}
|
|
286
|
+
long threadgroups = totalthreads / numThreads;
|
|
287
|
+
struct lockstruct {
|
|
288
|
+
char padding1[128];
|
|
289
|
+
Lock lock;
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
auto locks =
|
|
293
|
+
(struct lockstruct*)calloc(threadgroups, sizeof(struct lockstruct));
|
|
294
|
+
|
|
295
|
+
char padding3[64];
|
|
296
|
+
(void)padding3;
|
|
297
|
+
std::vector<std::thread> threads(totalthreads);
|
|
298
|
+
|
|
299
|
+
std::atomic<bool> stop{false};
|
|
300
|
+
|
|
301
|
+
std::mutex rlock;
|
|
302
|
+
std::vector<long> results;
|
|
303
|
+
std::vector<std::chrono::microseconds> maxes;
|
|
304
|
+
|
|
305
|
+
std::vector<std::chrono::microseconds> aqTime;
|
|
306
|
+
std::vector<unsigned long> aqTimeSq;
|
|
307
|
+
|
|
308
|
+
SimpleBarrier runbarrier(totalthreads + 1);
|
|
309
|
+
|
|
310
|
+
for (size_t t = 0; t < totalthreads; ++t) {
|
|
311
|
+
threads[t] = std::thread([&, t] {
|
|
312
|
+
lockstruct* mutex = &locks[t % threadgroups];
|
|
313
|
+
long value = 0;
|
|
314
|
+
std::chrono::microseconds max(0);
|
|
315
|
+
std::chrono::microseconds time(0);
|
|
316
|
+
unsigned long timeSq(0);
|
|
317
|
+
runbarrier.wait();
|
|
318
|
+
while (!stop) {
|
|
319
|
+
std::chrono::steady_clock::time_point prelock =
|
|
320
|
+
std::chrono::steady_clock::now();
|
|
321
|
+
lock_and(mutex->lock, t, [&]() {
|
|
322
|
+
burn(FLAGS_work);
|
|
323
|
+
value++;
|
|
324
|
+
});
|
|
325
|
+
std::chrono::steady_clock::time_point postlock =
|
|
326
|
+
std::chrono::steady_clock::now();
|
|
327
|
+
auto diff = std::chrono::duration_cast<std::chrono::microseconds>(
|
|
328
|
+
postlock - prelock);
|
|
329
|
+
time += diff;
|
|
330
|
+
timeSq += diff.count() * diff.count();
|
|
331
|
+
if (diff > max) {
|
|
332
|
+
max = diff;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
{
|
|
336
|
+
std::lock_guard<std::mutex> g(rlock);
|
|
337
|
+
results.push_back(value);
|
|
338
|
+
maxes.push_back(max);
|
|
339
|
+
aqTime.push_back(time);
|
|
340
|
+
aqTimeSq.push_back(timeSq);
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
runbarrier.wait();
|
|
346
|
+
/* sleep override */
|
|
347
|
+
std::this_thread::sleep_for(std::chrono::seconds(4));
|
|
348
|
+
stop = true;
|
|
349
|
+
|
|
350
|
+
for (auto& thr : threads) {
|
|
351
|
+
thr.join();
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
// Calulate some stats
|
|
355
|
+
unsigned long sum =
|
|
356
|
+
folly::to_integral(std::accumulate(results.begin(), results.end(), 0.0));
|
|
357
|
+
double m = sum / results.size();
|
|
358
|
+
|
|
359
|
+
double accum = 0.0;
|
|
360
|
+
std::for_each(results.begin(), results.end(), [&](const double d) {
|
|
361
|
+
accum += (d - m) * (d - m);
|
|
362
|
+
});
|
|
363
|
+
double stdev = std::sqrt(accum / (results.size() - 1));
|
|
364
|
+
std::chrono::microseconds mx = *std::max_element(maxes.begin(), maxes.end());
|
|
365
|
+
std::chrono::microseconds agAqTime = std::accumulate(
|
|
366
|
+
aqTime.begin(), aqTime.end(), std::chrono::microseconds(0));
|
|
367
|
+
unsigned long agAqTimeSq =
|
|
368
|
+
std::accumulate(aqTimeSq.begin(), aqTimeSq.end(), 0);
|
|
369
|
+
std::chrono::microseconds mean = agAqTime / sum;
|
|
370
|
+
double variance = (sum * agAqTimeSq - (agAqTime.count() * agAqTime.count())) /
|
|
371
|
+
sum / (sum - 1);
|
|
372
|
+
double stddev2 = std::sqrt(variance);
|
|
373
|
+
|
|
374
|
+
fmt::print("Sum: {} Mean: {:.0f} stddev: {:.0f}\n", sum, m, stdev);
|
|
375
|
+
fmt::print(
|
|
376
|
+
"Lock time stats in us: mean {} stddev {:.0f} max {}\n",
|
|
377
|
+
mean.count(),
|
|
378
|
+
stddev2,
|
|
379
|
+
mx.count());
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
template <typename Mutex>
|
|
383
|
+
void runUncontended(std::size_t iters) {
|
|
384
|
+
auto&& mutex = Mutex{};
|
|
385
|
+
for (auto i = std::size_t{0}; i < iters; ++i) {
|
|
386
|
+
folly::makeUnpredictable(mutex);
|
|
387
|
+
auto lck = std::unique_lock<Mutex>{mutex};
|
|
388
|
+
folly::makeUnpredictable(mutex);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
BENCHMARK(StdMutexUncontendedBenchmark, iters) {
|
|
393
|
+
runUncontended<std::mutex>(iters);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
BENCHMARK(StdSharedMutexUncontendedBenchmark, iters) {
|
|
397
|
+
runUncontended<std::shared_mutex>(iters);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
BENCHMARK(MicroSpinLockUncontendedBenchmark, iters) {
|
|
401
|
+
runUncontended<InitLock<folly::MicroSpinLock>>(iters);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
BENCHMARK(PicoSpinLockUncontendedBenchmark, iters) {
|
|
405
|
+
runUncontended<InitLock<folly::PicoSpinLock<std::uint16_t>>>(iters);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
BENCHMARK(MicroLockUncontendedBenchmark, iters) {
|
|
409
|
+
runUncontended<folly::MicroLock>(iters);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
BENCHMARK(SharedMutexUncontendedBenchmark, iters) {
|
|
413
|
+
runUncontended<folly::SharedMutex>(iters);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
BENCHMARK(DistributedMutexUncontendedBenchmark, iters) {
|
|
417
|
+
runUncontended<folly::DistributedMutex>(iters);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
BENCHMARK(AtomicFetchAddUncontendedBenchmark, iters) {
|
|
421
|
+
auto&& atomic = std::atomic<uint64_t>{0};
|
|
422
|
+
while (iters--) {
|
|
423
|
+
folly::doNotOptimizeAway(atomic.fetch_add(1));
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
struct VirtualBase {
|
|
428
|
+
virtual void foo() = 0;
|
|
429
|
+
virtual ~VirtualBase() {}
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
struct VirtualImpl : VirtualBase {
|
|
433
|
+
void foo() override { /* noop */ }
|
|
434
|
+
~VirtualImpl() override {}
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
#ifndef __clang__
|
|
438
|
+
__attribute__((noinline, noclone)) VirtualBase* makeVirtual() {
|
|
439
|
+
return new VirtualImpl();
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
BENCHMARK(VirtualFunctionCall, iters) {
|
|
443
|
+
VirtualBase* vb = makeVirtual();
|
|
444
|
+
while (iters--) {
|
|
445
|
+
vb->foo();
|
|
446
|
+
}
|
|
447
|
+
delete vb;
|
|
448
|
+
}
|
|
449
|
+
#endif
|
|
450
|
+
|
|
451
|
+
BENCHMARK_DRAW_LINE();
|
|
452
|
+
|
|
453
|
+
#define BENCH_BASE(...) FB_VA_GLUE(BENCHMARK_NAMED_PARAM, (__VA_ARGS__))
|
|
454
|
+
#define BENCH_REL(...) FB_VA_GLUE(BENCHMARK_RELATIVE_NAMED_PARAM, (__VA_ARGS__))
|
|
455
|
+
|
|
456
|
+
static void std_mutex(size_t numOps, size_t numThreads) {
|
|
457
|
+
runContended<std::mutex>(numOps, numThreads);
|
|
458
|
+
}
|
|
459
|
+
static void std_shared_mutex(size_t numOps, size_t numThreads) {
|
|
460
|
+
runContended<std::shared_mutex>(numOps, numThreads);
|
|
461
|
+
}
|
|
462
|
+
static void folly_microspin(size_t numOps, size_t numThreads) {
|
|
463
|
+
runContended<InitLock<folly::MicroSpinLock>>(numOps, numThreads);
|
|
464
|
+
}
|
|
465
|
+
static void folly_picospin(size_t numOps, size_t numThreads) {
|
|
466
|
+
runContended<InitLock<folly::PicoSpinLock<uint16_t>>>(numOps, numThreads);
|
|
467
|
+
}
|
|
468
|
+
static void folly_microlock(size_t numOps, size_t numThreads) {
|
|
469
|
+
runContended<folly::MicroLock>(numOps, numThreads);
|
|
470
|
+
}
|
|
471
|
+
static void folly_sharedmutex(size_t numOps, size_t numThreads) {
|
|
472
|
+
runContended<folly::SharedMutex>(numOps, numThreads);
|
|
473
|
+
}
|
|
474
|
+
static void folly_distributedmutex(size_t numOps, size_t numThreads) {
|
|
475
|
+
runContended<folly::DistributedMutex>(numOps, numThreads);
|
|
476
|
+
}
|
|
477
|
+
static void folly_distributedmutex_combining(size_t ops, size_t threads) {
|
|
478
|
+
runContended<DistributedMutexFlatCombining>(ops, threads);
|
|
479
|
+
}
|
|
480
|
+
static void folly_flatcombining_no_caching(size_t numOps, size_t numThreads) {
|
|
481
|
+
runContended<FlatCombiningMutexNoCaching>(numOps, numThreads);
|
|
482
|
+
}
|
|
483
|
+
static void folly_flatcombining_caching(size_t numOps, size_t numThreads) {
|
|
484
|
+
runContended<FlatCombiningMutexCaching>(numOps, numThreads);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
static void std_mutex_simple(size_t numOps, size_t numThreads) {
|
|
488
|
+
runContended<std::mutex, Ints>(numOps, numThreads, 0);
|
|
489
|
+
}
|
|
490
|
+
static void std_shared_mutex_simple(size_t numOps, size_t numThreads) {
|
|
491
|
+
runContended<std::shared_mutex, Ints>(numOps, numThreads, 0);
|
|
492
|
+
}
|
|
493
|
+
static void folly_microspin_simple(size_t numOps, size_t numThreads) {
|
|
494
|
+
runContended<InitLock<folly::MicroSpinLock>, Ints>(numOps, numThreads, 0);
|
|
495
|
+
}
|
|
496
|
+
static void folly_picospin_simple(size_t numOps, size_t numThreads) {
|
|
497
|
+
runContended<InitLock<folly::PicoSpinLock<uint16_t>>, Ints>(
|
|
498
|
+
numOps, numThreads, 0);
|
|
499
|
+
}
|
|
500
|
+
static void folly_microlock_simple(size_t numOps, size_t numThreads) {
|
|
501
|
+
runContended<folly::MicroLock, Ints>(numOps, numThreads, 0);
|
|
502
|
+
}
|
|
503
|
+
static void folly_sharedmutex_simple(size_t numOps, size_t numThreads) {
|
|
504
|
+
runContended<folly::SharedMutex, Ints>(numOps, numThreads, 0);
|
|
505
|
+
}
|
|
506
|
+
static void folly_distributedmutex_simple(size_t numOps, size_t numThreads) {
|
|
507
|
+
runContended<folly::DistributedMutex, Ints>(numOps, numThreads, 0);
|
|
508
|
+
}
|
|
509
|
+
static void folly_distributedmutex_combining_simple(size_t o, size_t t) {
|
|
510
|
+
runContended<DistributedMutexFlatCombining, Ints>(o, t, 0);
|
|
511
|
+
}
|
|
512
|
+
static void atomics_fetch_add(size_t numOps, size_t numThreads) {
|
|
513
|
+
runContended<NoLock, AtomicsAdd>(numOps, numThreads, 0);
|
|
514
|
+
}
|
|
515
|
+
static void atomic_fetch_xor(size_t numOps, size_t numThreads) {
|
|
516
|
+
runContended<NoLock, AtomicFetchXor>(numOps, numThreads, 0);
|
|
517
|
+
}
|
|
518
|
+
static void atomic_cas(size_t numOps, size_t numThreads) {
|
|
519
|
+
runContended<NoLock, AtomicCas>(numOps, numThreads, 0);
|
|
520
|
+
}
|
|
521
|
+
static void folly_flatcombining_no_caching_simple(size_t ops, size_t threads) {
|
|
522
|
+
runContended<FlatCombiningMutexNoCaching>(ops, threads, 0);
|
|
523
|
+
}
|
|
524
|
+
static void folly_flatcombining_caching_simple(size_t ops, size_t threads) {
|
|
525
|
+
runContended<FlatCombiningMutexCaching>(ops, threads, 0);
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
BENCHMARK_DRAW_LINE();
|
|
529
|
+
BENCH_BASE(std_mutex, 1thread, 1)
|
|
530
|
+
BENCH_BASE(std_shared_mutex, 1thread, 1)
|
|
531
|
+
BENCH_REL(folly_microspin, 1thread, 1)
|
|
532
|
+
BENCH_REL(folly_picospin, 1thread, 1)
|
|
533
|
+
BENCH_REL(folly_microlock, 1thread, 1)
|
|
534
|
+
BENCH_REL(folly_sharedmutex, 1thread, 1)
|
|
535
|
+
BENCH_REL(folly_distributedmutex, 1thread, 1)
|
|
536
|
+
BENCH_REL(folly_distributedmutex_combining, 1thread, 1)
|
|
537
|
+
BENCH_REL(folly_flatcombining_no_caching, 1thread, 1)
|
|
538
|
+
BENCH_REL(folly_flatcombining_caching, 1thread, 1)
|
|
539
|
+
BENCHMARK_DRAW_LINE();
|
|
540
|
+
BENCH_BASE(std_mutex, 2thread, 2)
|
|
541
|
+
BENCH_BASE(std_shared_mutex, 2thread, 2)
|
|
542
|
+
BENCH_REL(folly_microspin, 2thread, 2)
|
|
543
|
+
BENCH_REL(folly_picospin, 2thread, 2)
|
|
544
|
+
BENCH_REL(folly_microlock, 2thread, 2)
|
|
545
|
+
BENCH_REL(folly_sharedmutex, 2thread, 2)
|
|
546
|
+
BENCH_REL(folly_distributedmutex, 2thread, 2)
|
|
547
|
+
BENCH_REL(folly_distributedmutex_combining, 2thread, 2)
|
|
548
|
+
BENCH_REL(folly_flatcombining_no_caching, 2thread, 2)
|
|
549
|
+
BENCH_REL(folly_flatcombining_caching, 2thread, 2)
|
|
550
|
+
BENCHMARK_DRAW_LINE();
|
|
551
|
+
BENCH_BASE(std_mutex, 4thread, 4)
|
|
552
|
+
BENCH_BASE(std_shared_mutex, 4thread, 4)
|
|
553
|
+
BENCH_REL(folly_microspin, 4thread, 4)
|
|
554
|
+
BENCH_REL(folly_picospin, 4thread, 4)
|
|
555
|
+
BENCH_REL(folly_microlock, 4thread, 4)
|
|
556
|
+
BENCH_REL(folly_sharedmutex, 4thread, 4)
|
|
557
|
+
BENCH_REL(folly_distributedmutex, 4thread, 4)
|
|
558
|
+
BENCH_REL(folly_distributedmutex_combining, 4thread, 4)
|
|
559
|
+
BENCH_REL(folly_flatcombining_no_caching, 4thread, 4)
|
|
560
|
+
BENCH_REL(folly_flatcombining_caching, 4thread, 4)
|
|
561
|
+
BENCHMARK_DRAW_LINE();
|
|
562
|
+
BENCH_BASE(std_mutex, 8thread, 8)
|
|
563
|
+
BENCH_BASE(std_shared_mutex, 8thread, 8)
|
|
564
|
+
BENCH_REL(folly_microspin, 8thread, 8)
|
|
565
|
+
BENCH_REL(folly_picospin, 8thread, 8)
|
|
566
|
+
BENCH_REL(folly_microlock, 8thread, 8)
|
|
567
|
+
BENCH_REL(folly_sharedmutex, 8thread, 8)
|
|
568
|
+
BENCH_REL(folly_distributedmutex, 8thread, 8)
|
|
569
|
+
BENCH_REL(folly_distributedmutex_combining, 8thread, 8)
|
|
570
|
+
BENCH_REL(folly_flatcombining_no_caching, 8thread, 8)
|
|
571
|
+
BENCH_REL(folly_flatcombining_caching, 8thread, 8)
|
|
572
|
+
BENCHMARK_DRAW_LINE();
|
|
573
|
+
BENCH_BASE(std_mutex, 16thread, 16)
|
|
574
|
+
BENCH_BASE(std_shared_mutex, 16thread, 16)
|
|
575
|
+
BENCH_REL(folly_microspin, 16thread, 16)
|
|
576
|
+
BENCH_REL(folly_picospin, 16thread, 16)
|
|
577
|
+
BENCH_REL(folly_microlock, 16thread, 16)
|
|
578
|
+
BENCH_REL(folly_sharedmutex, 16thread, 16)
|
|
579
|
+
BENCH_REL(folly_distributedmutex, 16thread, 16)
|
|
580
|
+
BENCH_REL(folly_distributedmutex_combining, 16thread, 16)
|
|
581
|
+
BENCH_REL(folly_flatcombining_no_caching, 16thread, 16)
|
|
582
|
+
BENCH_REL(folly_flatcombining_caching, 16thread, 16)
|
|
583
|
+
BENCHMARK_DRAW_LINE();
|
|
584
|
+
BENCH_BASE(std_mutex, 32thread, 32)
|
|
585
|
+
BENCH_BASE(std_shared_mutex, 32thread, 32)
|
|
586
|
+
BENCH_REL(folly_microspin, 32thread, 32)
|
|
587
|
+
BENCH_REL(folly_picospin, 32thread, 32)
|
|
588
|
+
BENCH_REL(folly_microlock, 32thread, 32)
|
|
589
|
+
BENCH_REL(folly_sharedmutex, 32thread, 32)
|
|
590
|
+
BENCH_REL(folly_distributedmutex, 32thread, 32)
|
|
591
|
+
BENCH_REL(folly_distributedmutex_combining, 32thread, 32)
|
|
592
|
+
BENCH_REL(folly_flatcombining_no_caching, 32thread, 32)
|
|
593
|
+
BENCH_REL(folly_flatcombining_caching, 32thread, 32)
|
|
594
|
+
BENCHMARK_DRAW_LINE();
|
|
595
|
+
BENCH_BASE(std_mutex, 64thread, 64)
|
|
596
|
+
BENCH_BASE(std_shared_mutex, 64thread, 64)
|
|
597
|
+
BENCH_REL(folly_microspin, 64thread, 64)
|
|
598
|
+
BENCH_REL(folly_picospin, 64thread, 64)
|
|
599
|
+
BENCH_REL(folly_microlock, 64thread, 64)
|
|
600
|
+
BENCH_REL(folly_sharedmutex, 64thread, 64)
|
|
601
|
+
BENCH_REL(folly_distributedmutex, 64thread, 64)
|
|
602
|
+
BENCH_REL(folly_distributedmutex_combining, 64thread, 64)
|
|
603
|
+
BENCH_REL(folly_flatcombining_no_caching, 64thread, 64)
|
|
604
|
+
BENCH_REL(folly_flatcombining_caching, 64thread, 64)
|
|
605
|
+
BENCHMARK_DRAW_LINE();
|
|
606
|
+
BENCH_BASE(std_mutex, 128thread, 128)
|
|
607
|
+
BENCH_BASE(std_shared_mutex, 128thread, 128)
|
|
608
|
+
BENCH_REL(folly_microspin, 128thread, 128)
|
|
609
|
+
BENCH_REL(folly_picospin, 128thread, 128)
|
|
610
|
+
BENCH_REL(folly_microlock, 128thread, 128)
|
|
611
|
+
BENCH_REL(folly_sharedmutex, 128thread, 128)
|
|
612
|
+
BENCH_REL(folly_distributedmutex, 128thread, 128)
|
|
613
|
+
BENCH_REL(folly_distributedmutex_combining, 128thread, 128)
|
|
614
|
+
BENCH_REL(folly_flatcombining_no_caching, 128thread, 128)
|
|
615
|
+
BENCH_REL(folly_flatcombining_caching, 128thread, 128)
|
|
616
|
+
|
|
617
|
+
BENCHMARK_DRAW_LINE();
|
|
618
|
+
BENCH_BASE(std_mutex_simple, 1thread, 1)
|
|
619
|
+
BENCH_BASE(std_shared_mutex_simple, 1thread, 1)
|
|
620
|
+
BENCH_REL(folly_microspin_simple, 1thread, 1)
|
|
621
|
+
BENCH_REL(folly_picospin_simple, 1thread, 1)
|
|
622
|
+
BENCH_REL(folly_microlock_simple, 1thread, 1)
|
|
623
|
+
BENCH_REL(folly_sharedmutex_simple, 1thread, 1)
|
|
624
|
+
BENCH_REL(folly_distributedmutex_simple, 1thread, 1)
|
|
625
|
+
BENCH_REL(folly_distributedmutex_combining_simple, 1thread, 1)
|
|
626
|
+
BENCH_REL(folly_flatcombining_no_caching_simple, 1thread, 1)
|
|
627
|
+
BENCH_REL(folly_flatcombining_caching_simple, 1thread, 1)
|
|
628
|
+
BENCH_REL(atomics_fetch_add, 1thread, 1)
|
|
629
|
+
BENCH_REL(atomic_fetch_xor, 1thread, 1)
|
|
630
|
+
BENCH_REL(atomic_cas, 1thread, 1)
|
|
631
|
+
BENCHMARK_DRAW_LINE();
|
|
632
|
+
BENCH_BASE(std_mutex_simple, 2thread, 2)
|
|
633
|
+
BENCH_BASE(std_shared_mutex_simple, 2thread, 2)
|
|
634
|
+
BENCH_REL(folly_microspin_simple, 2thread, 2)
|
|
635
|
+
BENCH_REL(folly_picospin_simple, 2thread, 2)
|
|
636
|
+
BENCH_REL(folly_microlock_simple, 2thread, 2)
|
|
637
|
+
BENCH_REL(folly_sharedmutex_simple, 2thread, 2)
|
|
638
|
+
BENCH_REL(folly_distributedmutex_simple, 2thread, 2)
|
|
639
|
+
BENCH_REL(folly_distributedmutex_combining_simple, 2thread, 2)
|
|
640
|
+
BENCH_REL(folly_flatcombining_no_caching_simple, 2thread, 2)
|
|
641
|
+
BENCH_REL(folly_flatcombining_caching_simple, 2thread, 2)
|
|
642
|
+
BENCH_REL(atomics_fetch_add, 2thread, 2)
|
|
643
|
+
BENCH_REL(atomic_fetch_xor, 2thread, 2)
|
|
644
|
+
BENCH_REL(atomic_cas, 2thread, 2)
|
|
645
|
+
BENCHMARK_DRAW_LINE();
|
|
646
|
+
BENCH_BASE(std_mutex_simple, 4thread, 4)
|
|
647
|
+
BENCH_BASE(std_shared_mutex_simple, 4thread, 4)
|
|
648
|
+
BENCH_REL(folly_microspin_simple, 4thread, 4)
|
|
649
|
+
BENCH_REL(folly_picospin_simple, 4thread, 4)
|
|
650
|
+
BENCH_REL(folly_microlock_simple, 4thread, 4)
|
|
651
|
+
BENCH_REL(folly_sharedmutex_simple, 4thread, 4)
|
|
652
|
+
BENCH_REL(folly_distributedmutex_simple, 4thread, 4)
|
|
653
|
+
BENCH_REL(folly_distributedmutex_combining_simple, 4thread, 4)
|
|
654
|
+
BENCH_REL(folly_flatcombining_no_caching_simple, 4thread, 4)
|
|
655
|
+
BENCH_REL(folly_flatcombining_caching_simple, 4thread, 4)
|
|
656
|
+
BENCH_REL(atomics_fetch_add, 4thread, 4)
|
|
657
|
+
BENCH_REL(atomic_fetch_xor, 4thread, 4)
|
|
658
|
+
BENCH_REL(atomic_cas, 4thread, 4)
|
|
659
|
+
BENCHMARK_DRAW_LINE();
|
|
660
|
+
BENCH_BASE(std_mutex_simple, 8thread, 8)
|
|
661
|
+
BENCH_BASE(std_shared_mutex_simple, 8thread, 8)
|
|
662
|
+
BENCH_REL(folly_microspin_simple, 8thread, 8)
|
|
663
|
+
BENCH_REL(folly_picospin_simple, 8thread, 8)
|
|
664
|
+
BENCH_REL(folly_microlock_simple, 8thread, 8)
|
|
665
|
+
BENCH_REL(folly_sharedmutex_simple, 8thread, 8)
|
|
666
|
+
BENCH_REL(folly_distributedmutex_simple, 8thread, 8)
|
|
667
|
+
BENCH_REL(folly_distributedmutex_combining_simple, 8thread, 8)
|
|
668
|
+
BENCH_REL(folly_flatcombining_no_caching_simple, 8thread, 8)
|
|
669
|
+
BENCH_REL(folly_flatcombining_caching_simple, 8thread, 8)
|
|
670
|
+
BENCH_REL(atomics_fetch_add, 8thread, 8)
|
|
671
|
+
BENCH_REL(atomic_fetch_xor, 8thread, 8)
|
|
672
|
+
BENCH_REL(atomic_cas, 8thread, 8)
|
|
673
|
+
BENCHMARK_DRAW_LINE();
|
|
674
|
+
BENCH_BASE(std_mutex_simple, 16thread, 16)
|
|
675
|
+
BENCH_BASE(std_shared_mutex_simple, 16thread, 16)
|
|
676
|
+
BENCH_REL(folly_microspin_simple, 16thread, 16)
|
|
677
|
+
BENCH_REL(folly_picospin_simple, 16thread, 16)
|
|
678
|
+
BENCH_REL(folly_microlock_simple, 16thread, 16)
|
|
679
|
+
BENCH_REL(folly_sharedmutex_simple, 16thread, 16)
|
|
680
|
+
BENCH_REL(folly_distributedmutex_simple, 16thread, 16)
|
|
681
|
+
BENCH_REL(folly_distributedmutex_combining_simple, 16thread, 16)
|
|
682
|
+
BENCH_REL(folly_flatcombining_no_caching_simple, 16thread, 16)
|
|
683
|
+
BENCH_REL(folly_flatcombining_caching_simple, 16thread, 16)
|
|
684
|
+
BENCH_REL(atomics_fetch_add, 16thread, 16)
|
|
685
|
+
BENCH_REL(atomic_fetch_xor, 16thread, 16)
|
|
686
|
+
BENCH_REL(atomic_cas, 16thread, 16)
|
|
687
|
+
BENCHMARK_DRAW_LINE();
|
|
688
|
+
BENCH_BASE(std_mutex_simple, 32thread, 32)
|
|
689
|
+
BENCH_BASE(std_shared_mutex_simple, 32thread, 32)
|
|
690
|
+
BENCH_REL(folly_microspin_simple, 32thread, 32)
|
|
691
|
+
BENCH_REL(folly_picospin_simple, 32thread, 32)
|
|
692
|
+
BENCH_REL(folly_microlock_simple, 32thread, 32)
|
|
693
|
+
BENCH_REL(folly_sharedmutex_simple, 32thread, 32)
|
|
694
|
+
BENCH_REL(folly_distributedmutex_simple, 32thread, 32)
|
|
695
|
+
BENCH_REL(folly_distributedmutex_combining_simple, 32thread, 32)
|
|
696
|
+
BENCH_REL(folly_flatcombining_no_caching_simple, 32thread, 32)
|
|
697
|
+
BENCH_REL(folly_flatcombining_caching_simple, 32thread, 32)
|
|
698
|
+
BENCH_REL(atomics_fetch_add, 32thread, 32)
|
|
699
|
+
BENCH_REL(atomic_fetch_xor, 32thread, 32)
|
|
700
|
+
BENCH_REL(atomic_cas, 32thread, 32)
|
|
701
|
+
BENCHMARK_DRAW_LINE();
|
|
702
|
+
BENCH_BASE(std_mutex_simple, 64thread, 64)
|
|
703
|
+
BENCH_BASE(std_shared_mutex_simple, 64thread, 64)
|
|
704
|
+
BENCH_REL(folly_microspin_simple, 64thread, 64)
|
|
705
|
+
BENCH_REL(folly_picospin_simple, 64thread, 64)
|
|
706
|
+
BENCH_REL(folly_microlock_simple, 64thread, 64)
|
|
707
|
+
BENCH_REL(folly_sharedmutex_simple, 64thread, 64)
|
|
708
|
+
BENCH_REL(folly_distributedmutex_simple, 64thread, 64)
|
|
709
|
+
BENCH_REL(folly_distributedmutex_combining_simple, 64thread, 64)
|
|
710
|
+
BENCH_REL(folly_flatcombining_no_caching_simple, 64thread, 64)
|
|
711
|
+
BENCH_REL(folly_flatcombining_caching_simple, 64thread, 64)
|
|
712
|
+
BENCH_REL(atomics_fetch_add, 64thread, 64)
|
|
713
|
+
BENCH_REL(atomic_fetch_xor, 64thread, 64)
|
|
714
|
+
BENCH_REL(atomic_cas, 64thread, 64)
|
|
715
|
+
BENCHMARK_DRAW_LINE();
|
|
716
|
+
BENCH_BASE(std_mutex_simple, 128thread, 128)
|
|
717
|
+
BENCH_BASE(std_shared_mutex_simple, 128thread, 128)
|
|
718
|
+
BENCH_REL(folly_microspin_simple, 128thread, 128)
|
|
719
|
+
BENCH_REL(folly_picospin_simple, 128thread, 128)
|
|
720
|
+
BENCH_REL(folly_microlock_simple, 128thread, 128)
|
|
721
|
+
BENCH_REL(folly_sharedmutex_simple, 128thread, 128)
|
|
722
|
+
BENCH_REL(folly_distributedmutex_simple, 128thread, 128)
|
|
723
|
+
BENCH_REL(folly_distributedmutex_combining_simple, 128thread, 128)
|
|
724
|
+
BENCH_REL(folly_flatcombining_no_caching_simple, 128thread, 128)
|
|
725
|
+
BENCH_REL(folly_flatcombining_caching_simple, 128thread, 128)
|
|
726
|
+
BENCH_REL(atomics_fetch_add, 128thread, 128)
|
|
727
|
+
BENCH_REL(atomic_fetch_xor, 128thread, 128)
|
|
728
|
+
BENCH_REL(atomic_cas, 128thread, 128)
|
|
729
|
+
|
|
730
|
+
template <typename Mutex>
|
|
731
|
+
void fairnessTest(std::string type, std::size_t numThreads) {
|
|
732
|
+
std::cout << "------- " << type << " " << numThreads << " threads";
|
|
733
|
+
std::cout << std::endl;
|
|
734
|
+
runFairness<Mutex>(numThreads);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
int main(int argc, char** argv) {
|
|
738
|
+
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
|
739
|
+
|
|
740
|
+
if (FLAGS_run_fairness) {
|
|
741
|
+
for (auto numThreads : {2, 4, 8, 16, 32, 64}) {
|
|
742
|
+
fairnessTest<std::mutex>("std::mutex", numThreads);
|
|
743
|
+
fairnessTest<std::shared_mutex>("std::shared_mutex", numThreads);
|
|
744
|
+
fairnessTest<InitLock<folly::MicroSpinLock>>(
|
|
745
|
+
"folly::MicroSpinLock", numThreads);
|
|
746
|
+
fairnessTest<InitLock<folly::PicoSpinLock<std::uint16_t>>>(
|
|
747
|
+
"folly::PicoSpinLock<std::uint16_t>", numThreads);
|
|
748
|
+
fairnessTest<folly::MicroLock>("folly::MicroLock", numThreads);
|
|
749
|
+
fairnessTest<folly::SharedMutex>("folly::SharedMutex", numThreads);
|
|
750
|
+
fairnessTest<folly::DistributedMutex>(
|
|
751
|
+
"folly::DistributedMutex", numThreads);
|
|
752
|
+
fairnessTest<DistributedMutexFlatCombining>(
|
|
753
|
+
"folly::DistributedMutex (Combining)", numThreads);
|
|
754
|
+
|
|
755
|
+
std::cout << std::string(76, '=') << std::endl;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
folly::runBenchmarks();
|
|
760
|
+
|
|
761
|
+
return 0;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
/*
|
|
765
|
+
./small_locks_benchmark --bm_min_iters=100000
|
|
766
|
+
Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
|
|
767
|
+
|
|
768
|
+
------- std::mutex 2 threads
|
|
769
|
+
Sum: 361854376 Mean: 6461685 stddev: 770837
|
|
770
|
+
Lock time stats in us: mean 0 stddev 1 max 63002
|
|
771
|
+
------- folly::MicroSpinLock 2 threads
|
|
772
|
+
Sum: 454928254 Mean: 8123718 stddev: 1568978
|
|
773
|
+
Lock time stats in us: mean 0 stddev 9 max 118006
|
|
774
|
+
------- folly::PicoSpinLock<std::uint16_t> 2 threads
|
|
775
|
+
Sum: 376990850 Mean: 6731979 stddev: 1295859
|
|
776
|
+
Lock time stats in us: mean 0 stddev 1 max 83007
|
|
777
|
+
------- folly::MicroLock 2 threads
|
|
778
|
+
Sum: 316081944 Mean: 5644320 stddev: 1249068
|
|
779
|
+
Lock time stats in us: mean 0 stddev 13 max 53930
|
|
780
|
+
------- folly::SharedMutex 2 threads
|
|
781
|
+
Sum: 389298695 Mean: 6951762 stddev: 3031794
|
|
782
|
+
Lock time stats in us: mean 0 stddev 2 max 55004
|
|
783
|
+
------- folly::DistributedMutex 2 threads
|
|
784
|
+
Sum: 512343772 Mean: 9148995 stddev: 1168346
|
|
785
|
+
Lock time stats in us: mean 0 stddev 8 max 50830
|
|
786
|
+
------- folly::DistributedMutex (Combining) 2 threads
|
|
787
|
+
Sum: 475079423 Mean: 8483561 stddev: 899288
|
|
788
|
+
Lock time stats in us: mean 0 stddev 1 max 26006
|
|
789
|
+
============================================================================
|
|
790
|
+
------- std::mutex 4 threads
|
|
791
|
+
Sum: 164126417 Mean: 2930828 stddev: 208327
|
|
792
|
+
Lock time stats in us: mean 0 stddev 2 max 11759
|
|
793
|
+
------- folly::MicroSpinLock 4 threads
|
|
794
|
+
Sum: 168795789 Mean: 3014210 stddev: 825455
|
|
795
|
+
Lock time stats in us: mean 0 stddev 3 max 152163
|
|
796
|
+
------- folly::PicoSpinLock<std::uint16_t> 4 threads
|
|
797
|
+
Sum: 125788231 Mean: 2246218 stddev: 755074
|
|
798
|
+
Lock time stats in us: mean 1 stddev 3 max 151004
|
|
799
|
+
------- folly::MicroLock 4 threads
|
|
800
|
+
Sum: 109091138 Mean: 1948056 stddev: 465388
|
|
801
|
+
Lock time stats in us: mean 1 stddev 39 max 60029
|
|
802
|
+
------- folly::SharedMutex 4 threads
|
|
803
|
+
Sum: 107870343 Mean: 1926256 stddev: 1039541
|
|
804
|
+
Lock time stats in us: mean 1 stddev 2 max 57002
|
|
805
|
+
------- folly::DistributedMutex 4 threads
|
|
806
|
+
Sum: 207229191 Mean: 3700521 stddev: 182811
|
|
807
|
+
Lock time stats in us: mean 0 stddev 21 max 16231
|
|
808
|
+
------- folly::DistributedMutex (Combining) 4 threads
|
|
809
|
+
Sum: 204144735 Mean: 3645441 stddev: 619224
|
|
810
|
+
Lock time stats in us: mean 0 stddev 0 max 27008
|
|
811
|
+
============================================================================
|
|
812
|
+
------- std::mutex 8 threads
|
|
813
|
+
Sum: 82709846 Mean: 1476961 stddev: 173483
|
|
814
|
+
Lock time stats in us: mean 2 stddev 52 max 9404
|
|
815
|
+
------- folly::MicroSpinLock 8 threads
|
|
816
|
+
Sum: 94805197 Mean: 1692949 stddev: 633249
|
|
817
|
+
Lock time stats in us: mean 1 stddev 3 max 104517
|
|
818
|
+
------- folly::PicoSpinLock<std::uint16_t> 8 threads
|
|
819
|
+
Sum: 41587796 Mean: 742639 stddev: 191868
|
|
820
|
+
Lock time stats in us: mean 4 stddev 103 max 317025
|
|
821
|
+
------- folly::MicroLock 8 threads
|
|
822
|
+
Sum: 42414128 Mean: 757395 stddev: 234934
|
|
823
|
+
Lock time stats in us: mean 4 stddev 101 max 39660
|
|
824
|
+
------- folly::SharedMutex 8 threads
|
|
825
|
+
Sum: 58861445 Mean: 1051097 stddev: 491231
|
|
826
|
+
Lock time stats in us: mean 3 stddev 73 max 34007
|
|
827
|
+
------- folly::DistributedMutex 8 threads
|
|
828
|
+
Sum: 93377108 Mean: 1667448 stddev: 113502
|
|
829
|
+
Lock time stats in us: mean 1 stddev 46 max 11075
|
|
830
|
+
------- folly::DistributedMutex (Combining) 8 threads
|
|
831
|
+
Sum: 131093487 Mean: 2340955 stddev: 187841
|
|
832
|
+
Lock time stats in us: mean 1 stddev 3 max 25004
|
|
833
|
+
============================================================================
|
|
834
|
+
------- std::mutex 16 threads
|
|
835
|
+
Sum: 36606221 Mean: 653682 stddev: 65154
|
|
836
|
+
Lock time stats in us: mean 5 stddev 117 max 13603
|
|
837
|
+
------- folly::MicroSpinLock 16 threads
|
|
838
|
+
Sum: 27935153 Mean: 498842 stddev: 197304
|
|
839
|
+
Lock time stats in us: mean 7 stddev 3 max 257433
|
|
840
|
+
------- folly::PicoSpinLock<std::uint16_t> 16 threads
|
|
841
|
+
Sum: 12265416 Mean: 219025 stddev: 146399
|
|
842
|
+
Lock time stats in us: mean 17 stddev 350 max 471793
|
|
843
|
+
------- folly::MicroLock 16 threads
|
|
844
|
+
Sum: 18180611 Mean: 324653 stddev: 32123
|
|
845
|
+
Lock time stats in us: mean 11 stddev 236 max 40166
|
|
846
|
+
------- folly::SharedMutex 16 threads
|
|
847
|
+
Sum: 21734734 Mean: 388120 stddev: 190252
|
|
848
|
+
Lock time stats in us: mean 9 stddev 197 max 107045
|
|
849
|
+
------- folly::DistributedMutex 16 threads
|
|
850
|
+
Sum: 42823745 Mean: 764709 stddev: 64251
|
|
851
|
+
Lock time stats in us: mean 4 stddev 100 max 19986
|
|
852
|
+
------- folly::DistributedMutex (Combining) 16 threads
|
|
853
|
+
Sum: 63515255 Mean: 1134200 stddev: 37905
|
|
854
|
+
Lock time stats in us: mean 2 stddev 3 max 32005
|
|
855
|
+
============================================================================
|
|
856
|
+
------- std::mutex 32 threads
|
|
857
|
+
Sum: 10307832 Mean: 184068 stddev: 2431
|
|
858
|
+
Lock time stats in us: mean 21 stddev 416 max 18397
|
|
859
|
+
------- folly::MicroSpinLock 32 threads
|
|
860
|
+
Sum: 7318139 Mean: 130681 stddev: 24742
|
|
861
|
+
Lock time stats in us: mean 29 stddev 586 max 230672
|
|
862
|
+
------- folly::PicoSpinLock<std::uint16_t> 32 threads
|
|
863
|
+
Sum: 6424015 Mean: 114714 stddev: 138460
|
|
864
|
+
Lock time stats in us: mean 34 stddev 668 max 879632
|
|
865
|
+
------- folly::MicroLock 32 threads
|
|
866
|
+
Sum: 4893744 Mean: 87388 stddev: 6935
|
|
867
|
+
Lock time stats in us: mean 45 stddev 876 max 14902
|
|
868
|
+
------- folly::SharedMutex 32 threads
|
|
869
|
+
Sum: 6393363 Mean: 114167 stddev: 80211
|
|
870
|
+
Lock time stats in us: mean 34 stddev 671 max 75777
|
|
871
|
+
------- folly::DistributedMutex 32 threads
|
|
872
|
+
Sum: 14394775 Mean: 257049 stddev: 36723
|
|
873
|
+
Lock time stats in us: mean 15 stddev 298 max 54654
|
|
874
|
+
------- folly::DistributedMutex (Combining) 32 threads
|
|
875
|
+
Sum: 24232845 Mean: 432729 stddev: 11398
|
|
876
|
+
Lock time stats in us: mean 8 stddev 177 max 35008
|
|
877
|
+
============================================================================
|
|
878
|
+
------- std::mutex 64 threads
|
|
879
|
+
Sum: 10656640 Mean: 166510 stddev: 3340
|
|
880
|
+
Lock time stats in us: mean 23 stddev 402 max 10797
|
|
881
|
+
------- folly::MicroSpinLock 64 threads
|
|
882
|
+
Sum: 23284721 Mean: 363823 stddev: 62670
|
|
883
|
+
Lock time stats in us: mean 10 stddev 184 max 168470
|
|
884
|
+
------- folly::PicoSpinLock<std::uint16_t> 64 threads
|
|
885
|
+
Sum: 2322545 Mean: 36289 stddev: 6272
|
|
886
|
+
Lock time stats in us: mean 109 stddev 1846 max 1157157
|
|
887
|
+
------- folly::MicroLock 64 threads
|
|
888
|
+
Sum: 4835136 Mean: 75549 stddev: 3484
|
|
889
|
+
Lock time stats in us: mean 52 stddev 887 max 23895
|
|
890
|
+
------- folly::SharedMutex 64 threads
|
|
891
|
+
Sum: 7047147 Mean: 110111 stddev: 53207
|
|
892
|
+
Lock time stats in us: mean 35 stddev 608 max 85181
|
|
893
|
+
------- folly::DistributedMutex 64 threads
|
|
894
|
+
Sum: 14491662 Mean: 226432 stddev: 27098
|
|
895
|
+
Lock time stats in us: mean 17 stddev 296 max 55078
|
|
896
|
+
------- folly::DistributedMutex (Combining) 64 threads
|
|
897
|
+
Sum: 23885026 Mean: 373203 stddev: 14431
|
|
898
|
+
Lock time stats in us: mean 10 stddev 179 max 62008
|
|
899
|
+
============================================================================
|
|
900
|
+
============================================================================
|
|
901
|
+
folly/synchronization/test/SmallLocksBenchmark.cpprelative time/iter iters/s
|
|
902
|
+
============================================================================
|
|
903
|
+
StdMutexUncontendedBenchmark 16.42ns 60.90M
|
|
904
|
+
MicroSpinLockUncontendedBenchmark 10.95ns 91.33M
|
|
905
|
+
PicoSpinLockUncontendedBenchmark 20.38ns 49.07M
|
|
906
|
+
MicroLockUncontendedBenchmark 28.92ns 34.58M
|
|
907
|
+
SharedMutexUncontendedBenchmark 19.47ns 51.36M
|
|
908
|
+
DistributedMutexUncontendedBenchmark 28.89ns 34.62M
|
|
909
|
+
AtomicFetchAddUncontendedBenchmark 5.47ns 182.91M
|
|
910
|
+
----------------------------------------------------------------------------
|
|
911
|
+
----------------------------------------------------------------------------
|
|
912
|
+
std_mutex(1thread) 900.28ns 1.11M
|
|
913
|
+
folly_microspin(1thread) 109.53% 821.97ns 1.22M
|
|
914
|
+
folly_picospin(1thread) 101.86% 883.88ns 1.13M
|
|
915
|
+
folly_microlock(1thread) 102.54% 878.02ns 1.14M
|
|
916
|
+
folly_sharedmutex(1thread) 132.03% 681.86ns 1.47M
|
|
917
|
+
folly_distributedmutex(1thread) 129.50% 695.23ns 1.44M
|
|
918
|
+
folly_distributedmutex_combining(1thread) 130.73% 688.68ns 1.45M
|
|
919
|
+
folly_flatcombining_no_caching(1thread) 106.73% 843.49ns 1.19M
|
|
920
|
+
folly_flatcombining_caching(1thread) 125.22% 718.96ns 1.39M
|
|
921
|
+
----------------------------------------------------------------------------
|
|
922
|
+
std_mutex(2thread) 1.27us 784.90K
|
|
923
|
+
folly_microspin(2thread) 147.93% 861.24ns 1.16M
|
|
924
|
+
folly_picospin(2thread) 146.10% 872.06ns 1.15M
|
|
925
|
+
folly_microlock(2thread) 131.35% 970.00ns 1.03M
|
|
926
|
+
folly_sharedmutex(2thread) 135.07% 943.23ns 1.06M
|
|
927
|
+
folly_distributedmutex(2thread) 135.88% 937.63ns 1.07M
|
|
928
|
+
folly_distributedmutex_combining(2thread) 130.37% 977.27ns 1.02M
|
|
929
|
+
folly_flatcombining_no_caching(2thread) 85.64% 1.49us 672.22K
|
|
930
|
+
folly_flatcombining_caching(2thread) 91.98% 1.39us 721.93K
|
|
931
|
+
----------------------------------------------------------------------------
|
|
932
|
+
std_mutex(4thread) 2.40us 417.44K
|
|
933
|
+
folly_microspin(4thread) 101.55% 2.36us 423.92K
|
|
934
|
+
folly_picospin(4thread) 97.89% 2.45us 408.64K
|
|
935
|
+
folly_microlock(4thread) 79.64% 3.01us 332.45K
|
|
936
|
+
folly_sharedmutex(4thread) 75.10% 3.19us 313.49K
|
|
937
|
+
folly_distributedmutex(4thread) 126.16% 1.90us 526.63K
|
|
938
|
+
folly_distributedmutex_combining(4thread) 166.56% 1.44us 695.28K
|
|
939
|
+
folly_flatcombining_no_caching(4thread) 91.79% 2.61us 383.17K
|
|
940
|
+
folly_flatcombining_caching(4thread) 103.95% 2.30us 433.95K
|
|
941
|
+
----------------------------------------------------------------------------
|
|
942
|
+
std_mutex(8thread) 4.85us 206.37K
|
|
943
|
+
folly_microspin(8thread) 105.28% 4.60us 217.28K
|
|
944
|
+
folly_picospin(8thread) 89.06% 5.44us 183.80K
|
|
945
|
+
folly_microlock(8thread) 73.95% 6.55us 152.62K
|
|
946
|
+
folly_sharedmutex(8thread) 67.17% 7.21us 138.62K
|
|
947
|
+
folly_distributedmutex(8thread) 162.16% 2.99us 334.66K
|
|
948
|
+
folly_distributedmutex_combining(8thread) 251.93% 1.92us 519.92K
|
|
949
|
+
folly_flatcombining_no_caching(8thread) 141.99% 3.41us 293.02K
|
|
950
|
+
folly_flatcombining_caching(8thread) 166.26% 2.91us 343.12K
|
|
951
|
+
----------------------------------------------------------------------------
|
|
952
|
+
std_mutex(16thread) 11.36us 88.01K
|
|
953
|
+
folly_microspin(16thread) 102.73% 11.06us 90.42K
|
|
954
|
+
folly_picospin(16thread) 44.00% 25.83us 38.72K
|
|
955
|
+
folly_microlock(16thread) 52.42% 21.67us 46.14K
|
|
956
|
+
folly_sharedmutex(16thread) 53.46% 21.26us 47.05K
|
|
957
|
+
folly_distributedmutex(16thread) 166.17% 6.84us 146.24K
|
|
958
|
+
folly_distributedmutex_combining(16thread) 352.82% 3.22us 310.52K
|
|
959
|
+
folly_flatcombining_no_caching(16thread) 218.07% 5.21us 191.92K
|
|
960
|
+
folly_flatcombining_caching(16thread) 217.69% 5.22us 191.58K
|
|
961
|
+
----------------------------------------------------------------------------
|
|
962
|
+
std_mutex(32thread) 32.12us 31.13K
|
|
963
|
+
folly_microspin(32thread) 104.52% 30.74us 32.54K
|
|
964
|
+
folly_picospin(32thread) 32.81% 97.91us 10.21K
|
|
965
|
+
folly_microlock(32thread) 57.40% 55.96us 17.87K
|
|
966
|
+
folly_sharedmutex(32thread) 63.68% 50.45us 19.82K
|
|
967
|
+
folly_distributedmutex(32thread) 180.17% 17.83us 56.09K
|
|
968
|
+
folly_distributedmutex_combining(32thread) 394.34% 8.15us 122.76K
|
|
969
|
+
folly_flatcombining_no_caching(32thread) 216.41% 14.84us 67.37K
|
|
970
|
+
folly_flatcombining_caching(32thread) 261.99% 12.26us 81.56K
|
|
971
|
+
----------------------------------------------------------------------------
|
|
972
|
+
std_mutex(64thread) 36.76us 27.20K
|
|
973
|
+
folly_microspin(64thread) 112.14% 32.78us 30.51K
|
|
974
|
+
folly_picospin(64thread) 32.34% 113.65us 8.80K
|
|
975
|
+
folly_microlock(64thread) 57.21% 64.26us 15.56K
|
|
976
|
+
folly_sharedmutex(64thread) 60.93% 60.33us 16.57K
|
|
977
|
+
folly_distributedmutex(64thread) 179.79% 20.45us 48.91K
|
|
978
|
+
folly_distributedmutex_combining(64thread) 392.64% 9.36us 106.81K
|
|
979
|
+
folly_flatcombining_no_caching(64thread) 211.85% 17.35us 57.63K
|
|
980
|
+
folly_flatcombining_caching(64thread) 241.45% 15.22us 65.68K
|
|
981
|
+
----------------------------------------------------------------------------
|
|
982
|
+
std_mutex(128thread) 73.05us 13.69K
|
|
983
|
+
folly_microspin(128thread) 97.45% 74.96us 13.34K
|
|
984
|
+
folly_picospin(128thread) 31.46% 232.19us 4.31K
|
|
985
|
+
folly_microlock(128thread) 56.50% 129.29us 7.73K
|
|
986
|
+
folly_sharedmutex(128thread) 59.54% 122.69us 8.15K
|
|
987
|
+
folly_distributedmutex(128thread) 166.59% 43.85us 22.80K
|
|
988
|
+
folly_distributedmutex_combining(128thread) 379.86% 19.23us 52.00K
|
|
989
|
+
folly_flatcombining_no_caching(128thread) 179.10% 40.79us 24.52K
|
|
990
|
+
folly_flatcombining_caching(128thread) 189.64% 38.52us 25.96K
|
|
991
|
+
----------------------------------------------------------------------------
|
|
992
|
+
std_mutex_simple(1thread) 666.33ns 1.50M
|
|
993
|
+
folly_microspin_simple(1thread) 109.80% 606.87ns 1.65M
|
|
994
|
+
folly_picospin_simple(1thread) 108.89% 611.94ns 1.63M
|
|
995
|
+
folly_microlock_simple(1thread) 108.42% 614.59ns 1.63M
|
|
996
|
+
folly_sharedmutex_simple(1thread) 93.00% 716.47ns 1.40M
|
|
997
|
+
folly_distributedmutex_simple(1thread) 90.08% 739.68ns 1.35M
|
|
998
|
+
folly_distributedmutex_combining_simple(1thread 90.20% 738.73ns 1.35M
|
|
999
|
+
folly_flatcombining_no_caching_simple(1thread) 98.04% 679.68ns 1.47M
|
|
1000
|
+
folly_flatcombining_caching_simple(1thread) 105.59% 631.04ns 1.58M
|
|
1001
|
+
atomics_fetch_add(1thread) 108.30% 615.29ns 1.63M
|
|
1002
|
+
atomic_fetch_xor(1thread) 110.52% 602.90ns 1.66M
|
|
1003
|
+
atomic_cas(1thread) 109.86% 606.52ns 1.65M
|
|
1004
|
+
----------------------------------------------------------------------------
|
|
1005
|
+
std_mutex_simple(2thread) 1.19us 841.25K
|
|
1006
|
+
folly_microspin_simple(2thread) 130.73% 909.27ns 1.10M
|
|
1007
|
+
folly_picospin_simple(2thread) 112.39% 1.06us 945.48K
|
|
1008
|
+
folly_microlock_simple(2thread) 113.89% 1.04us 958.14K
|
|
1009
|
+
folly_sharedmutex_simple(2thread) 119.48% 994.86ns 1.01M
|
|
1010
|
+
folly_distributedmutex_simple(2thread) 112.44% 1.06us 945.91K
|
|
1011
|
+
folly_distributedmutex_combining_simple(2thread 123.12% 965.48ns 1.04M
|
|
1012
|
+
folly_flatcombining_no_caching_simple(2thread) 90.56% 1.31us 761.82K
|
|
1013
|
+
folly_flatcombining_caching_simple(2thread) 100.66% 1.18us 846.83K
|
|
1014
|
+
atomics_fetch_add(2thread) 119.15% 997.67ns 1.00M
|
|
1015
|
+
atomic_fetch_xor(2thread) 179.85% 660.93ns 1.51M
|
|
1016
|
+
atomic_cas(2thread) 179.40% 662.58ns 1.51M
|
|
1017
|
+
----------------------------------------------------------------------------
|
|
1018
|
+
std_mutex_simple(4thread) 2.37us 422.81K
|
|
1019
|
+
folly_microspin_simple(4thread) 110.42% 2.14us 466.89K
|
|
1020
|
+
folly_picospin_simple(4thread) 111.77% 2.12us 472.58K
|
|
1021
|
+
folly_microlock_simple(4thread) 82.17% 2.88us 347.44K
|
|
1022
|
+
folly_sharedmutex_simple(4thread) 93.40% 2.53us 394.89K
|
|
1023
|
+
folly_distributedmutex_simple(4thread) 121.00% 1.95us 511.58K
|
|
1024
|
+
folly_distributedmutex_combining_simple(4thread 187.65% 1.26us 793.42K
|
|
1025
|
+
folly_flatcombining_no_caching_simple(4thread) 104.81% 2.26us 443.13K
|
|
1026
|
+
folly_flatcombining_caching_simple(4thread) 112.90% 2.09us 477.34K
|
|
1027
|
+
atomics_fetch_add(4thread) 178.61% 1.32us 755.20K
|
|
1028
|
+
atomic_fetch_xor(4thread) 323.62% 730.84ns 1.37M
|
|
1029
|
+
atomic_cas(4thread) 300.43% 787.23ns 1.27M
|
|
1030
|
+
----------------------------------------------------------------------------
|
|
1031
|
+
std_mutex_simple(8thread) 5.02us 199.09K
|
|
1032
|
+
folly_microspin_simple(8thread) 116.44% 4.31us 231.82K
|
|
1033
|
+
folly_picospin_simple(8thread) 80.84% 6.21us 160.94K
|
|
1034
|
+
folly_microlock_simple(8thread) 77.18% 6.51us 153.66K
|
|
1035
|
+
folly_sharedmutex_simple(8thread) 76.09% 6.60us 151.48K
|
|
1036
|
+
folly_distributedmutex_simple(8thread) 145.27% 3.46us 289.21K
|
|
1037
|
+
folly_distributedmutex_combining_simple(8thread 310.65% 1.62us 618.48K
|
|
1038
|
+
folly_flatcombining_no_caching_simple(8thread) 139.83% 3.59us 278.39K
|
|
1039
|
+
folly_flatcombining_caching_simple(8thread) 163.72% 3.07us 325.95K
|
|
1040
|
+
atomics_fetch_add(8thread) 337.67% 1.49us 672.28K
|
|
1041
|
+
atomic_fetch_xor(8thread) 380.66% 1.32us 757.87K
|
|
1042
|
+
atomic_cas(8thread) 238.04% 2.11us 473.93K
|
|
1043
|
+
----------------------------------------------------------------------------
|
|
1044
|
+
std_mutex_simple(16thread) 12.26us 81.59K
|
|
1045
|
+
folly_microspin_simple(16thread) 116.32% 10.54us 94.91K
|
|
1046
|
+
folly_picospin_simple(16thread) 53.67% 22.83us 43.79K
|
|
1047
|
+
folly_microlock_simple(16thread) 66.39% 18.46us 54.17K
|
|
1048
|
+
folly_sharedmutex_simple(16thread) 65.00% 18.85us 53.04K
|
|
1049
|
+
folly_distributedmutex_simple(16thread) 171.32% 7.15us 139.79K
|
|
1050
|
+
folly_distributedmutex_combining_simple(16threa 445.11% 2.75us 363.17K
|
|
1051
|
+
folly_flatcombining_no_caching_simple(16thread) 206.11% 5.95us 168.17K
|
|
1052
|
+
folly_flatcombining_caching_simple(16thread) 245.09% 5.00us 199.97K
|
|
1053
|
+
atomics_fetch_add(16thread) 494.82% 2.48us 403.73K
|
|
1054
|
+
atomic_fetch_xor(16thread) 489.90% 2.50us 399.72K
|
|
1055
|
+
atomic_cas(16thread) 232.76% 5.27us 189.91K
|
|
1056
|
+
----------------------------------------------------------------------------
|
|
1057
|
+
std_mutex_simple(32thread) 30.28us 33.03K
|
|
1058
|
+
folly_microspin_simple(32thread) 102.20% 29.62us 33.76K
|
|
1059
|
+
folly_picospin_simple(32thread) 31.56% 95.92us 10.43K
|
|
1060
|
+
folly_microlock_simple(32thread) 53.99% 56.07us 17.83K
|
|
1061
|
+
folly_sharedmutex_simple(32thread) 67.49% 44.86us 22.29K
|
|
1062
|
+
folly_distributedmutex_simple(32thread) 161.63% 18.73us 53.38K
|
|
1063
|
+
folly_distributedmutex_combining_simple(32threa 605.26% 5.00us 199.92K
|
|
1064
|
+
folly_flatcombining_no_caching_simple(32thread) 234.62% 12.90us 77.49K
|
|
1065
|
+
folly_flatcombining_caching_simple(32thread) 332.21% 9.11us 109.73K
|
|
1066
|
+
atomics_fetch_add(32thread) 909.18% 3.33us 300.30K
|
|
1067
|
+
atomic_fetch_xor(32thread) 779.56% 3.88us 257.49K
|
|
1068
|
+
atomic_cas(32thread) 622.19% 4.87us 205.51K
|
|
1069
|
+
----------------------------------------------------------------------------
|
|
1070
|
+
std_mutex_simple(64thread) 34.33us 29.13K
|
|
1071
|
+
folly_microspin_simple(64thread) 99.86% 34.37us 29.09K
|
|
1072
|
+
folly_picospin_simple(64thread) 31.37% 109.42us 9.14K
|
|
1073
|
+
folly_microlock_simple(64thread) 53.46% 64.21us 15.57K
|
|
1074
|
+
folly_sharedmutex_simple(64thread) 62.94% 54.54us 18.33K
|
|
1075
|
+
folly_distributedmutex_simple(64thread) 161.26% 21.29us 46.98K
|
|
1076
|
+
folly_distributedmutex_combining_simple(64threa 603.87% 5.68us 175.91K
|
|
1077
|
+
folly_flatcombining_no_caching_simple(64thread) 247.00% 13.90us 71.95K
|
|
1078
|
+
folly_flatcombining_caching_simple(64thread) 310.66% 11.05us 90.50K
|
|
1079
|
+
atomics_fetch_add(64thread) 839.49% 4.09us 244.55K
|
|
1080
|
+
atomic_fetch_xor(64thread) 756.48% 4.54us 220.37K
|
|
1081
|
+
atomic_cas(64thread) 606.85% 5.66us 176.78K
|
|
1082
|
+
----------------------------------------------------------------------------
|
|
1083
|
+
std_mutex_simple(128thread) 67.35us 14.85K
|
|
1084
|
+
folly_microspin_simple(128thread) 92.58% 72.75us 13.75K
|
|
1085
|
+
folly_picospin_simple(128thread) 29.87% 225.47us 4.44K
|
|
1086
|
+
folly_microlock_simple(128thread) 52.52% 128.25us 7.80K
|
|
1087
|
+
folly_sharedmutex_simple(128thread) 59.79% 112.64us 8.88K
|
|
1088
|
+
folly_distributedmutex_simple(128thread) 151.27% 44.52us 22.46K
|
|
1089
|
+
folly_distributedmutex_combining_simple(128thre 580.11% 11.61us 86.13K
|
|
1090
|
+
folly_flatcombining_no_caching_simple(128thread 219.20% 30.73us 32.55K
|
|
1091
|
+
folly_flatcombining_caching_simple(128thread) 225.39% 29.88us 33.46K
|
|
1092
|
+
atomics_fetch_add(128thread) 813.36% 8.28us 120.76K
|
|
1093
|
+
atomic_fetch_xor(128thread) 740.02% 9.10us 109.88K
|
|
1094
|
+
atomic_cas(128thread) 586.66% 11.48us 87.11K
|
|
1095
|
+
============================================================================
|
|
1096
|
+
|
|
1097
|
+
./small_locks_benchmark --bm_min_iters=100000
|
|
1098
|
+
Intel(R) Xeon(R) D-2191 CPU @ 1.60GHz
|
|
1099
|
+
|
|
1100
|
+
============================================================================
|
|
1101
|
+
folly/synchronization/test/SmallLocksBenchmark.cpprelative time/iter iters/s
|
|
1102
|
+
============================================================================
|
|
1103
|
+
StdMutexUncontendedBenchmark 37.65ns 26.56M
|
|
1104
|
+
MicroSpinLockUncontendedBenchmark 21.97ns 45.53M
|
|
1105
|
+
PicoSpinLockUncontendedBenchmark 40.80ns 24.51M
|
|
1106
|
+
MicroLockUncontendedBenchmark 57.76ns 17.31M
|
|
1107
|
+
SharedMutexUncontendedBenchmark 39.55ns 25.29M
|
|
1108
|
+
DistributedMutexUncontendedBenchmark 51.47ns 19.43M
|
|
1109
|
+
AtomicFetchAddUncontendedBenchmark 10.67ns 93.73M
|
|
1110
|
+
----------------------------------------------------------------------------
|
|
1111
|
+
----------------------------------------------------------------------------
|
|
1112
|
+
std_mutex(1thread) 1.37us 730.43K
|
|
1113
|
+
folly_microspin(1thread) 102.06% 1.34us 745.45K
|
|
1114
|
+
folly_picospin(1thread) 100.68% 1.36us 735.43K
|
|
1115
|
+
folly_microlock(1thread) 104.27% 1.31us 761.64K
|
|
1116
|
+
folly_sharedmutex(1thread) 101.95% 1.34us 744.65K
|
|
1117
|
+
folly_distributedmutex(1thread) 98.63% 1.39us 720.41K
|
|
1118
|
+
folly_distributedmutex_combining(1thread) 103.78% 1.32us 758.05K
|
|
1119
|
+
folly_flatcombining_no_caching(1thread) 95.44% 1.43us 697.15K
|
|
1120
|
+
folly_flatcombining_caching(1thread) 99.11% 1.38us 723.94K
|
|
1121
|
+
----------------------------------------------------------------------------
|
|
1122
|
+
std_mutex(2thread) 1.65us 605.36K
|
|
1123
|
+
folly_microspin(2thread) 119.82% 1.38us 725.35K
|
|
1124
|
+
folly_picospin(2thread) 112.46% 1.47us 680.81K
|
|
1125
|
+
folly_microlock(2thread) 106.47% 1.55us 644.54K
|
|
1126
|
+
folly_sharedmutex(2thread) 107.12% 1.54us 648.45K
|
|
1127
|
+
folly_distributedmutex(2thread) 110.80% 1.49us 670.76K
|
|
1128
|
+
folly_distributedmutex_combining(2thread) 97.09% 1.70us 587.77K
|
|
1129
|
+
folly_flatcombining_no_caching(2thread) 83.37% 1.98us 504.68K
|
|
1130
|
+
folly_flatcombining_caching(2thread) 108.62% 1.52us 657.54K
|
|
1131
|
+
----------------------------------------------------------------------------
|
|
1132
|
+
std_mutex(4thread) 2.92us 341.96K
|
|
1133
|
+
folly_microspin(4thread) 165.47% 1.77us 565.85K
|
|
1134
|
+
folly_picospin(4thread) 181.92% 1.61us 622.09K
|
|
1135
|
+
folly_microlock(4thread) 149.83% 1.95us 512.35K
|
|
1136
|
+
folly_sharedmutex(4thread) 158.69% 1.84us 542.66K
|
|
1137
|
+
folly_distributedmutex(4thread) 107.42% 2.72us 367.35K
|
|
1138
|
+
folly_distributedmutex_combining(4thread) 144.34% 2.03us 493.59K
|
|
1139
|
+
folly_flatcombining_no_caching(4thread) 88.43% 3.31us 302.40K
|
|
1140
|
+
folly_flatcombining_caching(4thread) 94.20% 3.10us 322.11K
|
|
1141
|
+
----------------------------------------------------------------------------
|
|
1142
|
+
std_mutex(8thread) 7.04us 142.02K
|
|
1143
|
+
folly_microspin(8thread) 134.72% 5.23us 191.32K
|
|
1144
|
+
folly_picospin(8thread) 112.37% 6.27us 159.58K
|
|
1145
|
+
folly_microlock(8thread) 109.65% 6.42us 155.71K
|
|
1146
|
+
folly_sharedmutex(8thread) 105.92% 6.65us 150.42K
|
|
1147
|
+
folly_distributedmutex(8thread) 127.22% 5.53us 180.67K
|
|
1148
|
+
folly_distributedmutex_combining(8thread) 275.50% 2.56us 391.26K
|
|
1149
|
+
folly_flatcombining_no_caching(8thread) 144.99% 4.86us 205.92K
|
|
1150
|
+
folly_flatcombining_caching(8thread) 156.31% 4.50us 221.99K
|
|
1151
|
+
----------------------------------------------------------------------------
|
|
1152
|
+
std_mutex(16thread) 13.08us 76.44K
|
|
1153
|
+
folly_microspin(16thread) 91.47% 14.30us 69.92K
|
|
1154
|
+
folly_picospin(16thread) 67.95% 19.25us 51.94K
|
|
1155
|
+
folly_microlock(16thread) 73.57% 17.78us 56.24K
|
|
1156
|
+
folly_sharedmutex(16thread) 70.59% 18.53us 53.96K
|
|
1157
|
+
folly_distributedmutex(16thread) 139.74% 9.36us 106.82K
|
|
1158
|
+
folly_distributedmutex_combining(16thread) 338.38% 3.87us 258.67K
|
|
1159
|
+
folly_flatcombining_no_caching(16thread) 194.08% 6.74us 148.36K
|
|
1160
|
+
folly_flatcombining_caching(16thread) 195.03% 6.71us 149.09K
|
|
1161
|
+
----------------------------------------------------------------------------
|
|
1162
|
+
std_mutex(32thread) 25.35us 39.45K
|
|
1163
|
+
folly_microspin(32thread) 73.81% 34.35us 29.11K
|
|
1164
|
+
folly_picospin(32thread) 50.66% 50.04us 19.98K
|
|
1165
|
+
folly_microlock(32thread) 58.40% 43.41us 23.03K
|
|
1166
|
+
folly_sharedmutex(32thread) 55.14% 45.98us 21.75K
|
|
1167
|
+
folly_distributedmutex(32thread) 141.36% 17.93us 55.76K
|
|
1168
|
+
folly_distributedmutex_combining(32thread) 358.52% 7.07us 141.42K
|
|
1169
|
+
folly_flatcombining_no_caching(32thread) 257.78% 9.83us 101.68K
|
|
1170
|
+
folly_flatcombining_caching(32thread) 285.82% 8.87us 112.74K
|
|
1171
|
+
----------------------------------------------------------------------------
|
|
1172
|
+
std_mutex(64thread) 45.03us 22.21K
|
|
1173
|
+
folly_microspin(64thread) 75.05% 60.00us 16.67K
|
|
1174
|
+
folly_picospin(64thread) 44.98% 100.12us 9.99K
|
|
1175
|
+
folly_microlock(64thread) 56.99% 79.01us 12.66K
|
|
1176
|
+
folly_sharedmutex(64thread) 52.67% 85.49us 11.70K
|
|
1177
|
+
folly_distributedmutex(64thread) 139.71% 32.23us 31.02K
|
|
1178
|
+
folly_distributedmutex_combining(64thread) 343.76% 13.10us 76.34K
|
|
1179
|
+
folly_flatcombining_no_caching(64thread) 211.67% 21.27us 47.01K
|
|
1180
|
+
folly_flatcombining_caching(64thread) 222.51% 20.24us 49.41K
|
|
1181
|
+
----------------------------------------------------------------------------
|
|
1182
|
+
std_mutex(128thread) 88.78us 11.26K
|
|
1183
|
+
folly_microspin(128thread) 71.00% 125.03us 8.00K
|
|
1184
|
+
folly_picospin(128thread) 30.97% 286.63us 3.49K
|
|
1185
|
+
folly_microlock(128thread) 54.37% 163.28us 6.12K
|
|
1186
|
+
folly_sharedmutex(128thread) 51.69% 171.76us 5.82K
|
|
1187
|
+
folly_distributedmutex(128thread) 137.37% 64.63us 15.47K
|
|
1188
|
+
folly_distributedmutex_combining(128thread) 281.23% 31.57us 31.68K
|
|
1189
|
+
folly_flatcombining_no_caching(128thread) 136.61% 64.99us 15.39K
|
|
1190
|
+
folly_flatcombining_caching(128thread) 152.32% 58.29us 17.16K
|
|
1191
|
+
----------------------------------------------------------------------------
|
|
1192
|
+
std_mutex_simple(1thread) 1.63us 611.75K
|
|
1193
|
+
folly_microspin_simple(1thread) 103.24% 1.58us 631.57K
|
|
1194
|
+
folly_picospin_simple(1thread) 109.17% 1.50us 667.87K
|
|
1195
|
+
folly_microlock_simple(1thread) 111.22% 1.47us 680.41K
|
|
1196
|
+
folly_sharedmutex_simple(1thread) 136.79% 1.19us 836.83K
|
|
1197
|
+
folly_distributedmutex_simple(1thread) 107.21% 1.52us 655.88K
|
|
1198
|
+
folly_distributedmutex_combining_simple(1thread 134.79% 1.21us 824.61K
|
|
1199
|
+
folly_flatcombining_no_caching_simple(1thread) 127.99% 1.28us 782.99K
|
|
1200
|
+
folly_flatcombining_caching_simple(1thread) 133.87% 1.22us 818.93K
|
|
1201
|
+
atomics_fetch_add(1thread) 138.24% 1.18us 845.70K
|
|
1202
|
+
atomic_fetch_xor(1thread) 106.94% 1.53us 654.23K
|
|
1203
|
+
atomic_cas(1thread) 124.81% 1.31us 763.52K
|
|
1204
|
+
----------------------------------------------------------------------------
|
|
1205
|
+
std_mutex_simple(2thread) 1.60us 626.60K
|
|
1206
|
+
folly_microspin_simple(2thread) 111.88% 1.43us 701.02K
|
|
1207
|
+
folly_picospin_simple(2thread) 106.11% 1.50us 664.91K
|
|
1208
|
+
folly_microlock_simple(2thread) 88.90% 1.80us 557.04K
|
|
1209
|
+
folly_sharedmutex_simple(2thread) 90.93% 1.76us 569.79K
|
|
1210
|
+
folly_distributedmutex_simple(2thread) 93.93% 1.70us 588.57K
|
|
1211
|
+
folly_distributedmutex_combining_simple(2thread 106.86% 1.49us 669.61K
|
|
1212
|
+
folly_flatcombining_no_caching_simple(2thread) 85.92% 1.86us 538.37K
|
|
1213
|
+
folly_flatcombining_caching_simple(2thread) 98.82% 1.61us 619.24K
|
|
1214
|
+
atomics_fetch_add(2thread) 104.61% 1.53us 655.46K
|
|
1215
|
+
atomic_fetch_xor(2thread) 126.46% 1.26us 792.40K
|
|
1216
|
+
atomic_cas(2thread) 125.92% 1.27us 788.99K
|
|
1217
|
+
----------------------------------------------------------------------------
|
|
1218
|
+
std_mutex_simple(4thread) 2.71us 368.45K
|
|
1219
|
+
folly_microspin_simple(4thread) 146.48% 1.85us 539.69K
|
|
1220
|
+
folly_picospin_simple(4thread) 163.54% 1.66us 602.57K
|
|
1221
|
+
folly_microlock_simple(4thread) 113.17% 2.40us 416.99K
|
|
1222
|
+
folly_sharedmutex_simple(4thread) 142.36% 1.91us 524.52K
|
|
1223
|
+
folly_distributedmutex_simple(4thread) 108.22% 2.51us 398.74K
|
|
1224
|
+
folly_distributedmutex_combining_simple(4thread 141.49% 1.92us 521.30K
|
|
1225
|
+
folly_flatcombining_no_caching_simple(4thread) 97.27% 2.79us 358.38K
|
|
1226
|
+
folly_flatcombining_caching_simple(4thread) 106.12% 2.56us 390.99K
|
|
1227
|
+
atomics_fetch_add(4thread) 151.10% 1.80us 556.73K
|
|
1228
|
+
atomic_fetch_xor(4thread) 213.14% 1.27us 785.32K
|
|
1229
|
+
atomic_cas(4thread) 218.93% 1.24us 806.65K
|
|
1230
|
+
----------------------------------------------------------------------------
|
|
1231
|
+
std_mutex_simple(8thread) 7.02us 142.50K
|
|
1232
|
+
folly_microspin_simple(8thread) 137.77% 5.09us 196.33K
|
|
1233
|
+
folly_picospin_simple(8thread) 119.78% 5.86us 170.69K
|
|
1234
|
+
folly_microlock_simple(8thread) 108.08% 6.49us 154.02K
|
|
1235
|
+
folly_sharedmutex_simple(8thread) 114.77% 6.11us 163.55K
|
|
1236
|
+
folly_distributedmutex_simple(8thread) 120.24% 5.84us 171.35K
|
|
1237
|
+
folly_distributedmutex_combining_simple(8thread 316.54% 2.22us 451.07K
|
|
1238
|
+
folly_flatcombining_no_caching_simple(8thread) 136.43% 5.14us 194.42K
|
|
1239
|
+
folly_flatcombining_caching_simple(8thread) 145.04% 4.84us 206.68K
|
|
1240
|
+
atomics_fetch_add(8thread) 358.98% 1.95us 511.55K
|
|
1241
|
+
atomic_fetch_xor(8thread) 505.27% 1.39us 720.02K
|
|
1242
|
+
atomic_cas(8thread) 389.32% 1.80us 554.79K
|
|
1243
|
+
----------------------------------------------------------------------------
|
|
1244
|
+
std_mutex_simple(16thread) 12.78us 78.24K
|
|
1245
|
+
folly_microspin_simple(16thread) 98.10% 13.03us 76.75K
|
|
1246
|
+
folly_picospin_simple(16thread) 72.52% 17.62us 56.74K
|
|
1247
|
+
folly_microlock_simple(16thread) 70.12% 18.23us 54.86K
|
|
1248
|
+
folly_sharedmutex_simple(16thread) 76.81% 16.64us 60.09K
|
|
1249
|
+
folly_distributedmutex_simple(16thread) 113.84% 11.23us 89.06K
|
|
1250
|
+
folly_distributedmutex_combining_simple(16threa 498.99% 2.56us 390.39K
|
|
1251
|
+
folly_flatcombining_no_caching_simple(16thread) 193.05% 6.62us 151.04K
|
|
1252
|
+
folly_flatcombining_caching_simple(16thread) 220.47% 5.80us 172.49K
|
|
1253
|
+
atomics_fetch_add(16thread) 611.70% 2.09us 478.58K
|
|
1254
|
+
atomic_fetch_xor(16thread) 515.51% 2.48us 403.32K
|
|
1255
|
+
atomic_cas(16thread) 239.86% 5.33us 187.66K
|
|
1256
|
+
----------------------------------------------------------------------------
|
|
1257
|
+
std_mutex_simple(32thread) 23.80us 42.02K
|
|
1258
|
+
folly_microspin_simple(32thread) 76.32% 31.18us 32.07K
|
|
1259
|
+
folly_picospin_simple(32thread) 48.82% 48.75us 20.51K
|
|
1260
|
+
folly_microlock_simple(32thread) 52.99% 44.92us 22.26K
|
|
1261
|
+
folly_sharedmutex_simple(32thread) 54.03% 44.05us 22.70K
|
|
1262
|
+
folly_distributedmutex_simple(32thread) 108.28% 21.98us 45.49K
|
|
1263
|
+
folly_distributedmutex_combining_simple(32threa 697.71% 3.41us 293.15K
|
|
1264
|
+
folly_flatcombining_no_caching_simple(32thread) 291.70% 8.16us 122.56K
|
|
1265
|
+
folly_flatcombining_caching_simple(32thread) 412.51% 5.77us 173.32K
|
|
1266
|
+
atomics_fetch_add(32thread) 1074.64% 2.21us 451.52K
|
|
1267
|
+
atomic_fetch_xor(32thread) 577.90% 4.12us 242.81K
|
|
1268
|
+
atomic_cas(32thread) 193.87% 12.28us 81.46K
|
|
1269
|
+
----------------------------------------------------------------------------
|
|
1270
|
+
std_mutex_simple(64thread) 41.40us 24.16K
|
|
1271
|
+
folly_microspin_simple(64thread) 75.30% 54.98us 18.19K
|
|
1272
|
+
folly_picospin_simple(64thread) 42.87% 96.57us 10.35K
|
|
1273
|
+
folly_microlock_simple(64thread) 50.88% 81.37us 12.29K
|
|
1274
|
+
folly_sharedmutex_simple(64thread) 50.08% 82.67us 12.10K
|
|
1275
|
+
folly_distributedmutex_simple(64thread) 105.81% 39.12us 25.56K
|
|
1276
|
+
folly_distributedmutex_combining_simple(64threa 604.86% 6.84us 146.11K
|
|
1277
|
+
folly_flatcombining_no_caching_simple(64thread) 269.82% 15.34us 65.18K
|
|
1278
|
+
folly_flatcombining_caching_simple(64thread) 334.78% 12.37us 80.87K
|
|
1279
|
+
atomics_fetch_add(64thread) 1061.21% 3.90us 256.34K
|
|
1280
|
+
atomic_fetch_xor(64thread) 551.00% 7.51us 133.10K
|
|
1281
|
+
atomic_cas(64thread) 183.75% 22.53us 44.39K
|
|
1282
|
+
----------------------------------------------------------------------------
|
|
1283
|
+
std_mutex_simple(128thread) 80.97us 12.35K
|
|
1284
|
+
folly_microspin_simple(128thread) 70.93% 114.16us 8.76K
|
|
1285
|
+
folly_picospin_simple(128thread) 32.81% 246.78us 4.05K
|
|
1286
|
+
folly_microlock_simple(128thread) 48.00% 168.69us 5.93K
|
|
1287
|
+
folly_sharedmutex_simple(128thread) 49.03% 165.15us 6.06K
|
|
1288
|
+
folly_distributedmutex_simple(128thread) 103.96% 77.88us 12.84K
|
|
1289
|
+
folly_distributedmutex_combining_simple(128thre 460.68% 17.58us 56.90K
|
|
1290
|
+
folly_flatcombining_no_caching_simple(128thread 211.10% 38.35us 26.07K
|
|
1291
|
+
folly_flatcombining_caching_simple(128thread) 220.02% 36.80us 27.17K
|
|
1292
|
+
atomics_fetch_add(128thread) 1031.88% 7.85us 127.45K
|
|
1293
|
+
atomic_fetch_xor(128thread) 543.67% 14.89us 67.15K
|
|
1294
|
+
atomic_cas(128thread) 179.37% 45.14us 22.15K
|
|
1295
|
+
============================================================================
|
|
1296
|
+
*/
|