Skip to content

Testing And Performance Analysis

ZjzMisaka edited this page Sep 1, 2024 · 11 revisions

Unit Testing

This thread pool has been meticulously tested, achieving

  • > 99.5% test coverage
  • Extensive use of Assert

to ensure robustness and reliability in various scenarios.

Benchmark

Report


BenchmarkDotNet v0.14.0, Windows 10 (10.0.19044.2364/21H2/November2021Update)
Intel Core i7-8700 CPU 3.20GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores
.NET SDK 8.0.100
  [Host]     : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2
  DefaultJob : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2

Method Mean Error StdDev Gen0 Gen1 Allocated
TestDotnetThreadPool 4.581 ms 0.1256 ms 0.3685 ms - - 31.46 KB
TestSmartThreadPool 6.433 ms 0.1271 ms 0.2193 ms 85.9375 31.2500 554.73 KB
TestPowerThreadPool 6.555 ms 0.0752 ms 0.0703 ms 265.6250 148.4375 1650.76 KB
  • The .NET ThreadPool has the fastest mean execution time
  • The SmartThreadPool shows comparable performance, though slightly faster than PowerThreadPool.
  • The slight trade-off in speed is compensated by the extensive feature set offered by PowerThreadPool, which is outlined in page Feature Comparison.