ran the .net8 test a few more times, up to 300 just to make sure it’s not slowing down somewhere else
there are some outliers but then it goes back to normal. still odd tbh
BenchmarkDotNet v0.14.0, Arch Linux
AMD Ryzen 9 5900X, 1 CPU, 24 logical and 12 physical cores
.NET SDK 8.0.401
[Host] : .NET 8.0.8 (8.0.824.36612), X64 RyuJIT AVX2
DefaultJob : .NET 8.0.8 (8.0.824.36612), X64 RyuJIT AVX2
| Method | ArraySize | Mean | Error | StdDev |
|---------- |---------- |-------------:|------------:|------------:|
| Benchmark | 10 | 888.7 us | 4.42 us | 4.13 us |
| Benchmark | 20 | 1,762.0 us | 1.71 us | 1.60 us |
| Benchmark | 30 | 2,656.7 us | 2.41 us | 2.14 us |
| Benchmark | 40 | 3,616.7 us | 5.59 us | 5.23 us |
| Benchmark | 50 | 4,478.6 us | 88.01 us | 101.36 us |
| Benchmark | 60 | 5,454.9 us | 4.09 us | 3.62 us |
| Benchmark | 70 | 6,392.8 us | 5.56 us | 4.93 us |
| Benchmark | 80 | 7,248.2 us | 3.80 us | 2.97 us |
| Benchmark | 90 | 8,122.8 us | 81.66 us | 68.19 us |
| Benchmark | 100 | 8,956.3 us | 87.85 us | 82.17 us |
| Benchmark | 110 | 9,966.8 us | 12.56 us | 10.49 us |
| Benchmark | 120 | 10,779.1 us | 105.68 us | 98.86 us |
| Benchmark | 130 | 11,673.0 us | 147.88 us | 131.09 us |
| Benchmark | 140 | 12,772.6 us | 84.05 us | 70.18 us |
| Benchmark | 150 | 13,797.5 us | 132.57 us | 124.01 us |
| Benchmark | 160 | 14,653.0 us | 43.69 us | 36.48 us |
| Benchmark | 170 | 15,651.3 us | 134.63 us | 112.42 us |
| Benchmark | 180 | 16,556.3 us | 326.70 us | 388.91 us |
| Benchmark | 190 | 17,525.4 us | 95.42 us | 84.59 us |
| Benchmark | 200 | 18,355.4 us | 94.22 us | 88.13 us |
| Benchmark | 210 | 19,308.2 us | 127.67 us | 106.61 us |
| Benchmark | 220 | 20,281.1 us | 150.30 us | 140.59 us |
| Benchmark | 230 | 21,268.8 us | 167.33 us | 156.52 us |
| Benchmark | 240 | 289,391.9 us | 5,031.52 us | 4,706.49 us |
| Benchmark | 250 | 306,041.5 us | 858.45 us | 802.99 us |
| Benchmark | 260 | 314,535.1 us | 5,264.49 us | 4,924.40 us |
| Benchmark | 270 | 25,252.9 us | 283.76 us | 265.43 us |
| Benchmark | 280 | 25,764.4 us | 129.35 us | 120.99 us |
| Benchmark | 290 | 26,383.0 us | 31.51 us | 26.31 us |
| Benchmark | 300 | 27,458.8 us | 82.65 us | 77.31 us |
| Method | ArraySize | Mean | Error | StdDev | Median |
|---------- |---------- |-------------:|------------:|------------:|-------------:|
| Benchmark | 10 | 889.8 us | 0.94 us | 0.88 us | 889.8 us |
| Benchmark | 20 | 1,758.4 us | 1.53 us | 1.43 us | 1,758.2 us |
| Benchmark | 30 | 2,689.6 us | 6.59 us | 6.16 us | 2,691.0 us |
| Benchmark | 40 | 3,593.5 us | 3.18 us | 2.98 us | 3,593.7 us |
| Benchmark | 50 | 4,497.9 us | 2.58 us | 2.29 us | 4,497.6 us |
| Benchmark | 60 | 5,436.3 us | 5.38 us | 4.49 us | 5,436.1 us |
| Benchmark | 70 | 6,360.6 us | 4.22 us | 3.95 us | 6,360.2 us |
| Benchmark | 80 | 7,215.7 us | 6.14 us | 5.74 us | 7,215.7 us |
| Benchmark | 90 | 8,153.0 us | 5.00 us | 4.68 us | 8,153.8 us |
| Benchmark | 100 | 9,088.6 us | 15.24 us | 14.25 us | 9,084.8 us |
| Benchmark | 110 | 9,990.9 us | 5.66 us | 4.73 us | 9,990.5 us |
| Benchmark | 120 | 10,903.2 us | 8.91 us | 8.33 us | 10,902.0 us |
| Benchmark | 130 | 11,863.7 us | 128.30 us | 113.73 us | 11,913.9 us |
| Benchmark | 140 | 12,690.2 us | 9.05 us | 8.46 us | 12,689.9 us |
| Benchmark | 150 | 13,474.2 us | 12.21 us | 11.42 us | 13,467.7 us |
| Benchmark | 160 | 14,567.5 us | 16.70 us | 15.62 us | 14,568.5 us |
| Benchmark | 170 | 15,261.2 us | 6.42 us | 6.00 us | 15,259.0 us |
| Benchmark | 180 | 16,372.6 us | 24.45 us | 22.87 us | 16,367.0 us |
| Benchmark | 190 | 17,227.0 us | 11.65 us | 10.33 us | 17,226.2 us |
| Benchmark | 200 | 18,245.5 us | 23.74 us | 19.83 us | 18,241.7 us |
| Benchmark | 210 | 19,518.5 us | 369.71 us | 363.11 us | 19,417.3 us |
| Benchmark | 220 | 20,172.7 us | 42.93 us | 40.15 us | 20,160.0 us |
| Benchmark | 230 | 21,056.9 us | 30.76 us | 27.27 us | 21,066.8 us |
| Benchmark | 240 | 288,741.0 us | 5,007.36 us | 4,683.88 us | 284,751.1 us |
| Benchmark | 250 | 300,620.2 us | 5,329.78 us | 4,985.48 us | 296,186.0 us |
| Benchmark | 260 | 317,979.9 us | 179.28 us | 149.71 us | 318,000.2 us |
| Benchmark | 270 | 24,529.2 us | 34.00 us | 31.80 us | 24,523.4 us |
| Benchmark | 280 | 25,804.1 us | 106.79 us | 94.67 us | 25,769.1 us |
| Benchmark | 290 | 26,573.4 us | 284.84 us | 266.44 us | 26,678.1 us |
| Benchmark | 300 | 27,240.1 us | 70.68 us | 66.12 us | 27,226.1 us |
Well, I can get the spike starting at 240 consistently:
| Method | ArraySize | Mean | Error | StdDev |
|---------- |---------- |----------:|---------:|---------:|
| Benchmark | 230 | 21.23 ms | 0.035 ms | 0.031 ms |
| Benchmark | 240 | 295.07 ms | 1.232 ms | 1.092 ms |
| Benchmark | 250 | 306.68 ms | 0.676 ms | 0.599 ms |
| Benchmark | 260 | 316.82 ms | 5.081 ms | 4.752 ms |
| Benchmark | 270 | 25.43 ms | 0.405 ms | 0.379 ms |
| Benchmark | 280 | 25.84 ms | 0.051 ms | 0.045 ms |
| Benchmark | 290 | 26.68 ms | 0.192 ms | 0.170 ms |
| Benchmark | 300 | 27.87 ms | 0.317 ms | 0.297 ms |
| Method | ArraySize | Mean | Error | StdDev |
|---------- |---------- |----------:|---------:|---------:|
| Benchmark | 230 | 21.21 ms | 0.050 ms | 0.042 ms |
| Benchmark | 240 | 294.44 ms | 0.616 ms | 0.576 ms |
| Benchmark | 250 | 305.67 ms | 1.692 ms | 1.583 ms |
| Benchmark | 260 | 320.67 ms | 0.454 ms | 0.425 ms |
| Benchmark | 270 | 24.98 ms | 0.109 ms | 0.097 ms |
| Benchmark | 280 | 25.72 ms | 0.110 ms | 0.092 ms |
| Benchmark | 290 | 26.35 ms | 0.029 ms | 0.027 ms |
| Benchmark | 300 | 27.33 ms | 0.064 ms | 0.059 ms |
But after that spike it goes back to normal.
I hope someone from Burst team can take a look at this, there is something terribly wrong going on.
HitTheWallTest.cs (9.4 KB)
I’ve included more tests and have 3 tests overall now.
-
Hitting_The_Wall_List
the initial test, unsafeList, get ptr in job - terrible performance at testcase 70+
-
Hitting_The_Wall_ListDirectPtr
unsafeList, set ptr as job parameter - NO wall, still very bad performance, starting at 70
-
Hitting_The_Wall_Array
byte array instead of unsafe container, blazing fast, no wall up to 300
Hey @tim_jones (long time), I think results of this thread will be interesting for you! You, or maybe @Lee_Hammerton (long time haven’t spoke too😄)definitely can shad some light on what happens here with mono/burst difference!
No repro for me on these, ran several times:
- i7-9750H
- Ryzen 7 3800X
Unity 6000.0.17f1
Burst 1.8.17
I’ve logged this to take a look at (probably not for a couple of weeks though) - although we don’t have this CPU within the team, so the investigation may be short lived. But perhaps someone on the team, or wider will have a Eureka moment.
maybe not related to cpu at all, because 60 to 70 hike only present on editor mode on my system.
(ryzen 5500, win10)