Files
Misaki.HighPerformance/Misaki.HighPerformance.Test/Program.cs
2025-09-11 10:54:34 +09:00

24 lines
603 B
C#

//var threadCount = 8;
//var map = new ConcurrentSlotMap<int>();
//var barrier = new Barrier(threadCount);
//Parallel.For(0, threadCount, threadIndex =>
//{
// barrier.SignalAndWait();
// for (var i = 0; i < 1000; i++)
// {
// var id = map.Add(i + threadIndex * 1000, out var gen);
// if (i % 100 == 0)
// {
// map.Remove(id, gen);
// }
// }
//});
//Console.WriteLine($"Count should be {threadCount * 990}, actual: {map.Count}");
using Misaki.HighPerformance.Test.Benchmark;
BenchmarkDotNet.Running.BenchmarkRunner.Run<MathematicsBenchmark>();