Skip to content

Instantly share code, notes, and snippets.

@VSadov
VSadov / StackBenchWithTickCount.cs
Created December 19, 2023 20:25
Stack walk bench with Environment.TickCount at the leafs
using System.Runtime.CompilerServices;
#nullable disable
internal class Program
{
private static void Main(string[] args)
{
var p = new Program();
@VSadov
VSadov / poolBench.txt
Last active March 23, 2020 22:25
ArrayPool benchmarks.
| Method | Toolchain | RentalSize | ManipulateArray | Async | UseSharedPool | Mean | Error | StdDev | Median | Min | Max | Ratio | MannWhitney(3ms) | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |
|----------------- |---------------------------------------------------------------------------------------------- |----------- |---------------- |------ |-------------- |-------------:|-----------:|-----------:|-------------:|-------------:|-------------:|------:|----------------- |--------:|-------:|------:|------:|----------:|
| SingleSerial | \baseline\CoreRun.exe | 4096 | False | False | False | 29.04 ns | 0.150 ns | 0.133 ns | 28.98 ns | 28.90 ns | 29.35 ns | 1.00 | Same | 0.01 | - | - | - | - |
| SingleSerial | \withChange\CoreRun.exe | 4096 | False | False | False | 29.00 ns | 0.197 ns | 0.175 ns | 28.99 ns | 28.71
@VSadov
VSadov / Cast001.txt
Created October 29, 2019 18:00
Casting benchmarks
```
| Method | Toolchain | Mean | Error | StdDev | Median | Min | Max | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---------------------------------------------- |------------------------------------------------------------------------------------------ |-----------------:|---------------:|---------------:|-----------------:|-----------------:|-----------------:|------:|--------:|------:|------:|------:|----------:|
| ObjFooIsObj | \CoreFx\corefx\artifacts\bin\runtime\netcoreapp-Windows_NT-Release-x64\CoreRun.exe | 223,590.848 ns | 14,941.3246 ns | 15,343.6403 ns | 220,846.583 ns | 210,394.000 ns | 270,238.583 ns | 1.00 | 0.00 | - | - | - | - |
| ObjFooIsObj | \CoreFx_master\corefx\artifacts\bin\runtime\netcorea
@VSadov
VSadov / Lat_x1_12cores_ShortCacheDelay.txt
Created October 3, 2019 20:22
x4 threads 12 cores Short cache delay
CPU
Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
Base speed: 3.19 GHz
Sockets: 1
Cores: 6
Logical processors: 12
Virtualization: Disabled
Hyper-V support: Yes
@VSadov
VSadov / Lat_x1_12cores.txt
Created October 3, 2019 17:27
x1 threads 12 cores
CPU
Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
Base speed: 3.19 GHz
Sockets: 1
Cores: 6
Logical processors: 12
Virtualization: Disabled
Hyper-V support: Yes
@VSadov
VSadov / Lat_x1_8cores.txt
Created October 3, 2019 17:27
x1 threads 8 cores
CPU
Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
Maximum speed: 3.60 GHz
Sockets: 1
Cores: 4
Logical processors: 8
Virtualization: Enabled
L1 cache: 256 KB
CPU
Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
Maximum speed: 3.60 GHz
Sockets: 1
Cores: 4
Logical processors: 8
Virtualization: Enabled
L1 cache: 256 KB
@VSadov
VSadov / Lat_x4_8cores.txt
Created October 3, 2019 17:20
x4 threads 8 cores
CPU
CPU
Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
Maximum speed: 3.60 GHz
Sockets: 1
Cores: 4
Logical processors: 8
@VSadov
VSadov / Lat_x4_12cores.txt
Created October 3, 2019 17:20
x4 threads 12 cores
CPU
Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
Base speed: 3.19 GHz
Sockets: 1
Cores: 6
Logical processors: 12
Virtualization: Disabled
Hyper-V support: Yes
@VSadov
VSadov / TPtestsQueue08_15.txt
Created August 15, 2019 22:25
Throughput/overhead tests (new queues)
Testing 2,621,440 calls, with GCs after 262,144 calls.
Operations per second on 12 Cores
Parallelism
Serial 2x 16x 64x 512x
QUWI No Queues (TP) 1.903 M 5.538 M 9.707 M 10.919 M 10.845 M
- Depth 2 9.886 M 9.833 M 9.734 M 9.882 M 9.797 M
- Depth 16 9.842 M 10.195 M 10.235 M 10.239 M 10.259 M
- Depth 64 10.445 M 10.460 M 10.403 M 10.462 M 10.402 M
- Depth 512 10.501 M 10.535 M 10.526 M 9.450 M 9.695 M