Move vendored ReadOnlySpan<T>, Span<T> et. al. to System namespace#8476
Move vendored ReadOnlySpan<T>, Span<T> et. al. to System namespace#8476andrewlock wants to merge 8 commits intoandrew/update-vendors-7from
ReadOnlySpan<T>, Span<T> et. al. to System namespace#8476Conversation
|
|
||
| bool sampled; | ||
|
|
||
| if (HexString.TryParseByte(header.Substring(53, 2), out var traceFlags)) |
There was a problem hiding this comment.
This line was complaining and telling us to use AsSpan(), but realized we can completely remove this branch instead 🎉
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8476) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). Duration chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8476) - mean (73ms) : 70, 76
master - mean (73ms) : 70, 77
section Bailout
This PR (8476) - mean (79ms) : 75, 83
master - mean (80ms) : 75, 84
section CallTarget+Inlining+NGEN
This PR (8476) - mean (1,081ms) : 1028, 1133
master - mean (1,081ms) : 1009, 1154
FakeDbCommand (.NET Core 3.1)gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8476) - mean (113ms) : 109, 118
master - mean (116ms) : 110, 122
section Bailout
This PR (8476) - mean (118ms) : 111, 125
master - mean (117ms) : 111, 123
section CallTarget+Inlining+NGEN
This PR (8476) - mean (775ms) : 741, 809
master - mean (798ms) : 771, 824
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8476) - mean (105ms) : 99, 110
master - mean (103ms) : 97, 109
section Bailout
This PR (8476) - mean (102ms) : 98, 106
master - mean (105ms) : 100, 110
section CallTarget+Inlining+NGEN
This PR (8476) - mean (936ms) : 898, 973
master - mean (940ms) : 907, 972
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8476) - mean (100ms) : 96, 105
master - mean (102ms) : 96, 108
section Bailout
This PR (8476) - mean (104ms) : 98, 110
master - mean (101ms) : 99, 103
section CallTarget+Inlining+NGEN
This PR (8476) - mean (822ms) : 776, 868
master - mean (827ms) : 782, 872
HttpMessageHandler (.NET Framework 4.8)gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8476) - mean (210ms) : 206, 215
master - mean (207ms) : 202, 212
section Bailout
This PR (8476) - mean (216ms) : 209, 222
master - mean (211ms) : 207, 215
section CallTarget+Inlining+NGEN
This PR (8476) - mean (1,233ms) : 1177, 1289
master - mean (1,215ms) : 1159, 1271
HttpMessageHandler (.NET Core 3.1)gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8476) - mean (305ms) : 298, 311
master - mean (299ms) : 292, 306
section Bailout
This PR (8476) - mean (304ms) : 298, 311
master - mean (298ms) : 291, 305
section CallTarget+Inlining+NGEN
This PR (8476) - mean (993ms) : 967, 1020
master - mean (998ms) : 960, 1035
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8476) - mean (300ms) : 291, 308
master - mean (296ms) : 288, 304
section Bailout
This PR (8476) - mean (299ms) : 293, 304
master - mean (294ms) : 287, 301
section CallTarget+Inlining+NGEN
This PR (8476) - mean (1,173ms) : 1134, 1211
master - mean (1,175ms) : 1140, 1210
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8476) - mean (295ms) : 288, 303
master - mean (292ms) : 286, 299
section Bailout
This PR (8476) - mean (297ms) : 290, 304
master - mean (293ms) : 288, 298
section CallTarget+Inlining+NGEN
This PR (8476) - mean (1,080ms) : 979, 1181
master - mean (1,073ms) : 992, 1154
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BenchmarksBenchmark execution time: 2026-04-17 16:12:10 Comparing candidate commit 9033a24 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 27 metrics, 0 unstable metrics, 87 known flaky benchmarks.
|
Summary of changes
Updates the System.Memory vendoring code to move types like
ReadOnlySpan<T>,Span<T>intoSysteminstead ofDatadog.Trace.VendoredMicrosoftCode.SystemReason for change
The compiler has various functionality that relies on the
Span<T>(andReadOnlySpan<T>) being available in theSystemnamespace. By making this change, we get the advantage of those types being available.A separate PR will actually update code to use those types, except where changes were required to make it compile in this PR.
Implementation details
Update the vendoring code to stop changing the namespace.
Test coverage
This is the test, if the tests pass, we should be fine.
Other details
Depends on a stack updating our vendored system code