dotnet / perf-autofiling-issues

A landing place for auto-filed performance issues before they receive triage
MIT License
9 stars 4 forks source link

[Perf] Windows/x86: 142 Improvements on 2/8/2023 12:20:29 PM #12972

Open performanceautofiler[bot] opened 1 year ago

performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in System.Text.Json.Serialization.Tests.ReadJson<HashSet<String>>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[DeserializeFromReader - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(HashSet(String)).DeserializeFromReader(Mode%3a%20Reflection).html>) 19.78 μs 17.58 μs 0.89 0.06 False
[DeserializeFromUtf8Bytes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(HashSet(String)).DeserializeFromUtf8Bytes(Mode%3a%20Reflection).html>) 14.72 μs 13.66 μs 0.93 0.02 False
[DeserializeFromString - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(HashSet(String)).DeserializeFromString(Mode%3a%20SourceGen).html>) 15.18 μs 13.89 μs 0.92 0.03 False
[DeserializeFromStream - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(HashSet(String)).DeserializeFromStream(Mode%3a%20Reflection).html>) 16.52 μs 15.28 μs 0.93 0.05 False
[DeserializeFromString - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(HashSet(String)).DeserializeFromString(Mode%3a%20Reflection).html>) 15.02 μs 13.88 μs 0.92 0.02 False
[DeserializeFromStream - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(HashSet(String)).DeserializeFromStream(Mode%3a%20SourceGen).html>) 16.80 μs 15.28 μs 0.91 0.04 False
[DeserializeFromUtf8Bytes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(HashSet(String)).DeserializeFromUtf8Bytes(Mode%3a%20SourceGen).html>) 14.61 μs 13.57 μs 0.93 0.02 False
[DeserializeFromReader - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(HashSet(String)).DeserializeFromReader(Mode%3a%20SourceGen).html>) 19.93 μs 17.53 μs 0.88 0.04 False

graph_1.png>) graph_2.png>) graph_3.png>) graph_4.png>) graph_5.png>) graph_6.png>) graph_7.png>) graph_8.png>) Test Report.html>)

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Serialization.Tests.ReadJson&lt;HashSet&lt;String&gt;&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Text.Json.Serialization.Tests.ReadJson<HashSet<String>>.DeserializeFromReader(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 17.582680270167423 < 18.761982116670744. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/18/2023 9:06:44 AM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 61.381084407415365 (T) = (0 -17631.633846676556) / Math.Sqrt((522975.48855270137 / (299)) + (6881.928598290716 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.13483062384973388 = (20379.401227921204 - 17631.633846676556) / 20379.401227921204 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<HashSet<String>>.DeserializeFromUtf8Bytes(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 13.658679648970118 < 13.780219197593938. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 41.30798137529227 (T) = (0 -13528.365088274035) / Math.Sqrt((287030.7062739541 / (299)) + (9664.748309018652 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.09978801714511784 = (15027.977127532708 - 13528.365088274035) / 15027.977127532708 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<HashSet<String>>.DeserializeFromString(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 13.89138324499411 < 14.26642203256037. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 38.56336607795656 (T) = (0 -13928.477817398498) / Math.Sqrt((256839.96553699716 / (299)) + (10348.82336276949 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.08890865609838963 = (15287.685379329701 - 13928.477817398498) / 15287.685379329701 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<HashSet<String>>.DeserializeFromStream(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 15.280967584097864 < 15.663631082328276. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 37.41601058710801 (T) = (0 -15386.341120863084) / Math.Sqrt((568507.1631583961 / (299)) + (10477.918554101081 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.10422781789677033 = (17176.62306138677 - 15386.341120863084) / 17176.62306138677 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<HashSet<String>>.DeserializeFromString(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 13.879072556834956 < 14.248969093225446. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 31.02521609468931 (T) = (0 -13953.194453064609) / Math.Sqrt((266003.045774317 / (299)) + (31298.53026928918 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.09144255200931464 = (15357.525805245128 - 13953.194453064609) / 15357.525805245128 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<HashSet<String>>.DeserializeFromStream(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 15.2799533004406 < 15.837850727207838. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 38.84374441706482 (T) = (0 -15329.244266688722) / Math.Sqrt((496898.7302770123 / (299)) + (13828.383819766335 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.10566549657973955 = (17140.39233425985 - 15329.244266688722) / 17140.39233425985 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<HashSet<String>>.DeserializeFromUtf8Bytes(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 13.568104556436625 < 13.874197381356387. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 41.62159857362661 (T) = (0 -13535.139705321963) / Math.Sqrt((271072.2383777547 / (299)) + (9883.343490103785 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.09885619735974746 = (15019.955378559434 - 13535.139705321963) / 15019.955378559434 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<HashSet<String>>.DeserializeFromReader(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 17.525582712041047 < 18.88305456545739. IsChangePoint: Marked as a change because one of 12/21/2022 3:18:57 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 61.94909027978842 (T) = (0 -17618.077604603503) / Math.Sqrt((462599.29101113504 / (299)) + (12464.135032966758 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.13614033651416876 = (20394.60614877114 - 17618.077604603503) / 20394.60614877114 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)
performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in System.Text.Json.Serialization.Tests.ReadJson<Dictionary<String, String>>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[DeserializeFromUtf8Bytes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(Dictionary(String%2c%20String)).DeserializeFromUtf8Bytes(Mode%3a%20SourceGen).html>) 25.32 μs 21.23 μs 0.84 0.04 False
[DeserializeFromReader - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(Dictionary(String%2c%20String)).DeserializeFromReader(Mode%3a%20Reflection).html>) 35.87 μs 27.75 μs 0.77 0.14 False
[DeserializeFromStream - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(Dictionary(String%2c%20String)).DeserializeFromStream(Mode%3a%20Reflection).html>) 26.97 μs 23.03 μs 0.85 0.11 False
[DeserializeFromString - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(Dictionary(String%2c%20String)).DeserializeFromString(Mode%3a%20SourceGen).html>) 25.20 μs 22.09 μs 0.88 0.05 False
[DeserializeFromReader - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(Dictionary(String%2c%20String)).DeserializeFromReader(Mode%3a%20SourceGen).html>) 35.11 μs 27.69 μs 0.79 0.07 False
[DeserializeFromString - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(Dictionary(String%2c%20String)).DeserializeFromString(Mode%3a%20Reflection).html>) 25.23 μs 21.94 μs 0.87 0.03 False
[DeserializeFromStream - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(Dictionary(String%2c%20String)).DeserializeFromStream(Mode%3a%20SourceGen).html>) 26.43 μs 23.30 μs 0.88 0.09 False
[DeserializeFromUtf8Bytes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(Dictionary(String%2c%20String)).DeserializeFromUtf8Bytes(Mode%3a%20Reflection).html>) 25.02 μs 21.23 μs 0.85 0.02 False

graph_1.png>) graph_2.png>) graph_3.png>) graph_4.png>) graph_5.png>) graph_6.png>) graph_7.png>) graph_8.png>) Test Report.html>)

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Serialization.Tests.ReadJson&lt;Dictionary&lt;String, String&gt;&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Text.Json.Serialization.Tests.ReadJson<Dictionary<String, String>>.DeserializeFromUtf8Bytes(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 21.229540366350065 < 23.94040100284477. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 50.8369275214383 (T) = (0 -21469.69961005547) / Math.Sqrt((1593015.4312860745 / (299)) + (41411.219962194875 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.16397701219638092 = (25680.752710472934 - 21469.69961005547) / 25680.752710472934 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<Dictionary<String, String>>.DeserializeFromReader(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 27.74699656665174 < 33.96484925972845. IsChangePoint: Marked as a change because one of 12/20/2022 11:23:14 PM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 91.62309156429635 (T) = (0 -27583.689492628866) / Math.Sqrt((2593686.7412880915 / (299)) + (35857.17482258245 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.24936583628393358 = (36747.18101834574 - 27583.689492628866) / 36747.18101834574 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<Dictionary<String, String>>.DeserializeFromStream(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 23.02917341182242 < 25.55641558632493. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 53.20993173335897 (T) = (0 -23188.703359313582) / Math.Sqrt((2525725.982752245 / (299)) + (29254.218536739372 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.1830173412207035 = (28383.34830014781 - 23188.703359313582) / 28383.34830014781 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<Dictionary<String, String>>.DeserializeFromString(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 22.093169809124767 < 23.77103702633831. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 51.769184117384206 (T) = (0 -21936.8551589757) / Math.Sqrt((1933407.0208859923 / (299)) + (26988.77962110147 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.16937229567760442 = (26409.97289738995 - 21936.8551589757) / 26409.97289738995 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<Dictionary<String, String>>.DeserializeFromReader(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 27.690953119232187 < 33.294448656651966. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 90.90275917751838 (T) = (0 -27531.691285649773) / Math.Sqrt((2424676.1659843135 / (299)) + (59769.76917109026 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.25119693265481224 = (36767.59950150958 - 27531.691285649773) / 36767.59950150958 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<Dictionary<String, String>>.DeserializeFromString(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 21.942005244755244 < 24.305665456786397. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 48.20144049388232 (T) = (0 -22091.073289230924) / Math.Sqrt((1816611.7559644384 / (299)) + (44049.264809282235 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.1607588442364317 = (26322.676310043164 - 22091.073289230924) / 26322.676310043164 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<Dictionary<String, String>>.DeserializeFromStream(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 23.304362995267706 < 25.29969017363385. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 51.96316114059409 (T) = (0 -23222.98135088725) / Math.Sqrt((2731419.162386355 / (299)) + (25954.789439513905 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.1835629631029757 = (28444.30164406704 - 23222.98135088725) / 28444.30164406704 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<Dictionary<String, String>>.DeserializeFromUtf8Bytes(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 21.23033118206522 < 23.684245963460516. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 44.63633785912767 (T) = (0 -21507.110165157937) / Math.Sqrt((1665652.4895439853 / (299)) + (77016.05519644145 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.16000127312809387 = (25603.74138333381 - 21507.110165157937) / 25603.74138333381 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in System.Text.Json.Serialization.Tests.ReadJson<MyEventsListerViewModel>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[DeserializeFromUtf8Bytes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(MyEventsListerViewModel).DeserializeFromUtf8Bytes(Mode%3a%20SourceGen).html>) 415.74 μs 359.34 μs 0.86 0.05 False
[DeserializeFromString - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(MyEventsListerViewModel).DeserializeFromString(Mode%3a%20Reflection).html>) 429.21 μs 363.51 μs 0.85 0.03 False
[DeserializeFromReader - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(MyEventsListerViewModel).DeserializeFromReader(Mode%3a%20SourceGen).html>) 620.94 μs 473.01 μs 0.76 0.12 False
[DeserializeFromStream - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(MyEventsListerViewModel).DeserializeFromStream(Mode%3a%20Reflection).html>) 472.80 μs 410.02 μs 0.87 0.05 False
[DeserializeFromUtf8Bytes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(MyEventsListerViewModel).DeserializeFromUtf8Bytes(Mode%3a%20Reflection).html>) 423.18 μs 367.94 μs 0.87 0.06 False
[DeserializeFromStream - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(MyEventsListerViewModel).DeserializeFromStream(Mode%3a%20SourceGen).html>) 482.54 μs 404.75 μs 0.84 0.04 False
[DeserializeFromReader - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(MyEventsListerViewModel).DeserializeFromReader(Mode%3a%20Reflection).html>) 598.36 μs 481.60 μs 0.80 0.12 False
[DeserializeFromString - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(MyEventsListerViewModel).DeserializeFromString(Mode%3a%20SourceGen).html>) 424.97 μs 359.45 μs 0.85 0.05 False

graph graph graph graph graph graph graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Serialization.Tests.ReadJson&lt;MyEventsListerViewModel&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Text.Json.Serialization.Tests.ReadJson<MyEventsListerViewModel>.DeserializeFromUtf8Bytes(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 359.3448265895954 < 406.5720852970054. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 94.0632636172289 (T) = (0 -354435.4189540071) / Math.Sqrt((71285542.08822009 / (299)) + (11338529.9732457 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.17718146782821817 = (430757.7006299255 - 354435.4189540071) / 430757.7006299255 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<MyEventsListerViewModel>.DeserializeFromString(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 363.50613372093017 < 410.5909453893618. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 92.86773404537873 (T) = (0 -362491.67120741744) / Math.Sqrt((64346591.52567029 / (299)) + (11901380.451459574 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.1718426261448585 = (437708.68032000796 - 362491.67120741744) / 437708.68032000796 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<MyEventsListerViewModel>.DeserializeFromReader(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 473.00903591682413 < 582.2616611419153. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 117.01519300960089 (T) = (0 -474421.02868718543) / Math.Sqrt((234486052.82483065 / (299)) + (14407476.963879108 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.2206654517879173 = (608751.4402839995 - 474421.02868718543) / 608751.4402839995 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<MyEventsListerViewModel>.DeserializeFromStream(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 410.023448275862 < 454.89478941179055. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 86.26970078283877 (T) = (0 -405317.3737180367) / Math.Sqrt((85423693.28741765 / (299)) + (14467357.537506862 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.16171972142168928 = (483510.5680947648 - 405317.3737180367) / 483510.5680947648 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<MyEventsListerViewModel>.DeserializeFromUtf8Bytes(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 367.94250355618766 < 407.35475204265333. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 75.17765198581999 (T) = (0 -353431.366914093) / Math.Sqrt((86746566.91476072 / (299)) + (19109165.63663011 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.17524493057172874 = (428528.8808944155 - 353431.366914093) / 428528.8808944155 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<MyEventsListerViewModel>.DeserializeFromStream(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 404.747887628309 < 456.67121151658336. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 78.1659973641982 (T) = (0 -406552.72131186054) / Math.Sqrt((101372320.22502787 / (299)) + (17743807.991054438 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.16100430096521573 = (484570.6858564064 - 406552.72131186054) / 484570.6858564064 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<MyEventsListerViewModel>.DeserializeFromReader(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 481.6011325611325 < 589.2301409181141. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 117.45150500054478 (T) = (0 -475661.9756750688) / Math.Sqrt((220521700.47934726 / (299)) + (13816432.191854669 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.21629150705629588 = (606937.3752585285 - 475661.9756750688) / 606937.3752585285 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<MyEventsListerViewModel>.DeserializeFromString(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 359.45438054009486 < 408.8121055840455. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 63.521368548537424 (T) = (0 -364252.2515215243) / Math.Sqrt((96256019.1160574 / (299)) + (28578478.26965824 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.1700479147318237 = (438883.4704883308 - 364252.2515215243) / 438883.4704883308 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in MicroBenchmarks.Serializers.Json_FromString<MyEventsListerViewModel>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[SystemTextJsonReflection - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/MicroBenchmarks.Serializers.Json_FromString(MyEventsListerViewModel).SystemTextJsonReflection.html>) 422.29 μs 360.94 μs 0.85 0.05 False
[SystemTextJsonSourceGen - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/MicroBenchmarks.Serializers.Json_FromString(MyEventsListerViewModel).SystemTextJsonSourceGen.html>) 421.63 μs 366.59 μs 0.87 0.04 False

graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'MicroBenchmarks.Serializers.Json_FromString&lt;MyEventsListerViewModel&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### MicroBenchmarks.Serializers.Json_FromString<MyEventsListerViewModel>.SystemTextJson_Reflection_ ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 360.94363823227127 < 409.9767014868933. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 81.08434771358307 (T) = (0 -361048.33552413085) / Math.Sqrt((88972746.72605188 / (299)) + (15573590.707687123 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.1735535065254115 = (436868.37366348185 - 361048.33552413085) / 436868.37366348185 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### MicroBenchmarks.Serializers.Json_FromString<MyEventsListerViewModel>.SystemTextJson_SourceGen_ ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 366.5927215849843 < 411.61519986760936. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 102.94531842792335 (T) = (0 -362956.9880288892) / Math.Sqrt((101604208.03989851 / (299)) + (5775788.714102564 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.17427546331372018 = (439561.82952425524 - 362956.9880288892) / 439561.82952425524 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)
performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in System.Text.Json.Serialization.Tests.ReadJson<ArrayList>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[DeserializeFromStream - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(ArrayList).DeserializeFromStream(Mode%3a%20SourceGen).html>) 31.01 μs 27.08 μs 0.87 0.04 False
[DeserializeFromString - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(ArrayList).DeserializeFromString(Mode%3a%20SourceGen).html>) 30.12 μs 26.71 μs 0.89 0.01 False
[DeserializeFromUtf8Bytes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(ArrayList).DeserializeFromUtf8Bytes(Mode%3a%20Reflection).html>) 29.73 μs 26.46 μs 0.89 0.02 False
[DeserializeFromUtf8Bytes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(ArrayList).DeserializeFromUtf8Bytes(Mode%3a%20SourceGen).html>) 29.90 μs 27.02 μs 0.90 0.02 False
[DeserializeFromString - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(ArrayList).DeserializeFromString(Mode%3a%20Reflection).html>) 30.32 μs 26.24 μs 0.87 0.02 False
[DeserializeFromReader - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(ArrayList).DeserializeFromReader(Mode%3a%20SourceGen).html>) 35.01 μs 30.04 μs 0.86 0.08 False
[DeserializeFromReader - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(ArrayList).DeserializeFromReader(Mode%3a%20Reflection).html>) 35.58 μs 29.94 μs 0.84 0.04 False
[DeserializeFromStream - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(ArrayList).DeserializeFromStream(Mode%3a%20Reflection).html>) 31.66 μs 26.82 μs 0.85 0.03 False

graph graph graph graph graph graph graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Serialization.Tests.ReadJson&lt;ArrayList&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Text.Json.Serialization.Tests.ReadJson<ArrayList>.DeserializeFromStream(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 27.079915335489215 < 29.659495414996847. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 57.14900739427885 (T) = (0 -27291.718967635734) / Math.Sqrt((284730.1194613124 / (299)) + (101221.01166173599 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.1255501204054953 = (31210.15807137089 - 27291.718967635734) / 31210.15807137089 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<ArrayList>.DeserializeFromString(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 26.70556493252145 < 28.75409468533364. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 88.27581083506765 (T) = (0 -26784.79531265968) / Math.Sqrt((150754.94169620215 / (299)) + (35839.25897193964 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.12361244252265577 = (30562.728879628237 - 26784.79531265968) / 30562.728879628237 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<ArrayList>.DeserializeFromUtf8Bytes(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 26.462880167451605 < 28.35665226721535. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 45.48037938589981 (T) = (0 -26498.232473091197) / Math.Sqrt((179285.42300250236 / (299)) + (160502.7559655876 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.12191836538893736 = (30177.41338460896 - 26498.232473091197) / 30177.41338460896 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<ArrayList>.DeserializeFromUtf8Bytes(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 27.02492866955511 < 28.38731440965853. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 44.91104181408994 (T) = (0 -26442.860955351473) / Math.Sqrt((105816.12946031019 / (299)) + (168945.99646425928 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.12134008894102512 = (30094.5344410696 - 26442.860955351473) / 30094.5344410696 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<ArrayList>.DeserializeFromString(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 26.242721417069244 < 28.871507882796216. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 54.14233092247082 (T) = (0 -26838.8986947286) / Math.Sqrt((134553.6994747128 / (299)) + (118246.11863601081 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.12295473859066701 = (30601.497865230922 - 26838.8986947286) / 30601.497865230922 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<ArrayList>.DeserializeFromReader(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 30.042977013312004 < 33.02221016712698. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 52.81549744772835 (T) = (0 -30404.974304173764) / Math.Sqrt((543939.2904427992 / (299)) + (171903.6701343826 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.13581811465481886 = (35183.5358039576 - 30404.974304173764) / 35183.5358039576 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<ArrayList>.DeserializeFromReader(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 29.94473614933589 < 33.18971161334995. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 62.188202874242414 (T) = (0 -30254.2514138023) / Math.Sqrt((342340.91203398583 / (299)) + (136224.91955994227 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.13921136145632818 = (35147.13143169275 - 30254.2514138023) / 35147.13143169275 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<ArrayList>.DeserializeFromStream(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 26.815417025243836 < 29.661237636869867. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 48.53054702765766 (T) = (0 -27309.56284770811) / Math.Sqrt((242234.04353813286 / (299)) + (153889.75367098043 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.12539876864923202 = (31225.159385529525 - 27309.56284770811) / 31225.159385529525 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)
performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in System.Text.Json.Serialization.Tests.ReadJson<ImmutableDictionary<String, String>>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[DeserializeFromReader - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(ImmutableDictionary(String%2c%20String)).DeserializeFromReader(Mode%3a%20SourceGen).html>) 68.15 μs 56.29 μs 0.83 0.04 False
[DeserializeFromString - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(ImmutableDictionary(String%2c%20String)).DeserializeFromString(Mode%3a%20SourceGen).html>) 58.36 μs 51.24 μs 0.88 0.02 False
[DeserializeFromUtf8Bytes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(ImmutableDictionary(String%2c%20String)).DeserializeFromUtf8Bytes(Mode%3a%20SourceGen).html>) 57.04 μs 49.87 μs 0.87 0.01 False
[DeserializeFromStream - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(ImmutableDictionary(String%2c%20String)).DeserializeFromStream(Mode%3a%20SourceGen).html>) 59.89 μs 51.95 μs 0.87 0.03 False
[DeserializeFromReader - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(ImmutableDictionary(String%2c%20String)).DeserializeFromReader(Mode%3a%20Reflection).html>) 67.73 μs 56.16 μs 0.83 0.03 False
[DeserializeFromString - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(ImmutableDictionary(String%2c%20String)).DeserializeFromString(Mode%3a%20Reflection).html>) 57.21 μs 51.83 μs 0.91 0.01 False
[DeserializeFromUtf8Bytes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(ImmutableDictionary(String%2c%20String)).DeserializeFromUtf8Bytes(Mode%3a%20Reflection).html>) 56.32 μs 50.32 μs 0.89 0.01 False
[DeserializeFromStream - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(ImmutableDictionary(String%2c%20String)).DeserializeFromStream(Mode%3a%20Reflection).html>) 59.39 μs 52.76 μs 0.89 0.04 False

graph_1.png>) graph_2.png>) graph_3.png>) graph_4.png>) graph_5.png>) graph_6.png>) graph_7.png>) Test Report.html>)

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Serialization.Tests.ReadJson&lt;ImmutableDictionary&lt;String, String&gt;&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Text.Json.Serialization.Tests.ReadJson<ImmutableDictionary<String, String>>.DeserializeFromReader(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 56.28871910112358 < 64.51987802188539. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 68.47743372220452 (T) = (0 -56628.053929278954) / Math.Sqrt((2443409.570977596 / (299)) + (710040.1445906255 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.1833464759699306 = (69341.59011501908 - 56628.053929278954) / 69341.59011501908 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<ImmutableDictionary<String, String>>.DeserializeFromString(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 51.23992263843648 < 55.11858173308847. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 47.343117145648186 (T) = (0 -51044.461026273755) / Math.Sqrt((1978445.1412214104 / (299)) + (545956.6291026773 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.13190108869606568 = (58800.282273827586 - 51044.461026273755) / 58800.282273827586 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<ImmutableDictionary<String, String>>.DeserializeFromUtf8Bytes(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 49.87110948946887 < 53.91567978758427. IsChangePoint: Marked as a change because one of 12/20/2022 11:23:14 PM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 46.088200209297234 (T) = (0 -50529.119416032154) / Math.Sqrt((1950892.3343858514 / (299)) + (524311.7724475045 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.12809520122120785 = (57952.5648749775 - 50529.119416032154) / 57952.5648749775 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<ImmutableDictionary<String, String>>.DeserializeFromStream(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 51.95064837905236 < 56.398330328911825. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 55.092748850098275 (T) = (0 -52455.735806143806) / Math.Sqrt((2173018.1707500913 / (299)) + (443722.1099846047 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.13918755319029336 = (60937.473662877695 - 52455.735806143806) / 60937.473662877695 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<ImmutableDictionary<String, String>>.DeserializeFromReader(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 56.16334967684422 < 64.76614696272713. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 66.3523483036945 (T) = (0 -56532.99100424772) / Math.Sqrt((2814889.998087902 / (299)) + (774381.717031472 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.18638401509946917 = (69483.62870618772 - 56532.99100424772) / 69483.62870618772 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<ImmutableDictionary<String, String>>.DeserializeFromString(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 51.8324368730543 < 54.33564604353158. IsChangePoint: Marked as a change because one of 12/20/2022 7:58:25 PM, 1/17/2023 8:36:05 PM, 2/8/2023 12:20:29 PM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 47.09240990698387 (T) = (0 -50907.98221573156) / Math.Sqrt((2307173.120133655 / (299)) + (481536.8846596629 / (26))) is greater than 1.967335607330539 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (26) - 2, .975) and 0.13031219628325552 = (58535.92748819573 - 50907.98221573156) / 58535.92748819573 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<ImmutableDictionary<String, String>>.DeserializeFromUtf8Bytes(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 50.319528188724505 < 53.48278802564127. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 45.388080088299425 (T) = (0 -50229.28819878256) / Math.Sqrt((2362150.088201175 / (299)) + (545546.7065104188 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.1315592585417387 = (57838.47509783909 - 50229.28819878256) / 57838.47509783909 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<ImmutableDictionary<String, String>>.DeserializeFromStream(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 52.75659616996584 < 56.14485223120759. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 49.59781100747111 (T) = (0 -52345.37224706164) / Math.Sqrt((2478767.713083794 / (299)) + (574648.601997705 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.14011254069433376 = (60874.67805301985 - 52345.37224706164) / 60874.67805301985 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)
performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in System.Text.Json.Tests.Perf_Depth

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[ReadSpanEmptyLoop - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Tests.Perf_Depth.ReadSpanEmptyLoop(Depth%3a%2065).html>) 3.55 μs 3.18 μs 0.90 0.00 False 40344.224037339554 35721.14724852477 0.8854092029496958) Trace Trace
[ReadSpanEmptyLoop - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Tests.Perf_Depth.ReadSpanEmptyLoop(Depth%3a%20512).html>) 31.48 μs 26.98 μs 0.86 0.00 False 335056.0081466395 297157.11805555556 0.8868878958454693) Trace Trace
[ReadSpanEmptyLoop - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Tests.Perf_Depth.ReadSpanEmptyLoop(Depth%3a%2064).html>) 3.48 μs 3.12 μs 0.90 0.00 False 39491.856188546124 35256.66936135812 0.8927579699731526) Trace Trace

graph graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Tests.Perf_Depth*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Text.Json.Tests.Perf_Depth.ReadSpanEmptyLoop(Depth: 65) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 3.180300478322817 < 3.3767688989201727. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 80.47749445871031 (T) = (0 -3192.266966701238) / Math.Sqrt((518.6548571251509 / (299)) + (498.7204912645862 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.10178697264277722 = (3554.019892245073 - 3192.266966701238) / 3554.019892245073 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Text.Json.Tests.Perf_Depth.ReadSpanEmptyLoop() push ebp mov ebp,esp push esi sub esp,0B8 vzeroupper vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-0BC],xmm4 vmovdqu xmmword ptr [ebp-0AC],xmm4 mov eax,0FFFFFF70 M00_L00: vmovdqu xmmword ptr [ebp+eax-0C],xmm4 vmovdqu xmmword ptr [ebp+eax+4],xmm4 vmovdqu xmmword ptr [ebp+eax+14],xmm4 add eax,30 jne short M00_L00 mov [ebp-0C],eax mov [ebp-8],eax mov edx,[ecx+4] test edx,edx je near ptr M00_L06 lea eax,[edx+8] mov esi,[edx+4] M00_L01: mov ecx,[ecx+8] test ecx,ecx jl near ptr M00_L09 mov [ebp-0A4],ecx vxorps xmm0,xmm0,xmm0 vmovdqu xmmword ptr [ebp-9C],xmm0 push esi push eax push dword ptr [ebp-90] push dword ptr [ebp-94] push dword ptr [ebp-98] push dword ptr [ebp-9C] push dword ptr [ebp-0A0] push dword ptr [ebp-0A4] push dword ptr [ebp-0A8] push dword ptr [ebp-0AC] push dword ptr [ebp-0B0] push dword ptr [ebp-0B4] push dword ptr [ebp-0B8] push dword ptr [ebp-0BC] lea ecx,[ebp-8C] mov edx,1 call dword ptr ds:[0B3216D8]; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1, Boolean, System.Text.Json.JsonReaderState) M00_L02: cmp byte ptr [ebp-61],0 jne short M00_L07 lea ecx,[ebp-8C] call dword ptr ds:[0B3218E8]; System.Text.Json.Utf8JsonReader.ReadSingleSegment() M00_L03: movzx ecx,al test ecx,ecx jne short M00_L04 cmp byte ptr [ebp-68],0 je short M00_L05 cmp byte ptr [ebp-64],0 je short M00_L08 M00_L04: test ecx,ecx jne short M00_L02 M00_L05: lea esp,[ebp-4] pop esi pop ebp ret M00_L06: xor eax,eax xor esi,esi jmp near ptr M00_L01 M00_L07: lea ecx,[ebp-8C] call dword ptr ds:[0B3231B0] jmp short M00_L03 M00_L08: xor ecx,ecx push 0 push 0 push ecx lea ecx,[ebp-8C] mov edx,20 call dword ptr ds:[0B1D3378] int 3 M00_L09: mov ecx,2C7A mov edx,0B1C5768 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B1D3030] int 3 ; Total bytes of code 323 ``` ```assembly ; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1, Boolean, System.Text.Json.JsonReaderState) push ebp mov ebp,esp push edi push esi sub esp,10 vzeroupper xor eax,eax mov [ebp-18],eax mov [ebp-14],eax mov eax,ecx lea edi,[eax+30] lea esi,[ebp+38] call CORINFO_HELP_ASSIGN_BYREF movsd mov [eax+24],dl mov byte ptr [eax+25],0 mov ecx,eax mov edx,[ebp+8] mov [ecx],edx mov edx,[ebp+0C] mov [ecx+4],edx lea ecx,[eax+8] mov edx,[ebp+10] mov [ecx],edx mov edx,[ebp+14] mov [ecx+4],edx movzx ecx,byte ptr [ebp+18] mov [eax+26],cl movzx ecx,byte ptr [ebp+19] mov [eax+27],cl movzx ecx,byte ptr [ebp+1A] mov [eax+2E],cl movzx ecx,byte ptr [ebp+1B] mov [eax+2C],cl movzx ecx,byte ptr [ebp+1C] mov [eax+28],cl movzx ecx,byte ptr [ebp+1D] mov [eax+29],cl mov ecx,[ebp+20] mov [eax+38],ecx mov ecx,[ebp+24] mov [eax+3C],ecx cmp dword ptr [eax+38],0 jne short M01_L00 mov dword ptr [eax+38],40 M01_L00: lea edi,[eax+40] lea esi,[ebp+28] movsd movsd call CORINFO_HELP_ASSIGN_BYREF movsd xor ecx,ecx mov [eax+20],ecx lea ecx,[eax+18] xor edx,edx mov [ecx],edx mov [ecx+4],edx lea ecx,[eax+10] mov [ecx],edx mov [ecx+4],edx movzx ecx,byte ptr [eax+24] mov [eax+2A],cl mov byte ptr [eax+2B],0 mov [eax+70],edx mov [eax+74],edx mov [eax+58],edx mov [eax+5C],edx mov [eax+50],edx mov [eax+54],edx vxorps xmm0,xmm0,xmm0 vmovq qword ptr [eax+60],xmm0 vmovq qword ptr [eax+68],xmm0 mov byte ptr [eax+2D],0 mov esi,ds:[6DA1F80] add esi,4 lea edi,[ebp-18] mov ecx,4 rep movsd lea edi,[eax+78] lea esi,[ebp-18] call CORINFO_HELP_ASSIGN_BYREF call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea esp,[ebp-8] pop esi pop edi pop ebp ret 38 ; Total bytes of code 264 ``` ```assembly ; System.Text.Json.Utf8JsonReader.ReadSingleSegment() push ebp mov ebp,esp push edi push esi push ebx sub esp,0C mov esi,ecx xor ebx,ebx xor ecx,ecx mov [esi+70],ecx mov [esi+74],ecx mov byte ptr [esi+2E],0 mov ecx,[esi+20] mov eax,ecx sar eax,1F cmp ecx,[esi+34] sbb eax,0 jl short M02_L02 cmp byte ptr [esi+27],0 je near ptr M02_L15 cmp byte ptr [esi+24],0 je near ptr M02_L15 cmp byte ptr [esi+2B],0 je short M02_L00 movzx ecx,byte ptr [esi+2A] test ecx,ecx je near ptr M02_L15 M02_L00: cmp dword ptr [esi+4C],0 jne near ptr M02_L17 cmp byte ptr [esi+3C],2 jne short M02_L01 movzx ecx,byte ptr [esi+28] cmp ecx,6 je near ptr M02_L15 M02_L01: movzx ecx,byte ptr [esi+28] cmp ecx,4 je near ptr M02_L15 cmp ecx,2 jne near ptr M02_L18 jmp near ptr M02_L15 M02_L02: mov ecx,[esi+20] lea eax,[esi+30] cmp ecx,[eax+4] jae near ptr M02_L22 mov eax,[eax] movzx edx,byte ptr [eax+ecx] cmp edx,20 jg near ptr M02_L06 mov ecx,esi call dword ptr ds:[0B321948] mov ecx,[esi+20] mov edx,ecx mov eax,edx sar eax,1F cmp edx,[esi+34] sbb eax,0 jl short M02_L05 cmp byte ptr [esi+27],0 je near ptr M02_L15 cmp byte ptr [esi+24],0 je near ptr M02_L15 cmp byte ptr [esi+2B],0 je short M02_L03 movzx ecx,byte ptr [esi+2A] test ecx,ecx je near ptr M02_L15 M02_L03: cmp dword ptr [esi+4C],0 jne near ptr M02_L19 cmp byte ptr [esi+3C],2 jne short M02_L04 movzx ecx,byte ptr [esi+28] cmp ecx,6 je near ptr M02_L15 M02_L04: movzx ecx,byte ptr [esi+28] cmp ecx,4 je near ptr M02_L15 cmp ecx,2 jne near ptr M02_L20 jmp near ptr M02_L15 M02_L05: lea edx,[esi+30] cmp ecx,[edx+4] jae near ptr M02_L22 mov edx,[edx] movzx edx,byte ptr [edx+ecx] M02_L06: mov ecx,[esi+20] mov eax,ecx sar eax,1F lea ebx,[esi+18] mov [ebx],ecx mov [ebx+4],eax movzx ebx,byte ptr [esi+28] test ebx,ebx je near ptr M02_L16 cmp edx,2F jne short M02_L08 M02_L07: mov ecx,esi call dword ptr ds:[0B321AC8]; System.Text.Json.Utf8JsonReader.ConsumeNextTokenOrRollback(Byte) mov ebx,eax jmp near ptr M02_L15 M02_L08: cmp ebx,1 jne short M02_L11 cmp edx,7D jne short M02_L09 mov ecx,esi call dword ptr ds:[0B321888]; System.Text.Json.Utf8JsonReader.EndObject() jmp near ptr M02_L14 M02_L09: cmp edx,22 jne near ptr M02_L21 mov ebx,[esi+20] lea ecx,[esi+8] mov edi,[ecx] mov eax,[ecx+4] mov [ebp-10],eax mov ecx,esi mov edx,[ecx] mov ecx,[ecx+4] mov [ebp-14],edx mov [ebp-18],ecx mov ecx,esi call dword ptr ds:[0B3219D8]; System.Text.Json.Utf8JsonReader.ConsumePropertyName() test eax,eax jne short M02_L10 mov [esi+20],ebx mov byte ptr [esi+28],1 lea ecx,[esi+8] mov [ecx],edi mov edi,[ebp-10] mov [ecx+4],edi mov edi,[ebp-14] mov [esi],edi mov edi,[ebp-18] mov [esi+4],edi mov ebx,eax jmp short M02_L15 M02_L10: mov ebx,eax jmp short M02_L15 M02_L11: cmp ebx,3 jne short M02_L13 cmp edx,5D jne short M02_L12 mov ecx,esi call dword ptr ds:[0B3218B8] jmp short M02_L14 M02_L12: mov ecx,esi call dword ptr ds:[0B321960]; System.Text.Json.Utf8JsonReader.ConsumeValue(Byte) mov ebx,eax jmp short M02_L15 M02_L13: cmp ebx,5 jne near ptr M02_L07 jmp short M02_L12 M02_L14: mov ebx,1 M02_L15: mov eax,ebx lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M02_L16: mov ecx,esi call dword ptr ds:[0B321930]; System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte) mov ebx,eax jmp short M02_L15 M02_L17: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,19 call dword ptr ds:[0B1D3378] int 3 M02_L18: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,16 call dword ptr ds:[0B1D3378] int 3 M02_L19: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,19 call dword ptr ds:[0B1D3378] int 3 M02_L20: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,16 call dword ptr ds:[0B1D3378] int 3 M02_L21: xor ecx,ecx push edx push 0 push ecx mov ecx,esi mov edx,0C call dword ptr ds:[0B1D3378] int 3 M02_L22: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 639 ``` ### Compare Jit Disasm ```assembly ; System.Text.Json.Tests.Perf_Depth.ReadSpanEmptyLoop() push ebp mov ebp,esp push esi sub esp,0B8 vzeroupper vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-0BC],xmm4 vmovdqu xmmword ptr [ebp-0AC],xmm4 mov eax,0FFFFFF70 M00_L00: vmovdqu xmmword ptr [ebp+eax-0C],xmm4 vmovdqu xmmword ptr [ebp+eax+4],xmm4 vmovdqu xmmword ptr [ebp+eax+14],xmm4 add eax,30 jne short M00_L00 mov [ebp-0C],eax mov [ebp-8],eax mov edx,[ecx+4] test edx,edx je near ptr M00_L06 lea eax,[edx+8] mov esi,[edx+4] M00_L01: mov ecx,[ecx+8] test ecx,ecx jl near ptr M00_L09 mov [ebp-0A4],ecx vxorps xmm0,xmm0,xmm0 vmovdqu xmmword ptr [ebp-9C],xmm0 push esi push eax push dword ptr [ebp-90] push dword ptr [ebp-94] push dword ptr [ebp-98] push dword ptr [ebp-9C] push dword ptr [ebp-0A0] push dword ptr [ebp-0A4] push dword ptr [ebp-0A8] push dword ptr [ebp-0AC] push dword ptr [ebp-0B0] push dword ptr [ebp-0B4] push dword ptr [ebp-0B8] push dword ptr [ebp-0BC] lea ecx,[ebp-8C] mov edx,1 call dword ptr ds:[0B481BB8]; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1, Boolean, System.Text.Json.JsonReaderState) M00_L02: cmp byte ptr [ebp-61],0 jne short M00_L07 lea ecx,[ebp-8C] call dword ptr ds:[0B481DC8]; System.Text.Json.Utf8JsonReader.ReadSingleSegment() M00_L03: movzx ecx,al test ecx,ecx jne short M00_L04 cmp byte ptr [ebp-68],0 je short M00_L05 cmp byte ptr [ebp-64],0 je short M00_L08 M00_L04: test ecx,ecx jne short M00_L02 M00_L05: lea esp,[ebp-4] pop esi pop ebp ret M00_L06: xor eax,eax xor esi,esi jmp near ptr M00_L01 M00_L07: lea ecx,[ebp-8C] call dword ptr ds:[0B4831B0] jmp short M00_L03 M00_L08: xor ecx,ecx push 0 push 0 push ecx lea ecx,[ebp-8C] mov edx,20 call dword ptr ds:[0B3538B8] int 3 M00_L09: mov ecx,2C4E mov edx,0B2F5FF0 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B353570] int 3 ; Total bytes of code 323 ``` ```assembly ; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1, Boolean, System.Text.Json.JsonReaderState) push ebp mov ebp,esp push edi push esi sub esp,10 vzeroupper xor eax,eax mov [ebp-18],eax mov [ebp-14],eax mov eax,ecx lea edi,[eax+30] lea esi,[ebp+38] call CORINFO_HELP_ASSIGN_BYREF movsd mov [eax+24],dl mov byte ptr [eax+25],0 mov ecx,eax mov edx,[ebp+8] mov [ecx],edx mov edx,[ebp+0C] mov [ecx+4],edx lea ecx,[eax+8] mov edx,[ebp+10] mov [ecx],edx mov edx,[ebp+14] mov [ecx+4],edx movzx ecx,byte ptr [ebp+18] mov [eax+26],cl movzx ecx,byte ptr [ebp+19] mov [eax+27],cl movzx ecx,byte ptr [ebp+1A] mov [eax+2E],cl movzx ecx,byte ptr [ebp+1B] mov [eax+2C],cl movzx ecx,byte ptr [ebp+1C] mov [eax+28],cl movzx ecx,byte ptr [ebp+1D] mov [eax+29],cl mov ecx,[ebp+20] mov [eax+38],ecx mov ecx,[ebp+24] mov [eax+3C],ecx cmp dword ptr [eax+38],0 jne short M01_L00 mov dword ptr [eax+38],40 M01_L00: lea edi,[eax+40] lea esi,[ebp+28] movsd movsd call CORINFO_HELP_ASSIGN_BYREF movsd xor ecx,ecx mov [eax+20],ecx lea ecx,[eax+18] xor edx,edx mov [ecx],edx mov [ecx+4],edx lea ecx,[eax+10] mov [ecx],edx mov [ecx+4],edx movzx ecx,byte ptr [eax+24] mov [eax+2A],cl mov byte ptr [eax+2B],0 mov [eax+70],edx mov [eax+74],edx mov [eax+58],edx mov [eax+5C],edx mov [eax+50],edx mov [eax+54],edx vxorps xmm0,xmm0,xmm0 vmovq qword ptr [eax+60],xmm0 vmovq qword ptr [eax+68],xmm0 mov byte ptr [eax+2D],0 mov esi,ds:[6FF1F84] add esi,4 lea edi,[ebp-18] mov ecx,4 rep movsd lea edi,[eax+78] lea esi,[ebp-18] call CORINFO_HELP_ASSIGN_BYREF call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea esp,[ebp-8] pop esi pop edi pop ebp ret 38 ; Total bytes of code 264 ``` ```assembly ; System.Text.Json.Utf8JsonReader.ReadSingleSegment() push ebp mov ebp,esp push edi push esi push ebx sub esp,0C mov esi,ecx xor ebx,ebx xor ecx,ecx mov [esi+70],ecx mov [esi+74],ecx mov byte ptr [esi+2E],0 mov ecx,[esi+20] mov eax,ecx sar eax,1F cmp ecx,[esi+34] sbb eax,0 jl short M02_L02 cmp byte ptr [esi+27],0 je near ptr M02_L15 cmp byte ptr [esi+24],0 je near ptr M02_L15 cmp byte ptr [esi+2B],0 je short M02_L00 movzx ecx,byte ptr [esi+2A] test ecx,ecx je near ptr M02_L15 M02_L00: cmp dword ptr [esi+4C],0 jne near ptr M02_L17 cmp byte ptr [esi+3C],2 jne short M02_L01 movzx ecx,byte ptr [esi+28] cmp ecx,6 je near ptr M02_L15 M02_L01: movzx ecx,byte ptr [esi+28] cmp ecx,4 je near ptr M02_L15 cmp ecx,2 jne near ptr M02_L18 jmp near ptr M02_L15 M02_L02: mov ecx,[esi+20] lea eax,[esi+30] cmp ecx,[eax+4] jae near ptr M02_L22 mov eax,[eax] movzx edx,byte ptr [eax+ecx] cmp edx,20 jg near ptr M02_L06 mov ecx,esi call dword ptr ds:[0B481E28] mov ecx,[esi+20] mov edx,ecx mov eax,edx sar eax,1F cmp edx,[esi+34] sbb eax,0 jl short M02_L05 cmp byte ptr [esi+27],0 je near ptr M02_L15 cmp byte ptr [esi+24],0 je near ptr M02_L15 cmp byte ptr [esi+2B],0 je short M02_L03 movzx ecx,byte ptr [esi+2A] test ecx,ecx je near ptr M02_L15 M02_L03: cmp dword ptr [esi+4C],0 jne near ptr M02_L19 cmp byte ptr [esi+3C],2 jne short M02_L04 movzx ecx,byte ptr [esi+28] cmp ecx,6 je near ptr M02_L15 M02_L04: movzx ecx,byte ptr [esi+28] cmp ecx,4 je near ptr M02_L15 cmp ecx,2 jne near ptr M02_L20 jmp near ptr M02_L15 M02_L05: lea edx,[esi+30] cmp ecx,[edx+4] jae near ptr M02_L22 mov edx,[edx] movzx edx,byte ptr [edx+ecx] M02_L06: mov ecx,[esi+20] mov eax,ecx sar eax,1F lea ebx,[esi+18] mov [ebx],ecx mov [ebx+4],eax movzx ebx,byte ptr [esi+28] test ebx,ebx je near ptr M02_L16 cmp edx,2F jne short M02_L08 M02_L07: mov ecx,esi call dword ptr ds:[0B481FA8]; System.Text.Json.Utf8JsonReader.ConsumeNextTokenOrRollback(Byte) mov ebx,eax jmp near ptr M02_L15 M02_L08: cmp ebx,1 jne short M02_L11 cmp edx,7D jne short M02_L09 mov ecx,esi call dword ptr ds:[0B481D68]; System.Text.Json.Utf8JsonReader.EndObject() jmp near ptr M02_L14 M02_L09: cmp edx,22 jne near ptr M02_L21 mov ebx,[esi+20] lea ecx,[esi+8] mov edi,[ecx] mov eax,[ecx+4] mov [ebp-10],eax mov ecx,esi mov edx,[ecx] mov ecx,[ecx+4] mov [ebp-14],edx mov [ebp-18],ecx mov ecx,esi call dword ptr ds:[0B481EB8]; System.Text.Json.Utf8JsonReader.ConsumePropertyName() test eax,eax jne short M02_L10 mov [esi+20],ebx mov byte ptr [esi+28],1 lea ecx,[esi+8] mov [ecx],edi mov edi,[ebp-10] mov [ecx+4],edi mov edi,[ebp-14] mov [esi],edi mov edi,[ebp-18] mov [esi+4],edi mov ebx,eax jmp short M02_L15 M02_L10: mov ebx,eax jmp short M02_L15 M02_L11: cmp ebx,3 jne short M02_L13 cmp edx,5D jne short M02_L12 mov ecx,esi call dword ptr ds:[0B481D98] jmp short M02_L14 M02_L12: mov ecx,esi call dword ptr ds:[0B481E40]; System.Text.Json.Utf8JsonReader.ConsumeValue(Byte) mov ebx,eax jmp short M02_L15 M02_L13: cmp ebx,5 jne near ptr M02_L07 jmp short M02_L12 M02_L14: mov ebx,1 M02_L15: mov eax,ebx lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M02_L16: mov ecx,esi call dword ptr ds:[0B481E10]; System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte) mov ebx,eax jmp short M02_L15 M02_L17: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,19 call dword ptr ds:[0B3538B8] int 3 M02_L18: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,16 call dword ptr ds:[0B3538B8] int 3 M02_L19: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,19 call dword ptr ds:[0B3538B8] int 3 M02_L20: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,16 call dword ptr ds:[0B3538B8] int 3 M02_L21: xor ecx,ecx push edx push 0 push ecx mov ecx,esi mov edx,0C call dword ptr ds:[0B3538B8] int 3 M02_L22: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 639 ``` #### System.Text.Json.Tests.Perf_Depth.ReadSpanEmptyLoop(Depth: 512) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 26.982318376068378 < 29.843105854113695. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 224.09628339779815 (T) = (0 -26762.476746901222) / Math.Sqrt((51979.95722715335 / (299)) + (7110.7872035995515 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.14899881487642283 = (31448.22500219543 - 26762.476746901222) / 31448.22500219543 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Text.Json.Tests.Perf_Depth.ReadSpanEmptyLoop() push ebp mov ebp,esp push esi sub esp,0B8 vzeroupper vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-0BC],xmm4 vmovdqu xmmword ptr [ebp-0AC],xmm4 mov eax,0FFFFFF70 M00_L00: vmovdqu xmmword ptr [ebp+eax-0C],xmm4 vmovdqu xmmword ptr [ebp+eax+4],xmm4 vmovdqu xmmword ptr [ebp+eax+14],xmm4 add eax,30 jne short M00_L00 mov [ebp-0C],eax mov [ebp-8],eax mov edx,[ecx+4] test edx,edx je near ptr M00_L06 lea eax,[edx+8] mov esi,[edx+4] M00_L01: mov ecx,[ecx+8] test ecx,ecx jl near ptr M00_L09 mov [ebp-0A4],ecx vxorps xmm0,xmm0,xmm0 vmovdqu xmmword ptr [ebp-9C],xmm0 push esi push eax push dword ptr [ebp-90] push dword ptr [ebp-94] push dword ptr [ebp-98] push dword ptr [ebp-9C] push dword ptr [ebp-0A0] push dword ptr [ebp-0A4] push dword ptr [ebp-0A8] push dword ptr [ebp-0AC] push dword ptr [ebp-0B0] push dword ptr [ebp-0B4] push dword ptr [ebp-0B8] push dword ptr [ebp-0BC] lea ecx,[ebp-8C] mov edx,1 call dword ptr ds:[0B9416D8]; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1, Boolean, System.Text.Json.JsonReaderState) M00_L02: cmp byte ptr [ebp-61],0 jne short M00_L07 lea ecx,[ebp-8C] call dword ptr ds:[0B9418E8]; System.Text.Json.Utf8JsonReader.ReadSingleSegment() M00_L03: movzx ecx,al test ecx,ecx jne short M00_L04 cmp byte ptr [ebp-68],0 je short M00_L05 cmp byte ptr [ebp-64],0 je short M00_L08 M00_L04: test ecx,ecx jne short M00_L02 M00_L05: lea esp,[ebp-4] pop esi pop ebp ret M00_L06: xor eax,eax xor esi,esi jmp near ptr M00_L01 M00_L07: lea ecx,[ebp-8C] call dword ptr ds:[0B9431B0] jmp short M00_L03 M00_L08: xor ecx,ecx push 0 push 0 push ecx lea ecx,[ebp-8C] mov edx,20 call dword ptr ds:[0B7F3378] int 3 M00_L09: mov ecx,2C7A mov edx,0B7E5768 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B7F3030] int 3 ; Total bytes of code 323 ``` ```assembly ; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1, Boolean, System.Text.Json.JsonReaderState) push ebp mov ebp,esp push edi push esi sub esp,10 vzeroupper xor eax,eax mov [ebp-18],eax mov [ebp-14],eax mov eax,ecx lea edi,[eax+30] lea esi,[ebp+38] call CORINFO_HELP_ASSIGN_BYREF movsd mov [eax+24],dl mov byte ptr [eax+25],0 mov ecx,eax mov edx,[ebp+8] mov [ecx],edx mov edx,[ebp+0C] mov [ecx+4],edx lea ecx,[eax+8] mov edx,[ebp+10] mov [ecx],edx mov edx,[ebp+14] mov [ecx+4],edx movzx ecx,byte ptr [ebp+18] mov [eax+26],cl movzx ecx,byte ptr [ebp+19] mov [eax+27],cl movzx ecx,byte ptr [ebp+1A] mov [eax+2E],cl movzx ecx,byte ptr [ebp+1B] mov [eax+2C],cl movzx ecx,byte ptr [ebp+1C] mov [eax+28],cl movzx ecx,byte ptr [ebp+1D] mov [eax+29],cl mov ecx,[ebp+20] mov [eax+38],ecx mov ecx,[ebp+24] mov [eax+3C],ecx cmp dword ptr [eax+38],0 jne short M01_L00 mov dword ptr [eax+38],40 M01_L00: lea edi,[eax+40] lea esi,[ebp+28] movsd movsd call CORINFO_HELP_ASSIGN_BYREF movsd xor ecx,ecx mov [eax+20],ecx lea ecx,[eax+18] xor edx,edx mov [ecx],edx mov [ecx+4],edx lea ecx,[eax+10] mov [ecx],edx mov [ecx+4],edx movzx ecx,byte ptr [eax+24] mov [eax+2A],cl mov byte ptr [eax+2B],0 mov [eax+70],edx mov [eax+74],edx mov [eax+58],edx mov [eax+5C],edx mov [eax+50],edx mov [eax+54],edx vxorps xmm0,xmm0,xmm0 vmovq qword ptr [eax+60],xmm0 vmovq qword ptr [eax+68],xmm0 mov byte ptr [eax+2D],0 mov esi,ds:[74C1F80] add esi,4 lea edi,[ebp-18] mov ecx,4 rep movsd lea edi,[eax+78] lea esi,[ebp-18] call CORINFO_HELP_ASSIGN_BYREF call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea esp,[ebp-8] pop esi pop edi pop ebp ret 38 ; Total bytes of code 264 ``` ```assembly ; System.Text.Json.Utf8JsonReader.ReadSingleSegment() push ebp mov ebp,esp push edi push esi push ebx sub esp,0C mov esi,ecx xor ebx,ebx xor ecx,ecx mov [esi+70],ecx mov [esi+74],ecx mov byte ptr [esi+2E],0 mov ecx,[esi+20] mov eax,ecx sar eax,1F cmp ecx,[esi+34] sbb eax,0 jl short M02_L02 cmp byte ptr [esi+27],0 je near ptr M02_L15 cmp byte ptr [esi+24],0 je near ptr M02_L15 cmp byte ptr [esi+2B],0 je short M02_L00 movzx ecx,byte ptr [esi+2A] test ecx,ecx je near ptr M02_L15 M02_L00: cmp dword ptr [esi+4C],0 jne near ptr M02_L17 cmp byte ptr [esi+3C],2 jne short M02_L01 movzx ecx,byte ptr [esi+28] cmp ecx,6 je near ptr M02_L15 M02_L01: movzx ecx,byte ptr [esi+28] cmp ecx,4 je near ptr M02_L15 cmp ecx,2 jne near ptr M02_L18 jmp near ptr M02_L15 M02_L02: mov ecx,[esi+20] lea eax,[esi+30] cmp ecx,[eax+4] jae near ptr M02_L22 mov eax,[eax] movzx edx,byte ptr [eax+ecx] cmp edx,20 jg near ptr M02_L06 mov ecx,esi call dword ptr ds:[0B941948] mov ecx,[esi+20] mov edx,ecx mov eax,edx sar eax,1F cmp edx,[esi+34] sbb eax,0 jl short M02_L05 cmp byte ptr [esi+27],0 je near ptr M02_L15 cmp byte ptr [esi+24],0 je near ptr M02_L15 cmp byte ptr [esi+2B],0 je short M02_L03 movzx ecx,byte ptr [esi+2A] test ecx,ecx je near ptr M02_L15 M02_L03: cmp dword ptr [esi+4C],0 jne near ptr M02_L19 cmp byte ptr [esi+3C],2 jne short M02_L04 movzx ecx,byte ptr [esi+28] cmp ecx,6 je near ptr M02_L15 M02_L04: movzx ecx,byte ptr [esi+28] cmp ecx,4 je near ptr M02_L15 cmp ecx,2 jne near ptr M02_L20 jmp near ptr M02_L15 M02_L05: lea edx,[esi+30] cmp ecx,[edx+4] jae near ptr M02_L22 mov edx,[edx] movzx edx,byte ptr [edx+ecx] M02_L06: mov ecx,[esi+20] mov eax,ecx sar eax,1F lea ebx,[esi+18] mov [ebx],ecx mov [ebx+4],eax movzx ebx,byte ptr [esi+28] test ebx,ebx je near ptr M02_L16 cmp edx,2F jne short M02_L08 M02_L07: mov ecx,esi call dword ptr ds:[0B941AC8]; System.Text.Json.Utf8JsonReader.ConsumeNextTokenOrRollback(Byte) mov ebx,eax jmp near ptr M02_L15 M02_L08: cmp ebx,1 jne short M02_L11 cmp edx,7D jne short M02_L09 mov ecx,esi call dword ptr ds:[0B941888]; System.Text.Json.Utf8JsonReader.EndObject() jmp near ptr M02_L14 M02_L09: cmp edx,22 jne near ptr M02_L21 mov ebx,[esi+20] lea ecx,[esi+8] mov edi,[ecx] mov eax,[ecx+4] mov [ebp-10],eax mov ecx,esi mov edx,[ecx] mov ecx,[ecx+4] mov [ebp-14],edx mov [ebp-18],ecx mov ecx,esi call dword ptr ds:[0B9419D8]; System.Text.Json.Utf8JsonReader.ConsumePropertyName() test eax,eax jne short M02_L10 mov [esi+20],ebx mov byte ptr [esi+28],1 lea ecx,[esi+8] mov [ecx],edi mov edi,[ebp-10] mov [ecx+4],edi mov edi,[ebp-14] mov [esi],edi mov edi,[ebp-18] mov [esi+4],edi mov ebx,eax jmp short M02_L15 M02_L10: mov ebx,eax jmp short M02_L15 M02_L11: cmp ebx,3 jne short M02_L13 cmp edx,5D jne short M02_L12 mov ecx,esi call dword ptr ds:[0B9418B8] jmp short M02_L14 M02_L12: mov ecx,esi call dword ptr ds:[0B941960]; System.Text.Json.Utf8JsonReader.ConsumeValue(Byte) mov ebx,eax jmp short M02_L15 M02_L13: cmp ebx,5 jne near ptr M02_L07 jmp short M02_L12 M02_L14: mov ebx,1 M02_L15: mov eax,ebx lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M02_L16: mov ecx,esi call dword ptr ds:[0B941930]; System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte) mov ebx,eax jmp short M02_L15 M02_L17: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,19 call dword ptr ds:[0B7F3378] int 3 M02_L18: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,16 call dword ptr ds:[0B7F3378] int 3 M02_L19: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,19 call dword ptr ds:[0B7F3378] int 3 M02_L20: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,16 call dword ptr ds:[0B7F3378] int 3 M02_L21: xor ecx,ecx push edx push 0 push ecx mov ecx,esi mov edx,0C call dword ptr ds:[0B7F3378] int 3 M02_L22: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 639 ``` ### Compare Jit Disasm ```assembly ; System.Text.Json.Tests.Perf_Depth.ReadSpanEmptyLoop() push ebp mov ebp,esp push esi sub esp,0B8 vzeroupper vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-0BC],xmm4 vmovdqu xmmword ptr [ebp-0AC],xmm4 mov eax,0FFFFFF70 M00_L00: vmovdqu xmmword ptr [ebp+eax-0C],xmm4 vmovdqu xmmword ptr [ebp+eax+4],xmm4 vmovdqu xmmword ptr [ebp+eax+14],xmm4 add eax,30 jne short M00_L00 mov [ebp-0C],eax mov [ebp-8],eax mov edx,[ecx+4] test edx,edx je near ptr M00_L06 lea eax,[edx+8] mov esi,[edx+4] M00_L01: mov ecx,[ecx+8] test ecx,ecx jl near ptr M00_L09 mov [ebp-0A4],ecx vxorps xmm0,xmm0,xmm0 vmovdqu xmmword ptr [ebp-9C],xmm0 push esi push eax push dword ptr [ebp-90] push dword ptr [ebp-94] push dword ptr [ebp-98] push dword ptr [ebp-9C] push dword ptr [ebp-0A0] push dword ptr [ebp-0A4] push dword ptr [ebp-0A8] push dword ptr [ebp-0AC] push dword ptr [ebp-0B0] push dword ptr [ebp-0B4] push dword ptr [ebp-0B8] push dword ptr [ebp-0BC] lea ecx,[ebp-8C] mov edx,1 call dword ptr ds:[0B701BB8]; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1, Boolean, System.Text.Json.JsonReaderState) M00_L02: cmp byte ptr [ebp-61],0 jne short M00_L07 lea ecx,[ebp-8C] call dword ptr ds:[0B701DC8]; System.Text.Json.Utf8JsonReader.ReadSingleSegment() M00_L03: movzx ecx,al test ecx,ecx jne short M00_L04 cmp byte ptr [ebp-68],0 je short M00_L05 cmp byte ptr [ebp-64],0 je short M00_L08 M00_L04: test ecx,ecx jne short M00_L02 M00_L05: lea esp,[ebp-4] pop esi pop ebp ret M00_L06: xor eax,eax xor esi,esi jmp near ptr M00_L01 M00_L07: lea ecx,[ebp-8C] call dword ptr ds:[0B7031B0] jmp short M00_L03 M00_L08: xor ecx,ecx push 0 push 0 push ecx lea ecx,[ebp-8C] mov edx,20 call dword ptr ds:[0B5D38B8] int 3 M00_L09: mov ecx,2C4E mov edx,0B575FF0 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B5D3570] int 3 ; Total bytes of code 323 ``` ```assembly ; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1, Boolean, System.Text.Json.JsonReaderState) push ebp mov ebp,esp push edi push esi sub esp,10 vzeroupper xor eax,eax mov [ebp-18],eax mov [ebp-14],eax mov eax,ecx lea edi,[eax+30] lea esi,[ebp+38] call CORINFO_HELP_ASSIGN_BYREF movsd mov [eax+24],dl mov byte ptr [eax+25],0 mov ecx,eax mov edx,[ebp+8] mov [ecx],edx mov edx,[ebp+0C] mov [ecx+4],edx lea ecx,[eax+8] mov edx,[ebp+10] mov [ecx],edx mov edx,[ebp+14] mov [ecx+4],edx movzx ecx,byte ptr [ebp+18] mov [eax+26],cl movzx ecx,byte ptr [ebp+19] mov [eax+27],cl movzx ecx,byte ptr [ebp+1A] mov [eax+2E],cl movzx ecx,byte ptr [ebp+1B] mov [eax+2C],cl movzx ecx,byte ptr [ebp+1C] mov [eax+28],cl movzx ecx,byte ptr [ebp+1D] mov [eax+29],cl mov ecx,[ebp+20] mov [eax+38],ecx mov ecx,[ebp+24] mov [eax+3C],ecx cmp dword ptr [eax+38],0 jne short M01_L00 mov dword ptr [eax+38],40 M01_L00: lea edi,[eax+40] lea esi,[ebp+28] movsd movsd call CORINFO_HELP_ASSIGN_BYREF movsd xor ecx,ecx mov [eax+20],ecx lea ecx,[eax+18] xor edx,edx mov [ecx],edx mov [ecx+4],edx lea ecx,[eax+10] mov [ecx],edx mov [ecx+4],edx movzx ecx,byte ptr [eax+24] mov [eax+2A],cl mov byte ptr [eax+2B],0 mov [eax+70],edx mov [eax+74],edx mov [eax+58],edx mov [eax+5C],edx mov [eax+50],edx mov [eax+54],edx vxorps xmm0,xmm0,xmm0 vmovq qword ptr [eax+60],xmm0 vmovq qword ptr [eax+68],xmm0 mov byte ptr [eax+2D],0 mov esi,ds:[7241F84] add esi,4 lea edi,[ebp-18] mov ecx,4 rep movsd lea edi,[eax+78] lea esi,[ebp-18] call CORINFO_HELP_ASSIGN_BYREF call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea esp,[ebp-8] pop esi pop edi pop ebp ret 38 ; Total bytes of code 264 ``` ```assembly ; System.Text.Json.Utf8JsonReader.ReadSingleSegment() push ebp mov ebp,esp push edi push esi push ebx sub esp,0C mov esi,ecx xor ebx,ebx xor ecx,ecx mov [esi+70],ecx mov [esi+74],ecx mov byte ptr [esi+2E],0 mov ecx,[esi+20] mov eax,ecx sar eax,1F cmp ecx,[esi+34] sbb eax,0 jl short M02_L02 cmp byte ptr [esi+27],0 je near ptr M02_L15 cmp byte ptr [esi+24],0 je near ptr M02_L15 cmp byte ptr [esi+2B],0 je short M02_L00 movzx ecx,byte ptr [esi+2A] test ecx,ecx je near ptr M02_L15 M02_L00: cmp dword ptr [esi+4C],0 jne near ptr M02_L17 cmp byte ptr [esi+3C],2 jne short M02_L01 movzx ecx,byte ptr [esi+28] cmp ecx,6 je near ptr M02_L15 M02_L01: movzx ecx,byte ptr [esi+28] cmp ecx,4 je near ptr M02_L15 cmp ecx,2 jne near ptr M02_L18 jmp near ptr M02_L15 M02_L02: mov ecx,[esi+20] lea eax,[esi+30] cmp ecx,[eax+4] jae near ptr M02_L22 mov eax,[eax] movzx edx,byte ptr [eax+ecx] cmp edx,20 jg near ptr M02_L06 mov ecx,esi call dword ptr ds:[0B701E28] mov ecx,[esi+20] mov edx,ecx mov eax,edx sar eax,1F cmp edx,[esi+34] sbb eax,0 jl short M02_L05 cmp byte ptr [esi+27],0 je near ptr M02_L15 cmp byte ptr [esi+24],0 je near ptr M02_L15 cmp byte ptr [esi+2B],0 je short M02_L03 movzx ecx,byte ptr [esi+2A] test ecx,ecx je near ptr M02_L15 M02_L03: cmp dword ptr [esi+4C],0 jne near ptr M02_L19 cmp byte ptr [esi+3C],2 jne short M02_L04 movzx ecx,byte ptr [esi+28] cmp ecx,6 je near ptr M02_L15 M02_L04: movzx ecx,byte ptr [esi+28] cmp ecx,4 je near ptr M02_L15 cmp ecx,2 jne near ptr M02_L20 jmp near ptr M02_L15 M02_L05: lea edx,[esi+30] cmp ecx,[edx+4] jae near ptr M02_L22 mov edx,[edx] movzx edx,byte ptr [edx+ecx] M02_L06: mov ecx,[esi+20] mov eax,ecx sar eax,1F lea ebx,[esi+18] mov [ebx],ecx mov [ebx+4],eax movzx ebx,byte ptr [esi+28] test ebx,ebx je near ptr M02_L16 cmp edx,2F jne short M02_L08 M02_L07: mov ecx,esi call dword ptr ds:[0B701FA8]; System.Text.Json.Utf8JsonReader.ConsumeNextTokenOrRollback(Byte) mov ebx,eax jmp near ptr M02_L15 M02_L08: cmp ebx,1 jne short M02_L11 cmp edx,7D jne short M02_L09 mov ecx,esi call dword ptr ds:[0B701D68]; System.Text.Json.Utf8JsonReader.EndObject() jmp near ptr M02_L14 M02_L09: cmp edx,22 jne near ptr M02_L21 mov ebx,[esi+20] lea ecx,[esi+8] mov edi,[ecx] mov eax,[ecx+4] mov [ebp-10],eax mov ecx,esi mov edx,[ecx] mov ecx,[ecx+4] mov [ebp-14],edx mov [ebp-18],ecx mov ecx,esi call dword ptr ds:[0B701EB8]; System.Text.Json.Utf8JsonReader.ConsumePropertyName() test eax,eax jne short M02_L10 mov [esi+20],ebx mov byte ptr [esi+28],1 lea ecx,[esi+8] mov [ecx],edi mov edi,[ebp-10] mov [ecx+4],edi mov edi,[ebp-14] mov [esi],edi mov edi,[ebp-18] mov [esi+4],edi mov ebx,eax jmp short M02_L15 M02_L10: mov ebx,eax jmp short M02_L15 M02_L11: cmp ebx,3 jne short M02_L13 cmp edx,5D jne short M02_L12 mov ecx,esi call dword ptr ds:[0B701D98] jmp short M02_L14 M02_L12: mov ecx,esi call dword ptr ds:[0B701E40]; System.Text.Json.Utf8JsonReader.ConsumeValue(Byte) mov ebx,eax jmp short M02_L15 M02_L13: cmp ebx,5 jne near ptr M02_L07 jmp short M02_L12 M02_L14: mov ebx,1 M02_L15: mov eax,ebx lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M02_L16: mov ecx,esi call dword ptr ds:[0B701E10]; System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte) mov ebx,eax jmp short M02_L15 M02_L17: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,19 call dword ptr ds:[0B5D38B8] int 3 M02_L18: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,16 call dword ptr ds:[0B5D38B8] int 3 M02_L19: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,19 call dword ptr ds:[0B5D38B8] int 3 M02_L20: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,16 call dword ptr ds:[0B5D38B8] int 3 M02_L21: xor ecx,ecx push edx push 0 push ecx mov ecx,esi mov edx,0C call dword ptr ds:[0B5D38B8] int 3 M02_L22: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 639 ``` #### System.Text.Json.Tests.Perf_Depth.ReadSpanEmptyLoop(Depth: 64) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 3.1170443727928765 < 3.30757038074901. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 235.07263891358224 (T) = (0 -3118.7692441036197) / Math.Sqrt((399.5769644133493 / (299)) + (33.25761763363392 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.10777160449711488 = (3495.483062210538 - 3118.7692441036197) / 3495.483062210538 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Text.Json.Tests.Perf_Depth.ReadSpanEmptyLoop() push ebp mov ebp,esp push esi sub esp,0B8 vzeroupper vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-0BC],xmm4 vmovdqu xmmword ptr [ebp-0AC],xmm4 mov eax,0FFFFFF70 M00_L00: vmovdqu xmmword ptr [ebp+eax-0C],xmm4 vmovdqu xmmword ptr [ebp+eax+4],xmm4 vmovdqu xmmword ptr [ebp+eax+14],xmm4 add eax,30 jne short M00_L00 mov [ebp-0C],eax mov [ebp-8],eax mov edx,[ecx+4] test edx,edx je near ptr M00_L06 lea eax,[edx+8] mov esi,[edx+4] M00_L01: mov ecx,[ecx+8] test ecx,ecx jl near ptr M00_L09 mov [ebp-0A4],ecx vxorps xmm0,xmm0,xmm0 vmovdqu xmmword ptr [ebp-9C],xmm0 push esi push eax push dword ptr [ebp-90] push dword ptr [ebp-94] push dword ptr [ebp-98] push dword ptr [ebp-9C] push dword ptr [ebp-0A0] push dword ptr [ebp-0A4] push dword ptr [ebp-0A8] push dword ptr [ebp-0AC] push dword ptr [ebp-0B0] push dword ptr [ebp-0B4] push dword ptr [ebp-0B8] push dword ptr [ebp-0BC] lea ecx,[ebp-8C] mov edx,1 call dword ptr ds:[0B1F16D8]; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1, Boolean, System.Text.Json.JsonReaderState) M00_L02: cmp byte ptr [ebp-61],0 jne short M00_L07 lea ecx,[ebp-8C] call dword ptr ds:[0B1F18E8]; System.Text.Json.Utf8JsonReader.ReadSingleSegment() M00_L03: movzx ecx,al test ecx,ecx jne short M00_L04 cmp byte ptr [ebp-68],0 je short M00_L05 cmp byte ptr [ebp-64],0 je short M00_L08 M00_L04: test ecx,ecx jne short M00_L02 M00_L05: lea esp,[ebp-4] pop esi pop ebp ret M00_L06: xor eax,eax xor esi,esi jmp near ptr M00_L01 M00_L07: lea ecx,[ebp-8C] call dword ptr ds:[0B1F31B0] jmp short M00_L03 M00_L08: xor ecx,ecx push 0 push 0 push ecx lea ecx,[ebp-8C] mov edx,20 call dword ptr ds:[0B0B3378] int 3 M00_L09: mov ecx,2C7A mov edx,0B0A5768 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B0B3030] int 3 ; Total bytes of code 323 ``` ```assembly ; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1, Boolean, System.Text.Json.JsonReaderState) push ebp mov ebp,esp push edi push esi sub esp,10 vzeroupper xor eax,eax mov [ebp-18],eax mov [ebp-14],eax mov eax,ecx lea edi,[eax+30] lea esi,[ebp+38] call CORINFO_HELP_ASSIGN_BYREF movsd mov [eax+24],dl mov byte ptr [eax+25],0 mov ecx,eax mov edx,[ebp+8] mov [ecx],edx mov edx,[ebp+0C] mov [ecx+4],edx lea ecx,[eax+8] mov edx,[ebp+10] mov [ecx],edx mov edx,[ebp+14] mov [ecx+4],edx movzx ecx,byte ptr [ebp+18] mov [eax+26],cl movzx ecx,byte ptr [ebp+19] mov [eax+27],cl movzx ecx,byte ptr [ebp+1A] mov [eax+2E],cl movzx ecx,byte ptr [ebp+1B] mov [eax+2C],cl movzx ecx,byte ptr [ebp+1C] mov [eax+28],cl movzx ecx,byte ptr [ebp+1D] mov [eax+29],cl mov ecx,[ebp+20] mov [eax+38],ecx mov ecx,[ebp+24] mov [eax+3C],ecx cmp dword ptr [eax+38],0 jne short M01_L00 mov dword ptr [eax+38],40 M01_L00: lea edi,[eax+40] lea esi,[ebp+28] movsd movsd call CORINFO_HELP_ASSIGN_BYREF movsd xor ecx,ecx mov [eax+20],ecx lea ecx,[eax+18] xor edx,edx mov [ecx],edx mov [ecx+4],edx lea ecx,[eax+10] mov [ecx],edx mov [ecx+4],edx movzx ecx,byte ptr [eax+24] mov [eax+2A],cl mov byte ptr [eax+2B],0 mov [eax+70],edx mov [eax+74],edx mov [eax+58],edx mov [eax+5C],edx mov [eax+50],edx mov [eax+54],edx vxorps xmm0,xmm0,xmm0 vmovq qword ptr [eax+60],xmm0 vmovq qword ptr [eax+68],xmm0 mov byte ptr [eax+2D],0 mov esi,ds:[6CD1F80] add esi,4 lea edi,[ebp-18] mov ecx,4 rep movsd lea edi,[eax+78] lea esi,[ebp-18] call CORINFO_HELP_ASSIGN_BYREF call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea esp,[ebp-8] pop esi pop edi pop ebp ret 38 ; Total bytes of code 264 ``` ```assembly ; System.Text.Json.Utf8JsonReader.ReadSingleSegment() push ebp mov ebp,esp push edi push esi push ebx sub esp,0C mov esi,ecx xor ebx,ebx xor ecx,ecx mov [esi+70],ecx mov [esi+74],ecx mov byte ptr [esi+2E],0 mov ecx,[esi+20] mov eax,ecx sar eax,1F cmp ecx,[esi+34] sbb eax,0 jl short M02_L02 cmp byte ptr [esi+27],0 je near ptr M02_L15 cmp byte ptr [esi+24],0 je near ptr M02_L15 cmp byte ptr [esi+2B],0 je short M02_L00 movzx ecx,byte ptr [esi+2A] test ecx,ecx je near ptr M02_L15 M02_L00: cmp dword ptr [esi+4C],0 jne near ptr M02_L17 cmp byte ptr [esi+3C],2 jne short M02_L01 movzx ecx,byte ptr [esi+28] cmp ecx,6 je near ptr M02_L15 M02_L01: movzx ecx,byte ptr [esi+28] cmp ecx,4 je near ptr M02_L15 cmp ecx,2 jne near ptr M02_L18 jmp near ptr M02_L15 M02_L02: mov ecx,[esi+20] lea eax,[esi+30] cmp ecx,[eax+4] jae near ptr M02_L22 mov eax,[eax] movzx edx,byte ptr [eax+ecx] cmp edx,20 jg near ptr M02_L06 mov ecx,esi call dword ptr ds:[0B1F1948] mov ecx,[esi+20] mov edx,ecx mov eax,edx sar eax,1F cmp edx,[esi+34] sbb eax,0 jl short M02_L05 cmp byte ptr [esi+27],0 je near ptr M02_L15 cmp byte ptr [esi+24],0 je near ptr M02_L15 cmp byte ptr [esi+2B],0 je short M02_L03 movzx ecx,byte ptr [esi+2A] test ecx,ecx je near ptr M02_L15 M02_L03: cmp dword ptr [esi+4C],0 jne near ptr M02_L19 cmp byte ptr [esi+3C],2 jne short M02_L04 movzx ecx,byte ptr [esi+28] cmp ecx,6 je near ptr M02_L15 M02_L04: movzx ecx,byte ptr [esi+28] cmp ecx,4 je near ptr M02_L15 cmp ecx,2 jne near ptr M02_L20 jmp near ptr M02_L15 M02_L05: lea edx,[esi+30] cmp ecx,[edx+4] jae near ptr M02_L22 mov edx,[edx] movzx edx,byte ptr [edx+ecx] M02_L06: mov ecx,[esi+20] mov eax,ecx sar eax,1F lea ebx,[esi+18] mov [ebx],ecx mov [ebx+4],eax movzx ebx,byte ptr [esi+28] test ebx,ebx je near ptr M02_L16 cmp edx,2F jne short M02_L08 M02_L07: mov ecx,esi call dword ptr ds:[0B1F1AC8]; System.Text.Json.Utf8JsonReader.ConsumeNextTokenOrRollback(Byte) mov ebx,eax jmp near ptr M02_L15 M02_L08: cmp ebx,1 jne short M02_L11 cmp edx,7D jne short M02_L09 mov ecx,esi call dword ptr ds:[0B1F1888]; System.Text.Json.Utf8JsonReader.EndObject() jmp near ptr M02_L14 M02_L09: cmp edx,22 jne near ptr M02_L21 mov ebx,[esi+20] lea ecx,[esi+8] mov edi,[ecx] mov eax,[ecx+4] mov [ebp-10],eax mov ecx,esi mov edx,[ecx] mov ecx,[ecx+4] mov [ebp-14],edx mov [ebp-18],ecx mov ecx,esi call dword ptr ds:[0B1F19D8]; System.Text.Json.Utf8JsonReader.ConsumePropertyName() test eax,eax jne short M02_L10 mov [esi+20],ebx mov byte ptr [esi+28],1 lea ecx,[esi+8] mov [ecx],edi mov edi,[ebp-10] mov [ecx+4],edi mov edi,[ebp-14] mov [esi],edi mov edi,[ebp-18] mov [esi+4],edi mov ebx,eax jmp short M02_L15 M02_L10: mov ebx,eax jmp short M02_L15 M02_L11: cmp ebx,3 jne short M02_L13 cmp edx,5D jne short M02_L12 mov ecx,esi call dword ptr ds:[0B1F18B8] jmp short M02_L14 M02_L12: mov ecx,esi call dword ptr ds:[0B1F1960]; System.Text.Json.Utf8JsonReader.ConsumeValue(Byte) mov ebx,eax jmp short M02_L15 M02_L13: cmp ebx,5 jne near ptr M02_L07 jmp short M02_L12 M02_L14: mov ebx,1 M02_L15: mov eax,ebx lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M02_L16: mov ecx,esi call dword ptr ds:[0B1F1930]; System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte) mov ebx,eax jmp short M02_L15 M02_L17: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,19 call dword ptr ds:[0B0B3378] int 3 M02_L18: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,16 call dword ptr ds:[0B0B3378] int 3 M02_L19: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,19 call dword ptr ds:[0B0B3378] int 3 M02_L20: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,16 call dword ptr ds:[0B0B3378] int 3 M02_L21: xor ecx,ecx push edx push 0 push ecx mov ecx,esi mov edx,0C call dword ptr ds:[0B0B3378] int 3 M02_L22: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 639 ``` ### Compare Jit Disasm ```assembly ; System.Text.Json.Tests.Perf_Depth.ReadSpanEmptyLoop() push ebp mov ebp,esp push esi sub esp,0B8 vzeroupper vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-0BC],xmm4 vmovdqu xmmword ptr [ebp-0AC],xmm4 mov eax,0FFFFFF70 M00_L00: vmovdqu xmmword ptr [ebp+eax-0C],xmm4 vmovdqu xmmword ptr [ebp+eax+4],xmm4 vmovdqu xmmword ptr [ebp+eax+14],xmm4 add eax,30 jne short M00_L00 mov [ebp-0C],eax mov [ebp-8],eax mov edx,[ecx+4] test edx,edx je near ptr M00_L06 lea eax,[edx+8] mov esi,[edx+4] M00_L01: mov ecx,[ecx+8] test ecx,ecx jl near ptr M00_L09 mov [ebp-0A4],ecx vxorps xmm0,xmm0,xmm0 vmovdqu xmmword ptr [ebp-9C],xmm0 push esi push eax push dword ptr [ebp-90] push dword ptr [ebp-94] push dword ptr [ebp-98] push dword ptr [ebp-9C] push dword ptr [ebp-0A0] push dword ptr [ebp-0A4] push dword ptr [ebp-0A8] push dword ptr [ebp-0AC] push dword ptr [ebp-0B0] push dword ptr [ebp-0B4] push dword ptr [ebp-0B8] push dword ptr [ebp-0BC] lea ecx,[ebp-8C] mov edx,1 call dword ptr ds:[0B1E1BB8]; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1, Boolean, System.Text.Json.JsonReaderState) M00_L02: cmp byte ptr [ebp-61],0 jne short M00_L07 lea ecx,[ebp-8C] call dword ptr ds:[0B1E1DC8]; System.Text.Json.Utf8JsonReader.ReadSingleSegment() M00_L03: movzx ecx,al test ecx,ecx jne short M00_L04 cmp byte ptr [ebp-68],0 je short M00_L05 cmp byte ptr [ebp-64],0 je short M00_L08 M00_L04: test ecx,ecx jne short M00_L02 M00_L05: lea esp,[ebp-4] pop esi pop ebp ret M00_L06: xor eax,eax xor esi,esi jmp near ptr M00_L01 M00_L07: lea ecx,[ebp-8C] call dword ptr ds:[0B1E31B0] jmp short M00_L03 M00_L08: xor ecx,ecx push 0 push 0 push ecx lea ecx,[ebp-8C] mov edx,20 call dword ptr ds:[0B0C38B8] int 3 M00_L09: mov ecx,2C4E mov edx,0B065FF0 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B0C3570] int 3 ; Total bytes of code 323 ``` ```assembly ; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1, Boolean, System.Text.Json.JsonReaderState) push ebp mov ebp,esp push edi push esi sub esp,10 vzeroupper xor eax,eax mov [ebp-18],eax mov [ebp-14],eax mov eax,ecx lea edi,[eax+30] lea esi,[ebp+38] call CORINFO_HELP_ASSIGN_BYREF movsd mov [eax+24],dl mov byte ptr [eax+25],0 mov ecx,eax mov edx,[ebp+8] mov [ecx],edx mov edx,[ebp+0C] mov [ecx+4],edx lea ecx,[eax+8] mov edx,[ebp+10] mov [ecx],edx mov edx,[ebp+14] mov [ecx+4],edx movzx ecx,byte ptr [ebp+18] mov [eax+26],cl movzx ecx,byte ptr [ebp+19] mov [eax+27],cl movzx ecx,byte ptr [ebp+1A] mov [eax+2E],cl movzx ecx,byte ptr [ebp+1B] mov [eax+2C],cl movzx ecx,byte ptr [ebp+1C] mov [eax+28],cl movzx ecx,byte ptr [ebp+1D] mov [eax+29],cl mov ecx,[ebp+20] mov [eax+38],ecx mov ecx,[ebp+24] mov [eax+3C],ecx cmp dword ptr [eax+38],0 jne short M01_L00 mov dword ptr [eax+38],40 M01_L00: lea edi,[eax+40] lea esi,[ebp+28] movsd movsd call CORINFO_HELP_ASSIGN_BYREF movsd xor ecx,ecx mov [eax+20],ecx lea ecx,[eax+18] xor edx,edx mov [ecx],edx mov [ecx+4],edx lea ecx,[eax+10] mov [ecx],edx mov [ecx+4],edx movzx ecx,byte ptr [eax+24] mov [eax+2A],cl mov byte ptr [eax+2B],0 mov [eax+70],edx mov [eax+74],edx mov [eax+58],edx mov [eax+5C],edx mov [eax+50],edx mov [eax+54],edx vxorps xmm0,xmm0,xmm0 vmovq qword ptr [eax+60],xmm0 vmovq qword ptr [eax+68],xmm0 mov byte ptr [eax+2D],0 mov esi,ds:[6ED1F84] add esi,4 lea edi,[ebp-18] mov ecx,4 rep movsd lea edi,[eax+78] lea esi,[ebp-18] call CORINFO_HELP_ASSIGN_BYREF call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea esp,[ebp-8] pop esi pop edi pop ebp ret 38 ; Total bytes of code 264 ``` ```assembly ; System.Text.Json.Utf8JsonReader.ReadSingleSegment() push ebp mov ebp,esp push edi push esi push ebx sub esp,0C mov esi,ecx xor ebx,ebx xor ecx,ecx mov [esi+70],ecx mov [esi+74],ecx mov byte ptr [esi+2E],0 mov ecx,[esi+20] mov eax,ecx sar eax,1F cmp ecx,[esi+34] sbb eax,0 jl short M02_L02 cmp byte ptr [esi+27],0 je near ptr M02_L15 cmp byte ptr [esi+24],0 je near ptr M02_L15 cmp byte ptr [esi+2B],0 je short M02_L00 movzx ecx,byte ptr [esi+2A] test ecx,ecx je near ptr M02_L15 M02_L00: cmp dword ptr [esi+4C],0 jne near ptr M02_L17 cmp byte ptr [esi+3C],2 jne short M02_L01 movzx ecx,byte ptr [esi+28] cmp ecx,6 je near ptr M02_L15 M02_L01: movzx ecx,byte ptr [esi+28] cmp ecx,4 je near ptr M02_L15 cmp ecx,2 jne near ptr M02_L18 jmp near ptr M02_L15 M02_L02: mov ecx,[esi+20] lea eax,[esi+30] cmp ecx,[eax+4] jae near ptr M02_L22 mov eax,[eax] movzx edx,byte ptr [eax+ecx] cmp edx,20 jg near ptr M02_L06 mov ecx,esi call dword ptr ds:[0B1E1E28] mov ecx,[esi+20] mov edx,ecx mov eax,edx sar eax,1F cmp edx,[esi+34] sbb eax,0 jl short M02_L05 cmp byte ptr [esi+27],0 je near ptr M02_L15 cmp byte ptr [esi+24],0 je near ptr M02_L15 cmp byte ptr [esi+2B],0 je short M02_L03 movzx ecx,byte ptr [esi+2A] test ecx,ecx je near ptr M02_L15 M02_L03: cmp dword ptr [esi+4C],0 jne near ptr M02_L19 cmp byte ptr [esi+3C],2 jne short M02_L04 movzx ecx,byte ptr [esi+28] cmp ecx,6 je near ptr M02_L15 M02_L04: movzx ecx,byte ptr [esi+28] cmp ecx,4 je near ptr M02_L15 cmp ecx,2 jne near ptr M02_L20 jmp near ptr M02_L15 M02_L05: lea edx,[esi+30] cmp ecx,[edx+4] jae near ptr M02_L22 mov edx,[edx] movzx edx,byte ptr [edx+ecx] M02_L06: mov ecx,[esi+20] mov eax,ecx sar eax,1F lea ebx,[esi+18] mov [ebx],ecx mov [ebx+4],eax movzx ebx,byte ptr [esi+28] test ebx,ebx je near ptr M02_L16 cmp edx,2F jne short M02_L08 M02_L07: mov ecx,esi call dword ptr ds:[0B1E1FA8]; System.Text.Json.Utf8JsonReader.ConsumeNextTokenOrRollback(Byte) mov ebx,eax jmp near ptr M02_L15 M02_L08: cmp ebx,1 jne short M02_L11 cmp edx,7D jne short M02_L09 mov ecx,esi call dword ptr ds:[0B1E1D68]; System.Text.Json.Utf8JsonReader.EndObject() jmp near ptr M02_L14 M02_L09: cmp edx,22 jne near ptr M02_L21 mov ebx,[esi+20] lea ecx,[esi+8] mov edi,[ecx] mov eax,[ecx+4] mov [ebp-10],eax mov ecx,esi mov edx,[ecx] mov ecx,[ecx+4] mov [ebp-14],edx mov [ebp-18],ecx mov ecx,esi call dword ptr ds:[0B1E1EB8]; System.Text.Json.Utf8JsonReader.ConsumePropertyName() test eax,eax jne short M02_L10 mov [esi+20],ebx mov byte ptr [esi+28],1 lea ecx,[esi+8] mov [ecx],edi mov edi,[ebp-10] mov [ecx+4],edi mov edi,[ebp-14] mov [esi],edi mov edi,[ebp-18] mov [esi+4],edi mov ebx,eax jmp short M02_L15 M02_L10: mov ebx,eax jmp short M02_L15 M02_L11: cmp ebx,3 jne short M02_L13 cmp edx,5D jne short M02_L12 mov ecx,esi call dword ptr ds:[0B1E1D98] jmp short M02_L14 M02_L12: mov ecx,esi call dword ptr ds:[0B1E1E40]; System.Text.Json.Utf8JsonReader.ConsumeValue(Byte) mov ebx,eax jmp short M02_L15 M02_L13: cmp ebx,5 jne near ptr M02_L07 jmp short M02_L12 M02_L14: mov ebx,1 M02_L15: mov eax,ebx lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M02_L16: mov ecx,esi call dword ptr ds:[0B1E1E10]; System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte) mov ebx,eax jmp short M02_L15 M02_L17: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,19 call dword ptr ds:[0B0C38B8] int 3 M02_L18: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,16 call dword ptr ds:[0B0C38B8] int 3 M02_L19: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,19 call dword ptr ds:[0B0C38B8] int 3 M02_L20: xor edi,edi push 0 push 0 push edi mov ecx,esi mov edx,16 call dword ptr ds:[0B0C38B8] int 3 M02_L21: xor ecx,ecx push edx push 0 push ecx mov ecx,esi mov edx,0C call dword ptr ds:[0B0C38B8] int 3 M02_L22: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 639 ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)
performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in System.Text.Json.Serialization.Tests.ReadJson<IndexViewModel>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[DeserializeFromStream - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(IndexViewModel).DeserializeFromStream(Mode%3a%20Reflection).html>) 38.38 μs 32.56 μs 0.85 0.06 False
[DeserializeFromString - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(IndexViewModel).DeserializeFromString(Mode%3a%20Reflection).html>) 37.99 μs 31.62 μs 0.83 0.04 False
[DeserializeFromUtf8Bytes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(IndexViewModel).DeserializeFromUtf8Bytes(Mode%3a%20SourceGen).html>) 35.37 μs 29.42 μs 0.83 0.06 False
[DeserializeFromUtf8Bytes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(IndexViewModel).DeserializeFromUtf8Bytes(Mode%3a%20Reflection).html>) 36.13 μs 30.77 μs 0.85 0.06 False
[DeserializeFromString - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(IndexViewModel).DeserializeFromString(Mode%3a%20SourceGen).html>) 36.75 μs 31.17 μs 0.85 0.05 False
[DeserializeFromReader - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(IndexViewModel).DeserializeFromReader(Mode%3a%20SourceGen).html>) 53.70 μs 40.55 μs 0.76 0.07 False
[DeserializeFromReader - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(IndexViewModel).DeserializeFromReader(Mode%3a%20Reflection).html>) 53.63 μs 41.74 μs 0.78 0.07 False
[DeserializeFromStream - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(IndexViewModel).DeserializeFromStream(Mode%3a%20SourceGen).html>) 37.78 μs 31.86 μs 0.84 0.08 False

graph graph graph graph graph graph graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Serialization.Tests.ReadJson&lt;IndexViewModel&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Text.Json.Serialization.Tests.ReadJson<IndexViewModel>.DeserializeFromStream(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 32.56241086587437 < 37.01796277192124. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 44.173408519221915 (T) = (0 -32751.45369032246) / Math.Sqrt((814319.9934318658 / (299)) + (518925.0540235087 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.16652203496207624 = (39294.92447809613 - 32751.45369032246) / 39294.92447809613 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<IndexViewModel>.DeserializeFromString(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 31.6197157557355 < 35.65229573148002. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 94.3099477851165 (T) = (0 -31776.13881848906) / Math.Sqrt((600392.5506654542 / (299)) + (63097.92519585359 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.16362523842330598 = (37992.7040823018 - 31776.13881848906) / 37992.7040823018 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<IndexViewModel>.DeserializeFromUtf8Bytes(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 29.417541717541713 < 34.088593434202025. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 84.99406368256793 (T) = (0 -29878.118222881665) / Math.Sqrt((1175834.0796121068 / (299)) + (56659.737655056306 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.18094459363761856 = (36478.7509987602 - 29878.118222881665) / 36478.7509987602 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<IndexViewModel>.DeserializeFromUtf8Bytes(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 30.773104438428085 < 34.905858948216355. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 39.96430099628676 (T) = (0 -30795.916521121868) / Math.Sqrt((737814.9685601274 / (299)) + (525673.8556511673 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.16121905352475333 = (36715.08830825676 - 30795.916521121868) / 36715.08830825676 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<IndexViewModel>.DeserializeFromString(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 31.169878697241614 < 35.05158421179714. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 103.60192238306412 (T) = (0 -30999.95362216217) / Math.Sqrt((873062.8715240492 / (299)) + (32441.2715845533 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.1766512583913374 = (37651.06091204356 - 30999.95362216217) / 37651.06091204356 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<IndexViewModel>.DeserializeFromReader(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 40.54827556419393 < 50.207075285670015. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 134.73291644120627 (T) = (0 -40804.90915249698) / Math.Sqrt((1432660.053616565 / (299)) + (110040.1213398021 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.23717802274505848 = (53492.04712131627 - 40804.90915249698) / 53492.04712131627 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<IndexViewModel>.DeserializeFromReader(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 41.73746906824022 < 51.04624967298795. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 144.45639429522583 (T) = (0 -41320.249288524035) / Math.Sqrt((1629609.9492251913 / (299)) + (62214.62892800619 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.235390493431279 = (54040.982924674485 - 41320.249288524035) / 54040.982924674485 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<IndexViewModel>.DeserializeFromStream(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 31.85733485966251 < 36.037273986621145. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 97.85665503599962 (T) = (0 -31940.979102895522) / Math.Sqrt((984977.4669525481 / (299)) + (54320.30095232181 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.1824501356246331 = (39069.151001938466 - 31940.979102895522) / 39069.151001938466 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in System.Text.Json.Serialization.Tests.ReadJson<Hashtable>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[DeserializeFromReader - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(Hashtable).DeserializeFromReader(Mode%3a%20Reflection).html>) 59.30 μs 48.41 μs 0.82 0.02 False
[DeserializeFromReader - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(Hashtable).DeserializeFromReader(Mode%3a%20SourceGen).html>) 58.50 μs 48.65 μs 0.83 0.05 False
[DeserializeFromString - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(Hashtable).DeserializeFromString(Mode%3a%20SourceGen).html>) 49.02 μs 42.78 μs 0.87 0.01 False
[DeserializeFromUtf8Bytes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(Hashtable).DeserializeFromUtf8Bytes(Mode%3a%20Reflection).html>) 47.48 μs 41.78 μs 0.88 0.01 False
[DeserializeFromUtf8Bytes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(Hashtable).DeserializeFromUtf8Bytes(Mode%3a%20SourceGen).html>) 47.05 μs 43.84 μs 0.93 0.02 False
[DeserializeFromStream - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(Hashtable).DeserializeFromStream(Mode%3a%20SourceGen).html>) 48.92 μs 44.35 μs 0.91 0.04 False
[DeserializeFromString - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(Hashtable).DeserializeFromString(Mode%3a%20Reflection).html>) 46.95 μs 42.66 μs 0.91 0.03 False
[DeserializeFromStream - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(Hashtable).DeserializeFromStream(Mode%3a%20Reflection).html>) 48.44 μs 43.26 μs 0.89 0.03 False

graph graph graph graph graph graph graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Serialization.Tests.ReadJson&lt;Hashtable&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Text.Json.Serialization.Tests.ReadJson<Hashtable>.DeserializeFromReader(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 48.409238909238915 < 56.35051865775397. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 87.33740549932236 (T) = (0 -48481.716049561895) / Math.Sqrt((1489090.9680450475 / (299)) + (292542.6861616231 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.18470330442066593 = (59465.12025921033 - 48481.716049561895) / 59465.12025921033 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<Hashtable>.DeserializeFromReader(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 48.64698289269051 < 55.402820468040844. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 103.01280744938774 (T) = (0 -48612.95764300729) / Math.Sqrt((1615515.2401267467 / (299)) + (147336.9297762296 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.18088367040907763 = (59348.05092615508 - 48612.95764300729) / 59348.05092615508 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<Hashtable>.DeserializeFromString(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 42.77974446725987 < 46.38052198067512. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/18/2023 1:01:18 AM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 55.31029902216386 (T) = (0 -43121.782047497436) / Math.Sqrt((984220.8930712002 / (299)) + (207921.4675074751 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.11853887017017456 = (48920.798193134746 - 43121.782047497436) / 48920.798193134746 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<Hashtable>.DeserializeFromUtf8Bytes(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 41.77984126984126 < 44.99178641393829. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 52.192610755015814 (T) = (0 -42253.17927314504) / Math.Sqrt((930467.0316045448 / (299)) + (278602.5334321472 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.12522543509715375 = (48301.7922198478 - 42253.17927314504) / 48301.7922198478 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<Hashtable>.DeserializeFromUtf8Bytes(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 43.83947219390644 < 44.837539973024896. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/18/2023 8:37:25 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 52.218037012302226 (T) = (0 -42331.144842024325) / Math.Sqrt((1340708.435150734 / (299)) + (244685.74992878397 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.1255476992805088 = (48408.752320960964 - 42331.144842024325) / 48408.752320960964 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<Hashtable>.DeserializeFromStream(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 44.351456230446836 < 46.57358787328974. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 50.90887978352689 (T) = (0 -43381.730920657596) / Math.Sqrt((1040436.7667626686 / (299)) + (309468.4416509066 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.1254494875939746 = (49604.602942038946 - 43381.730920657596) / 49604.602942038946 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<Hashtable>.DeserializeFromString(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 42.66308510016939 < 45.16905053461537. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/18/2023 3:58:17 AM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 35.16490113435321 (T) = (0 -43037.01935069841) / Math.Sqrt((1047123.3460921043 / (299)) + (626804.4751448354 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.1178199475271053 = (48784.847526373575 - 43037.01935069841) / 48784.847526373575 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<Hashtable>.DeserializeFromStream(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 43.25858213425266 < 47.35565111289396. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 71.77373277121598 (T) = (0 -43190.51459922883) / Math.Sqrt((990319.0999682172 / (299)) + (129650.67103108916 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.13020066745121006 = (49655.722858129615 - 43190.51459922883) / 49655.722858129615 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)
performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in MicroBenchmarks.Serializers.Json_FromStream<IndexViewModel>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[SystemTextJsonSourceGen - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/MicroBenchmarks.Serializers.Json_FromStream(IndexViewModel).SystemTextJsonSourceGen.html>) 37.77 μs 31.70 μs 0.84 0.06 False
[SystemTextJsonReflection - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/MicroBenchmarks.Serializers.Json_FromStream(IndexViewModel).SystemTextJsonReflection.html>) 38.87 μs 32.73 μs 0.84 0.06 False

graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'MicroBenchmarks.Serializers.Json_FromStream&lt;IndexViewModel&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### MicroBenchmarks.Serializers.Json_FromStream<IndexViewModel>.SystemTextJson_SourceGen_ ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 31.7021409833291 < 35.66980136193677. IsChangePoint: Marked as a change because one of 1/19/2023 1:09:52 AM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 89.308226178163 (T) = (0 -31535.442294942666) / Math.Sqrt((1073813.3792627621 / (299)) + (73599.53375498774 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.1837336590804179 = (38633.76537052324 - 31535.442294942666) / 38633.76537052324 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### MicroBenchmarks.Serializers.Json_FromStream<IndexViewModel>.SystemTextJson_Reflection_ ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 32.73371458551941 < 36.52357317470159. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 98.848782776198 (T) = (0 -32236.65080079721) / Math.Sqrt((876915.4590153934 / (299)) + (46453.1894053626 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.17298751346963195 = (38979.6421769183 - 32236.65080079721) / 38979.6421769183 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in System.Text.Json.Reader.Tests.Perf_Base64

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[ReadBase64EncodedByteArray_NoEscaping - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArray_NoEscaping(NumberOfBytes%3a%201000).html>) 445.07 ns 401.84 ns 0.90 0.05 False 3659.9204614071255 3336.1994239856836 0.9115497069307945) Trace Trace
[ReadBase64EncodedByteArray_HeavyEscaping - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArray_HeavyEscaping(NumberOfBytes%3a%201000).html>) 435.14 ns 379.30 ns 0.87 0.04 False Trace Trace
[ReadBase64EncodedByteArray_NoEscaping - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArray_NoEscaping(NumberOfBytes%3a%20100).html>) 137.99 ns 118.46 ns 0.86 0.26 False 1327.8493633992944 986.3204480604088 0.7427954369277464) Trace Trace

graph graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Reader.Tests.Perf_Base64*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArray_NoEscaping(NumberOfBytes: 1000) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 401.8440939810633 < 421.84752693969983. IsChangePoint: Marked as a change because one of 1/22/2023 4:26:49 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 35.03782930454481 (T) = (0 -386.6787602129276) / Math.Sqrt((94.69836686114533 / (299)) + (50.26012737280122 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.1179575041795191 = (438.39017059289966 - 386.6787602129276) / 438.39017059289966 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArray_NoEscaping() push ebp mov ebp,esp push esi mov eax,[ecx+4] test eax,eax je short M00_L01 lea edx,[eax+8] mov esi,[eax+4] M00_L00: push esi push edx call dword ptr ds:[0ACCF498]; System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArrayCore(System.ReadOnlySpan`1) pop esi pop ebp ret M00_L01: xor edx,edx xor esi,esi jmp short M00_L00 ; Total bytes of code 34 ``` ```assembly ; System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArrayCore(System.ReadOnlySpan`1) push ebp mov ebp,esp push edi push esi push ebx sub esp,0CC vzeroupper vxorps xmm4,xmm4,xmm4 mov eax,0FFFFFF40 M01_L00: vmovdqu xmmword ptr [ebp+eax-18],xmm4 vmovdqu xmmword ptr [ebp+eax-8],xmm4 vmovdqu xmmword ptr [ebp+eax+8],xmm4 add eax,30 jne short M01_L00 mov [ebp-18],eax mov [ebp-14],eax mov [ebp-10],eax vxorps ymm0,ymm0,ymm0 vmovdqu ymmword ptr [ebp-0C4],ymm0 vmovdqu xmmword ptr [ebp-0A4],xmm0 push dword ptr [ebp+0C] push dword ptr [ebp+8] push dword ptr [ebp-98] push dword ptr [ebp-9C] push dword ptr [ebp-0A0] push dword ptr [ebp-0A4] push dword ptr [ebp-0A8] push dword ptr [ebp-0AC] push dword ptr [ebp-0B0] push dword ptr [ebp-0B4] push dword ptr [ebp-0B8] push dword ptr [ebp-0BC] push dword ptr [ebp-0C0] push dword ptr [ebp-0C4] lea ecx,[ebp-94] mov edx,1 call dword ptr ds:[8C8BBB8]; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1, Boolean, System.Text.Json.JsonReaderState) cmp byte ptr [ebp-69],0 jne short M01_L01 lea ecx,[ebp-94] call dword ptr ds:[8C8BDC8]; System.Text.Json.Utf8JsonReader.ReadSingleSegment() jmp short M01_L02 M01_L01: lea ecx,[ebp-94] call dword ptr ds:[8C8D1B0] M01_L02: movzx ecx,al test ecx,ecx jne short M01_L03 cmp byte ptr [ebp-70],0 je short M01_L03 cmp byte ptr [ebp-6C],0 je near ptr M01_L09 M01_L03: cmp byte ptr [ebp-6C],7 jne near ptr M01_L10 cmp byte ptr [ebp-67],0 jne short M01_L04 mov ebx,[ebp-24] mov eax,[ebp-20] jmp short M01_L05 M01_L04: lea edi,[ebp-0D8] lea esi,[ebp-1C] mov ecx,4 rep movsd lea ecx,[ebp-0D8] call dword ptr ds:[0B791678] test eax,eax je short M01_L06 lea ebx,[eax+8] mov eax,[eax+4] M01_L05: cmp byte ptr [ebp-66],0 je short M01_L07 push eax push ebx lea ecx,[ebp-0C8] call dword ptr ds:[8C8F678] jmp short M01_L08 M01_L06: xor ebx,ebx xor eax,eax jmp short M01_L05 M01_L07: push eax push ebx lea ecx,[ebp-0C8] call dword ptr ds:[8C8F708]; System.Text.Json.JsonReaderHelper.TryDecodeBase64(System.ReadOnlySpan`1, Byte[] ByRef) M01_L08: test eax,eax je short M01_L11 mov eax,[ebp-0C8] xor ecx,ecx mov [ebp-0C8],ecx lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 8 M01_L09: xor ecx,ecx push 0 push 0 push ecx lea ecx,[ebp-94] mov edx,20 call dword ptr ds:[0B749918] int 3 M01_L10: movzx ecx,byte ptr [ebp-6C] call dword ptr ds:[0B749828] int 3 M01_L11: mov ecx,6 call dword ptr ds:[0B749AE0] int 3 ; Total bytes of code 406 ``` ### Compare Jit Disasm ```assembly ; System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArray_NoEscaping() push ebp mov ebp,esp push esi mov eax,[ecx+4] test eax,eax je short M00_L01 lea edx,[eax+8] mov esi,[eax+4] M00_L00: push esi push edx call dword ptr ds:[0AC9F498]; System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArrayCore(System.ReadOnlySpan`1) pop esi pop ebp ret M00_L01: xor edx,edx xor esi,esi jmp short M00_L00 ; Total bytes of code 34 ``` ```assembly ; System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArrayCore(System.ReadOnlySpan`1) push ebp mov ebp,esp push edi push esi push ebx sub esp,0CC vzeroupper vxorps xmm4,xmm4,xmm4 mov eax,0FFFFFF40 M01_L00: vmovdqu xmmword ptr [ebp+eax-18],xmm4 vmovdqu xmmword ptr [ebp+eax-8],xmm4 vmovdqu xmmword ptr [ebp+eax+8],xmm4 add eax,30 jne short M01_L00 mov [ebp-18],eax mov [ebp-14],eax mov [ebp-10],eax vxorps ymm0,ymm0,ymm0 vmovdqu ymmword ptr [ebp-0C4],ymm0 vmovdqu xmmword ptr [ebp-0A4],xmm0 push dword ptr [ebp+0C] push dword ptr [ebp+8] push dword ptr [ebp-98] push dword ptr [ebp-9C] push dword ptr [ebp-0A0] push dword ptr [ebp-0A4] push dword ptr [ebp-0A8] push dword ptr [ebp-0AC] push dword ptr [ebp-0B0] push dword ptr [ebp-0B4] push dword ptr [ebp-0B8] push dword ptr [ebp-0BC] push dword ptr [ebp-0C0] push dword ptr [ebp-0C4] lea ecx,[ebp-94] mov edx,1 call dword ptr ds:[8C5D6D8]; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1, Boolean, System.Text.Json.JsonReaderState) cmp byte ptr [ebp-69],0 jne short M01_L01 lea ecx,[ebp-94] call dword ptr ds:[8C5D8E8]; System.Text.Json.Utf8JsonReader.ReadSingleSegment() jmp short M01_L02 M01_L01: lea ecx,[ebp-94] call dword ptr ds:[8C5F1B0] M01_L02: movzx ecx,al test ecx,ecx jne short M01_L03 cmp byte ptr [ebp-70],0 je short M01_L03 cmp byte ptr [ebp-6C],0 je near ptr M01_L09 M01_L03: cmp byte ptr [ebp-6C],7 jne near ptr M01_L10 cmp byte ptr [ebp-67],0 jne short M01_L04 mov ebx,[ebp-24] mov eax,[ebp-20] jmp short M01_L05 M01_L04: lea edi,[ebp-0D8] lea esi,[ebp-1C] mov ecx,4 rep movsd lea ecx,[ebp-0D8] call dword ptr ds:[0B7619C0] test eax,eax je short M01_L06 lea ebx,[eax+8] mov eax,[eax+4] M01_L05: cmp byte ptr [ebp-66],0 je short M01_L07 push eax push ebx lea ecx,[ebp-0C8] call dword ptr ds:[0B761648] jmp short M01_L08 M01_L06: xor ebx,ebx xor eax,eax jmp short M01_L05 M01_L07: push eax push ebx lea ecx,[ebp-0C8] call dword ptr ds:[0B7616D8]; System.Text.Json.JsonReaderHelper.TryDecodeBase64(System.ReadOnlySpan`1, Byte[] ByRef) M01_L08: test eax,eax je short M01_L11 mov eax,[ebp-0C8] xor ecx,ecx mov [ebp-0C8],ecx lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 8 M01_L09: xor ecx,ecx push 0 push 0 push ecx lea ecx,[ebp-94] mov edx,20 call dword ptr ds:[0B71B378] int 3 M01_L10: movzx ecx,byte ptr [ebp-6C] call dword ptr ds:[0B71B288] int 3 M01_L11: mov ecx,6 call dword ptr ds:[0B71B540] int 3 ; Total bytes of code 406 ``` #### System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArray_HeavyEscaping(NumberOfBytes: 1000) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 379.3007220793195 < 423.4097210476233. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 33.52457586700922 (T) = (0 -389.2598075923651) / Math.Sqrt((70.53428097714699 / (299)) + (60.1553405755882 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.11908744263369367 = (441.88245965768516 - 389.2598075923651) / 441.88245965768516 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArray_HeavyEscaping() push ebp mov ebp,esp push esi mov eax,[ecx+8] test eax,eax je short M00_L01 lea edx,[eax+8] mov esi,[eax+4] M00_L00: push esi push edx call dword ptr ds:[0AD1F498]; System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArrayCore(System.ReadOnlySpan`1) pop esi pop ebp ret M00_L01: xor edx,edx xor esi,esi jmp short M00_L00 ; Total bytes of code 34 ``` ```assembly ; System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArrayCore(System.ReadOnlySpan`1) push ebp mov ebp,esp push edi push esi push ebx sub esp,0CC vzeroupper vxorps xmm4,xmm4,xmm4 mov eax,0FFFFFF40 M01_L00: vmovdqu xmmword ptr [ebp+eax-18],xmm4 vmovdqu xmmword ptr [ebp+eax-8],xmm4 vmovdqu xmmword ptr [ebp+eax+8],xmm4 add eax,30 jne short M01_L00 mov [ebp-18],eax mov [ebp-14],eax mov [ebp-10],eax vxorps ymm0,ymm0,ymm0 vmovdqu ymmword ptr [ebp-0C4],ymm0 vmovdqu xmmword ptr [ebp-0A4],xmm0 push dword ptr [ebp+0C] push dword ptr [ebp+8] push dword ptr [ebp-98] push dword ptr [ebp-9C] push dword ptr [ebp-0A0] push dword ptr [ebp-0A4] push dword ptr [ebp-0A8] push dword ptr [ebp-0AC] push dword ptr [ebp-0B0] push dword ptr [ebp-0B4] push dword ptr [ebp-0B8] push dword ptr [ebp-0BC] push dword ptr [ebp-0C0] push dword ptr [ebp-0C4] lea ecx,[ebp-94] mov edx,1 call dword ptr ds:[8CDBBB8]; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1, Boolean, System.Text.Json.JsonReaderState) cmp byte ptr [ebp-69],0 jne short M01_L01 lea ecx,[ebp-94] call dword ptr ds:[8CDBDC8]; System.Text.Json.Utf8JsonReader.ReadSingleSegment() jmp short M01_L02 M01_L01: lea ecx,[ebp-94] call dword ptr ds:[8CDD1B0] M01_L02: movzx ecx,al test ecx,ecx jne short M01_L03 cmp byte ptr [ebp-70],0 je short M01_L03 cmp byte ptr [ebp-6C],0 je near ptr M01_L09 M01_L03: cmp byte ptr [ebp-6C],7 jne near ptr M01_L10 cmp byte ptr [ebp-67],0 jne short M01_L04 mov ebx,[ebp-24] mov eax,[ebp-20] jmp short M01_L05 M01_L04: lea edi,[ebp-0D8] lea esi,[ebp-1C] mov ecx,4 rep movsd lea ecx,[ebp-0D8] call dword ptr ds:[0B7E1678] test eax,eax je short M01_L06 lea ebx,[eax+8] mov eax,[eax+4] M01_L05: cmp byte ptr [ebp-66],0 je short M01_L07 push eax push ebx lea ecx,[ebp-0C8] call dword ptr ds:[8CDF678] jmp short M01_L08 M01_L06: xor ebx,ebx xor eax,eax jmp short M01_L05 M01_L07: push eax push ebx lea ecx,[ebp-0C8] call dword ptr ds:[8CDF708]; System.Text.Json.JsonReaderHelper.TryDecodeBase64(System.ReadOnlySpan`1, Byte[] ByRef) M01_L08: test eax,eax je short M01_L11 mov eax,[ebp-0C8] xor ecx,ecx mov [ebp-0C8],ecx lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 8 M01_L09: xor ecx,ecx push 0 push 0 push ecx lea ecx,[ebp-94] mov edx,20 call dword ptr ds:[0B799918] int 3 M01_L10: movzx ecx,byte ptr [ebp-6C] call dword ptr ds:[0B799828] int 3 M01_L11: mov ecx,6 call dword ptr ds:[0B799AE0] int 3 ; Total bytes of code 406 ``` ### Compare Jit Disasm ```assembly ; System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArray_HeavyEscaping() push ebp mov ebp,esp push esi mov eax,[ecx+8] test eax,eax je short M00_L01 lea edx,[eax+8] mov esi,[eax+4] M00_L00: push esi push edx call dword ptr ds:[0A7FF498]; System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArrayCore(System.ReadOnlySpan`1) pop esi pop ebp ret M00_L01: xor edx,edx xor esi,esi jmp short M00_L00 ; Total bytes of code 34 ``` ```assembly ; System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArrayCore(System.ReadOnlySpan`1) push ebp mov ebp,esp push edi push esi push ebx sub esp,0CC vzeroupper vxorps xmm4,xmm4,xmm4 mov eax,0FFFFFF40 M01_L00: vmovdqu xmmword ptr [ebp+eax-18],xmm4 vmovdqu xmmword ptr [ebp+eax-8],xmm4 vmovdqu xmmword ptr [ebp+eax+8],xmm4 add eax,30 jne short M01_L00 mov [ebp-18],eax mov [ebp-14],eax mov [ebp-10],eax vxorps ymm0,ymm0,ymm0 vmovdqu ymmword ptr [ebp-0C4],ymm0 vmovdqu xmmword ptr [ebp-0A4],xmm0 push dword ptr [ebp+0C] push dword ptr [ebp+8] push dword ptr [ebp-98] push dword ptr [ebp-9C] push dword ptr [ebp-0A0] push dword ptr [ebp-0A4] push dword ptr [ebp-0A8] push dword ptr [ebp-0AC] push dword ptr [ebp-0B0] push dword ptr [ebp-0B4] push dword ptr [ebp-0B8] push dword ptr [ebp-0BC] push dword ptr [ebp-0C0] push dword ptr [ebp-0C4] lea ecx,[ebp-94] mov edx,1 call dword ptr ds:[874D6D8]; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1, Boolean, System.Text.Json.JsonReaderState) cmp byte ptr [ebp-69],0 jne short M01_L01 lea ecx,[ebp-94] call dword ptr ds:[874D8E8]; System.Text.Json.Utf8JsonReader.ReadSingleSegment() jmp short M01_L02 M01_L01: lea ecx,[ebp-94] call dword ptr ds:[874F1B0] M01_L02: movzx ecx,al test ecx,ecx jne short M01_L03 cmp byte ptr [ebp-70],0 je short M01_L03 cmp byte ptr [ebp-6C],0 je near ptr M01_L09 M01_L03: cmp byte ptr [ebp-6C],7 jne near ptr M01_L10 cmp byte ptr [ebp-67],0 jne short M01_L04 mov ebx,[ebp-24] mov eax,[ebp-20] jmp short M01_L05 M01_L04: lea edi,[ebp-0D8] lea esi,[ebp-1C] mov ecx,4 rep movsd lea ecx,[ebp-0D8] call dword ptr ds:[0B2C19C0] test eax,eax je short M01_L06 lea ebx,[eax+8] mov eax,[eax+4] M01_L05: cmp byte ptr [ebp-66],0 je short M01_L07 push eax push ebx lea ecx,[ebp-0C8] call dword ptr ds:[0B2C1648] jmp short M01_L08 M01_L06: xor ebx,ebx xor eax,eax jmp short M01_L05 M01_L07: push eax push ebx lea ecx,[ebp-0C8] call dword ptr ds:[0B2C16D8]; System.Text.Json.JsonReaderHelper.TryDecodeBase64(System.ReadOnlySpan`1, Byte[] ByRef) M01_L08: test eax,eax je short M01_L11 mov eax,[ebp-0C8] xor ecx,ecx mov [ebp-0C8],ecx lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 8 M01_L09: xor ecx,ecx push 0 push 0 push ecx lea ecx,[ebp-94] mov edx,20 call dword ptr ds:[0B27B378] int 3 M01_L10: movzx ecx,byte ptr [ebp-6C] call dword ptr ds:[0B27B288] int 3 M01_L11: mov ecx,6 call dword ptr ds:[0B27B540] int 3 ; Total bytes of code 406 ``` #### System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArray_NoEscaping(NumberOfBytes: 100) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 118.45581501831502 < 123.57452054207955. IsChangePoint: Marked as a change because one of 1/22/2023 12:57:13 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 32.65655727111572 (T) = (0 -115.37021344061604) / Math.Sqrt((59.39517619243607 / (299)) + (5.560184334125063 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.1525738601849685 = (136.1419102150873 - 115.37021344061604) / 136.1419102150873 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArray_NoEscaping() push ebp mov ebp,esp push esi mov eax,[ecx+4] test eax,eax je short M00_L01 lea edx,[eax+8] mov esi,[eax+4] M00_L00: push esi push edx call dword ptr ds:[0A2AF498]; System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArrayCore(System.ReadOnlySpan`1) pop esi pop ebp ret M00_L01: xor edx,edx xor esi,esi jmp short M00_L00 ; Total bytes of code 34 ``` ```assembly ; System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArrayCore(System.ReadOnlySpan`1) push ebp mov ebp,esp push edi push esi push ebx sub esp,0CC vzeroupper vxorps xmm4,xmm4,xmm4 mov eax,0FFFFFF40 M01_L00: vmovdqu xmmword ptr [ebp+eax-18],xmm4 vmovdqu xmmword ptr [ebp+eax-8],xmm4 vmovdqu xmmword ptr [ebp+eax+8],xmm4 add eax,30 jne short M01_L00 mov [ebp-18],eax mov [ebp-14],eax mov [ebp-10],eax vxorps ymm0,ymm0,ymm0 vmovdqu ymmword ptr [ebp-0C4],ymm0 vmovdqu xmmword ptr [ebp-0A4],xmm0 push dword ptr [ebp+0C] push dword ptr [ebp+8] push dword ptr [ebp-98] push dword ptr [ebp-9C] push dword ptr [ebp-0A0] push dword ptr [ebp-0A4] push dword ptr [ebp-0A8] push dword ptr [ebp-0AC] push dword ptr [ebp-0B0] push dword ptr [ebp-0B4] push dword ptr [ebp-0B8] push dword ptr [ebp-0BC] push dword ptr [ebp-0C0] push dword ptr [ebp-0C4] lea ecx,[ebp-94] mov edx,1 call dword ptr ds:[836B6D8]; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1, Boolean, System.Text.Json.JsonReaderState) cmp byte ptr [ebp-69],0 jne short M01_L01 lea ecx,[ebp-94] call dword ptr ds:[836B8E8]; System.Text.Json.Utf8JsonReader.ReadSingleSegment() jmp short M01_L02 M01_L01: lea ecx,[ebp-94] call dword ptr ds:[836D1B0] M01_L02: movzx ecx,al test ecx,ecx jne short M01_L03 cmp byte ptr [ebp-70],0 je short M01_L03 cmp byte ptr [ebp-6C],0 je near ptr M01_L09 M01_L03: cmp byte ptr [ebp-6C],7 jne near ptr M01_L10 cmp byte ptr [ebp-67],0 jne short M01_L04 mov ebx,[ebp-24] mov eax,[ebp-20] jmp short M01_L05 M01_L04: lea edi,[ebp-0D8] lea esi,[ebp-1C] mov ecx,4 rep movsd lea ecx,[ebp-0D8] call dword ptr ds:[0AD71678] test eax,eax je short M01_L06 lea ebx,[eax+8] mov eax,[eax+4] M01_L05: cmp byte ptr [ebp-66],0 je short M01_L07 push eax push ebx lea ecx,[ebp-0C8] call dword ptr ds:[836F678] jmp short M01_L08 M01_L06: xor ebx,ebx xor eax,eax jmp short M01_L05 M01_L07: push eax push ebx lea ecx,[ebp-0C8] call dword ptr ds:[836F708]; System.Text.Json.JsonReaderHelper.TryDecodeBase64(System.ReadOnlySpan`1, Byte[] ByRef) M01_L08: test eax,eax je short M01_L11 mov eax,[ebp-0C8] xor ecx,ecx mov [ebp-0C8],ecx lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 8 M01_L09: xor ecx,ecx push 0 push 0 push ecx lea ecx,[ebp-94] mov edx,20 call dword ptr ds:[0AD29918] int 3 M01_L10: movzx ecx,byte ptr [ebp-6C] call dword ptr ds:[0AD29828] int 3 M01_L11: mov ecx,6 call dword ptr ds:[0AD29AE0] int 3 ; Total bytes of code 406 ``` ### Compare Jit Disasm ```assembly ; System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArray_NoEscaping() push ebp mov ebp,esp push esi mov eax,[ecx+4] test eax,eax je short M00_L01 lea edx,[eax+8] mov esi,[eax+4] M00_L00: push esi push edx call dword ptr ds:[0B09F498]; System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArrayCore(System.ReadOnlySpan`1) pop esi pop ebp ret M00_L01: xor edx,edx xor esi,esi jmp short M00_L00 ; Total bytes of code 34 ``` ```assembly ; System.Text.Json.Reader.Tests.Perf_Base64.ReadBase64EncodedByteArrayCore(System.ReadOnlySpan`1) push ebp mov ebp,esp push edi push esi push ebx sub esp,0CC vzeroupper vxorps xmm4,xmm4,xmm4 mov eax,0FFFFFF40 M01_L00: vmovdqu xmmword ptr [ebp+eax-18],xmm4 vmovdqu xmmword ptr [ebp+eax-8],xmm4 vmovdqu xmmword ptr [ebp+eax+8],xmm4 add eax,30 jne short M01_L00 mov [ebp-18],eax mov [ebp-14],eax mov [ebp-10],eax vxorps ymm0,ymm0,ymm0 vmovdqu ymmword ptr [ebp-0C4],ymm0 vmovdqu xmmword ptr [ebp-0A4],xmm0 push dword ptr [ebp+0C] push dword ptr [ebp+8] push dword ptr [ebp-98] push dword ptr [ebp-9C] push dword ptr [ebp-0A0] push dword ptr [ebp-0A4] push dword ptr [ebp-0A8] push dword ptr [ebp-0AC] push dword ptr [ebp-0B0] push dword ptr [ebp-0B4] push dword ptr [ebp-0B8] push dword ptr [ebp-0BC] push dword ptr [ebp-0C0] push dword ptr [ebp-0C4] lea ecx,[ebp-94] mov edx,1 call dword ptr ds:[905D6D8]; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1, Boolean, System.Text.Json.JsonReaderState) cmp byte ptr [ebp-69],0 jne short M01_L01 lea ecx,[ebp-94] call dword ptr ds:[905D8E8]; System.Text.Json.Utf8JsonReader.ReadSingleSegment() jmp short M01_L02 M01_L01: lea ecx,[ebp-94] call dword ptr ds:[905F1B0] M01_L02: movzx ecx,al test ecx,ecx jne short M01_L03 cmp byte ptr [ebp-70],0 je short M01_L03 cmp byte ptr [ebp-6C],0 je near ptr M01_L09 M01_L03: cmp byte ptr [ebp-6C],7 jne near ptr M01_L10 cmp byte ptr [ebp-67],0 jne short M01_L04 mov ebx,[ebp-24] mov eax,[ebp-20] jmp short M01_L05 M01_L04: lea edi,[ebp-0D8] lea esi,[ebp-1C] mov ecx,4 rep movsd lea ecx,[ebp-0D8] call dword ptr ds:[0BB619C0] test eax,eax je short M01_L06 lea ebx,[eax+8] mov eax,[eax+4] M01_L05: cmp byte ptr [ebp-66],0 je short M01_L07 push eax push ebx lea ecx,[ebp-0C8] call dword ptr ds:[0BB61648] jmp short M01_L08 M01_L06: xor ebx,ebx xor eax,eax jmp short M01_L05 M01_L07: push eax push ebx lea ecx,[ebp-0C8] call dword ptr ds:[0BB616D8]; System.Text.Json.JsonReaderHelper.TryDecodeBase64(System.ReadOnlySpan`1, Byte[] ByRef) M01_L08: test eax,eax je short M01_L11 mov eax,[ebp-0C8] xor ecx,ecx mov [ebp-0C8],ecx lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 8 M01_L09: xor ecx,ecx push 0 push 0 push ecx lea ecx,[ebp-94] mov edx,20 call dword ptr ds:[0BB1B378] int 3 M01_L10: movzx ecx,byte ptr [ebp-6C] call dword ptr ds:[0BB1B288] int 3 M01_L11: mov ecx,6 call dword ptr ds:[0BB1B540] int 3 ; Total bytes of code 406 ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in MicroBenchmarks.Serializers.Json_FromStream<CollectionsOfPrimitives>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[SystemTextJsonReflection - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/MicroBenchmarks.Serializers.Json_FromStream(CollectionsOfPrimitives).SystemTextJsonReflection.html>) 443.38 μs 400.06 μs 0.90 0.01 False

graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'MicroBenchmarks.Serializers.Json_FromStream&lt;CollectionsOfPrimitives&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### MicroBenchmarks.Serializers.Json_FromStream<CollectionsOfPrimitives>.SystemTextJson_Reflection_ ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 400.06012841091496 < 422.2915544912459. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 71.75098823935002 (T) = (0 -401425.97178630263) / Math.Sqrt((76711411.05050047 / (299)) + (4560167.367234504 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.10441352488620212 = (448226.9249714779 - 401425.97178630263) / 448226.9249714779 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in MicroBenchmarks.Serializers.Json_FromStream<LoginViewModel>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[SystemTextJsonSourceGen - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/MicroBenchmarks.Serializers.Json_FromStream(LoginViewModel).SystemTextJsonSourceGen.html>) 633.71 ns 580.53 ns 0.92 0.02 False

graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'MicroBenchmarks.Serializers.Json_FromStream&lt;LoginViewModel&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### MicroBenchmarks.Serializers.Json_FromStream<LoginViewModel>.SystemTextJson_SourceGen_ ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 580.5332248901083 < 593.9310194636494. IsChangePoint: Marked as a change because one of 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 20.975479658263687 (T) = (0 -589.6007969827643) / Math.Sqrt((219.1631000028523 / (299)) + (132.3375889143221 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.07786980974225341 = (639.3899724918059 - 589.6007969827643) / 639.3899724918059 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)
performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in System.Text.Json.Document.Tests.Perf_ParseThenWrite

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[ParseThenWrite - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Document.Tests.Perf_ParseThenWrite.ParseThenWrite(IsDataIndented%3a%20False%2c%20TestCase%3a%20Json400KB).html>) 2.10 ms 1.80 ms 0.86 0.00 False 17384045.58404558 16200000 0.931888950801403) Trace Trace
[ParseThenWrite - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Document.Tests.Perf_ParseThenWrite.ParseThenWrite(IsDataIndented%3a%20True%2c%20TestCase%3a%20Json400KB).html>) 2.57 ms 2.28 ms 0.89 0.00 False 21693055.555555556 20551070.336391434 0.9473571062297095) Trace Trace

graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Document.Tests.Perf_ParseThenWrite*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Text.Json.Document.Tests.Perf_ParseThenWrite.ParseThenWrite(IsDataIndented: False, TestCase: Json400KB) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 1.7980797122302155 < 1.9929662282913163. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 55.35989510372548 (T) = (0 -1827729.647815677) / Math.Sqrt((333258016.26050985 / (299)) + (702004052.5816576 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.13623305276568418 = (2115998.5962276757 - 1827729.647815677) / 2115998.5962276757 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Text.Json.Document.Tests.Perf_ParseThenWrite.ParseThenWrite() push ebp mov ebp,esp push edi push esi push ebx sub esp,28 xor eax,eax mov [ebp-20],eax mov [ebp-1C],eax mov [ebp-18],eax mov [ebp-14],eax mov esi,ecx mov edi,[esi+8] cmp dword ptr [edi+10],0 jne short M00_L00 cmp dword ptr [edi+0C],0 je near ptr M00_L07 M00_L00: mov ebx,[edi+14] test ebx,ebx je short M00_L02 mov ecx,[ebx+4] mov edx,[ebx+8] test ecx,ecx je near ptr M00_L08 mov eax,[ecx+4] cmp [ecx+4],edx jb near ptr M00_L09 add ecx,8 M00_L01: call dword ptr ds:[7F2F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) xor ecx,ecx mov [ebx+8],ecx M00_L02: mov ecx,edi call dword ptr ds:[0B02D510]; System.Text.Json.Utf8JsonWriter.ResetHelper() mov edi,[esi+4] test edi,edi je short M00_L04 mov ebx,edi mov edi,[ebx+4] M00_L03: xor ecx,ecx mov [ebp-28],ecx mov [ebp-24],ecx lea ecx,[ebp-28] lea edx,[ebp-30] call dword ptr ds:[0B3FFD38]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push edi push 0 push ebx push dword ptr [ebp-2C] push dword ptr [ebp-30] xor ecx,ecx xor edx,edx call dword ptr ds:[0B3FFBE8]; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) mov [ebp-34],eax mov edx,[esi+8] mov ecx,eax cmp [ecx],ecx call dword ptr ds:[0B3FF6A8]; System.Text.Json.JsonDocument.WriteTo(System.Text.Json.Utf8JsonWriter) mov ecx,[ebp-34] call dword ptr ds:[863EF00]; System.Text.Json.JsonDocument.Dispose() jmp short M00_L06 M00_L04: xor ebx,ebx xor edi,edi jmp short M00_L03 cmp dword ptr [ebp-34],0 je short M00_L05 mov ecx,[ebp-34] call dword ptr ds:[863EF00]; System.Text.Json.JsonDocument.Dispose() M00_L05: pop eax jmp eax M00_L06: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M00_L07: call dword ptr ds:[0B381A98] int 3 M00_L08: test edx,edx jne short M00_L09 xor ecx,ecx xor edx,edx jmp near ptr M00_L01 M00_L09: call dword ptr ds:[8625270] int 3 ; Total bytes of code 237 ``` ```assembly ; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push ebp mov ebp,esp push edi push esi push ebx M01_L00: test edx,edx je short M01_L08 xor eax,eax mov esi,edx sub esi,1 sbb eax,0 cmp esi,16 sbb eax,0 jb short M01_L09 M01_L01: cmp edx,200 jae near ptr M01_L15 xor edi,edi mov eax,ecx test al,3 jne near ptr M01_L16 M01_L02: mov eax,ecx dec eax test al,4 je short M01_L10 M01_L03: lea eax,[edx-10] sub edx,edi M01_L04: lea esi,[edi+10] xor ebx,ebx mov [ecx+edi],ebx mov [ecx+edi+4],ebx mov [ecx+edi+8],ebx mov [ecx+edi+0C],ebx mov edi,esi cmp edi,eax jbe short M01_L04 test dl,8 je short M01_L05 xor eax,eax mov [ecx+edi],eax mov [ecx+edi+4],eax add edi,8 M01_L05: test dl,4 jne short M01_L13 M01_L06: test dl,2 jne short M01_L11 M01_L07: test dl,1 jne short M01_L12 M01_L08: pop ebx pop esi pop edi pop ebp ret M01_L09: cmp esi,0B jne short M01_L14 xor edx,edx mov [ecx],edx mov [ecx+4],edx mov [ecx+8],edx jmp short M01_L08 M01_L10: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L03 M01_L11: mov word ptr [ecx+edi],0 add edi,2 jmp short M01_L07 M01_L12: mov byte ptr [ecx+edi],0 jmp short M01_L08 M01_L13: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L06 M01_L14: cmp esi,15 ja near ptr M01_L01 lea eax,ds:[0B6F6F00] mov eax,[eax+esi*4] lea edx,[M01_L00] add eax,edx jmp eax xor eax,eax mov [ecx],eax jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 mov byte ptr [ecx+6],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov byte ptr [ecx+4],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 mov byte ptr [ecx+12],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov byte ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 mov byte ptr [ecx+0E],0 jmp near ptr M01_L08 M01_L15: call dword ptr ds:[8531858] jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov word ptr [ecx+14],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 mov byte ptr [ecx+0A],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov byte ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov byte ptr [ecx+10],0 jmp near ptr M01_L08 mov word ptr [ecx],0 jmp near ptr M01_L08 mov word ptr [ecx],0 mov byte ptr [ecx+2],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov byte ptr [ecx+14],0 jmp near ptr M01_L08 M01_L16: mov eax,ecx test al,1 je short M01_L17 mov byte ptr [ecx],0 mov edi,1 mov eax,ecx test al,2 jne near ptr M01_L02 M01_L17: mov word ptr [ecx+edi],0 add edi,2 jmp near ptr M01_L02 mov byte ptr [ecx],0 jmp near ptr M01_L08 ; Total bytes of code 635 ``` ```assembly ; System.Text.Json.Utf8JsonWriter.ResetHelper() vzeroupper xor eax,eax mov [ecx+1C],eax lea eax,[ecx+4] xor edx,edx mov [eax],edx mov [eax+4],edx mov [ecx+24],edx mov [ecx+28],edx mov [ecx+2C],edx mov byte ptr [ecx+20],0 mov byte ptr [ecx+22],0 mov byte ptr [ecx+21],0 mov [ecx+18],edx vxorps xmm0,xmm0,xmm0 vmovq qword ptr [ecx+30],xmm0 vmovq qword ptr [ecx+38],xmm0 ret ; Total bytes of code 57 ``` ```assembly ; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebp mov ebp,esp push ebx movzx eax,byte ptr [ecx+5] movzx ebx,byte ptr [ecx+4] cmp ebx,2 jg short M03_L00 mov ecx,[ecx] test ecx,ecx jl short M03_L01 mov [edx],ecx mov [edx+4],bl mov [edx+5],al pop ebx pop ebp ret M03_L00: mov ecx,2C7A mov edx,0B0359D0 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B381588] int 3 M03_L01: mov ecx,2C7A mov edx,0B0359D0 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B381558] int 3 ; Total bytes of code 82 ``` ```assembly ; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) push ebp mov ebp,esp push edi push esi push ebx sub esp,44 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-48],xmm4 vmovdqu xmmword ptr [ebp-38],xmm4 xor eax,eax mov [ebp-28],eax mov [ebp-24],eax mov [ebp-18],eax mov [ebp-50],edx mov ebx,ecx xor ecx,ecx xor edx,edx mov eax,[ebp+10] test eax,eax je short M04_L01 mov ecx,[eax] test dword ptr [ecx],80000000 je near ptr M04_L06 lea ecx,[eax+8] mov edx,[eax+4] M04_L00: mov eax,[ebp+14] and eax,7FFFFFFF mov edi,[ebp+18] cmp eax,edx ja near ptr M04_L07 sub edx,eax cmp edx,edi jb near ptr M04_L07 add ecx,eax mov edx,edi M04_L01: mov edi,ecx mov eax,edx mov [ebp-4C],eax mov edx,[ebp+18] add edx,0C cmp edx,100000 jle short M04_L02 cmp edx,400000 jg short M04_L02 mov edx,100000 M04_L02: mov ecx,ds:[6C14E68] call dword ptr ds:[863F628]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-2C],eax xor ecx,ecx mov [ebp-28],ecx mov byte ptr [ebp-24],0 mov byte ptr [ebp-23],0 mov ecx,ds:[6C14E68] mov edx,200 call dword ptr ds:[863F628]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-34],eax mov ecx,[ebp-34] mov ecx,[ecx+4] mov [ebp-30],ecx push dword ptr [ebp-4C] push edi push dword ptr [ebp+0C] push dword ptr [ebp+8] lea ecx,[ebp-2C] lea edx,[ebp-34] call dword ptr ds:[0B3FFA08]; System.Text.Json.JsonDocument.Parse(System.ReadOnlySpan`1, System.Text.Json.JsonReaderOptions, MetadataDb ByRef, StackRowStack ByRef) jmp short M04_L03 lea ecx,[ebp-2C] call dword ptr ds:[0B3FF528]; System.Text.Json.JsonDocument+MetadataDb.Dispose() call CORINFO_HELP_RETHROW int 3 M04_L03: mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M04_L05 push 0 mov ecx,ds:[6C14E68] call dword ptr ds:[863F62C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) jmp short M04_L05 mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M04_L04 push 0 mov ecx,ds:[6C14E68] call dword ptr ds:[863F62C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) M04_L04: pop eax jmp eax M04_L05: mov ecx,offset MT_System.Text.Json.JsonDocument call CORINFO_HELP_NEWSFAST lea edi,[ebp-48] lea esi,[ebp-2C] movsd movsd movsd lea edi,[eax+10] lea esi,[ebp+10] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edi,[eax+1C] lea esi,[ebp-48] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[eax+8] mov esi,[ebp-50] call CORINFO_HELP_ASSIGN_REF_ESI mov byte ptr [eax+0C],1 lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 14 M04_L06: lea edx,[ebp-3C] mov ecx,eax mov eax,[eax] mov eax,[eax+28] call dword ptr [eax+14] mov ecx,[ebp-3C] mov edx,[ebp-38] jmp near ptr M04_L00 M04_L07: call dword ptr ds:[8625270] int 3 ; Total bytes of code 405 ``` ```assembly ; System.Text.Json.JsonDocument.WriteTo(System.Text.Json.Utf8JsonWriter) push ebp mov ebp,esp push esi test edx,edx je short M05_L00 test ecx,ecx je short M05_L01 push edx xor edx,edx call dword ptr ds:[0B3FF978]; System.Text.Json.JsonDocument.WriteElementTo(Int32, System.Text.Json.Utf8JsonWriter) pop esi pop ebp ret M05_L00: mov ecx,2C42 mov edx,0B0359D0 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B381540] int 3 M05_L01: mov ecx,offset MT_System.InvalidOperationException call CORINFO_HELP_NEWSFAST mov esi,eax mov ecx,esi call dword ptr ds:[85CFCC0] mov ecx,esi call CORINFO_HELP_THROW int 3 ; Total bytes of code 76 ``` ```assembly ; System.Text.Json.JsonDocument.Dispose() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+18] test edi,edi je short M06_L00 cmp byte ptr [esi+0C],0 jne short M06_L01 M06_L00: pop ebx pop esi pop edi pop ebp ret M06_L01: lea ebx,[esi+1C] xor ecx,ecx mov edx,ecx xchg edx,[ebx] test edx,edx je short M06_L02 push 0 mov ecx,ds:[6C14E68] call dword ptr ds:[863F62C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) xor ecx,ecx mov [ebx+4],ecx M06_L02: xor ecx,ecx mov [esi+10],ecx mov [esi+14],ecx mov [esi+18],ecx cmp dword ptr [esi+4],0 je short M06_L03 add esi,4 xor ecx,ecx mov ebx,ecx xchg ebx,[esi] test ebx,ebx je short M06_L04 mov ecx,[ebx+4] cmp ecx,edi jb short M06_L05 lea ecx,[ebx+8] mov edx,edi call dword ptr ds:[7F2F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push 0 mov ecx,ds:[6C14E68] mov edx,ebx call dword ptr ds:[863F62C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) pop ebx pop esi pop edi pop ebp ret M06_L03: cmp dword ptr [esi+8],0 je short M06_L04 lea ecx,[esi+8] xor eax,eax xchg eax,[ecx] test eax,eax je short M06_L04 mov ecx,eax call dword ptr ds:[863F354]; System.Text.Json.PooledByteBufferWriter.Dispose() M06_L04: pop ebx pop esi pop edi pop ebp ret M06_L05: call dword ptr ds:[8625270] int 3 ; Total bytes of code 164 ``` ### Compare Jit Disasm ```assembly ; System.Text.Json.Document.Tests.Perf_ParseThenWrite.ParseThenWrite() push ebp mov ebp,esp push edi push esi push ebx sub esp,28 xor eax,eax mov [ebp-20],eax mov [ebp-1C],eax mov [ebp-18],eax mov [ebp-14],eax mov esi,ecx mov edi,[esi+8] cmp dword ptr [edi+10],0 jne short M00_L00 cmp dword ptr [edi+0C],0 je near ptr M00_L07 M00_L00: mov ebx,[edi+14] test ebx,ebx je short M00_L02 mov ecx,[ebx+4] mov edx,[ebx+8] test ecx,ecx je near ptr M00_L08 mov eax,[ecx+4] cmp [ecx+4],edx jb near ptr M00_L09 add ecx,8 M00_L01: call dword ptr ds:[548F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) xor ecx,ecx mov [ebx+8],ecx M00_L02: mov ecx,edi call dword ptr ds:[0B8ADA50]; System.Text.Json.Utf8JsonWriter.ResetHelper() mov edi,[esi+4] test edi,edi je short M00_L04 mov ebx,edi mov edi,[ebx+4] M00_L03: xor ecx,ecx mov [ebp-28],ecx mov [ebp-24],ecx lea ecx,[ebp-28] lea edx,[ebp-30] call dword ptr ds:[0BC81D38]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push edi push 0 push ebx push dword ptr [ebp-2C] push dword ptr [ebp-30] xor ecx,ecx xor edx,edx call dword ptr ds:[0BC81BE8]; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) mov [ebp-34],eax mov edx,[esi+8] mov ecx,eax cmp [ecx],ecx call dword ptr ds:[0BC816A8]; System.Text.Json.JsonDocument.WriteTo(System.Text.Json.Utf8JsonWriter) mov ecx,[ebp-34] call dword ptr ds:[0BC2F710]; System.Text.Json.JsonDocument.Dispose() jmp short M00_L06 M00_L04: xor ebx,ebx xor edi,edi jmp short M00_L03 cmp dword ptr [ebp-34],0 je short M00_L05 mov ecx,[ebp-34] call dword ptr ds:[0BC2F710]; System.Text.Json.JsonDocument.Dispose() M00_L05: pop eax jmp eax M00_L06: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M00_L07: call dword ptr ds:[0BC13A98] int 3 M00_L08: test edx,edx jne short M00_L09 xor ecx,ecx xor edx,edx jmp near ptr M00_L01 M00_L09: call dword ptr ds:[8E95270] int 3 ; Total bytes of code 237 ``` ```assembly ; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push ebp mov ebp,esp push edi push esi push ebx M01_L00: test edx,edx je short M01_L08 xor eax,eax mov esi,edx sub esi,1 sbb eax,0 cmp esi,16 sbb eax,0 jb short M01_L09 M01_L01: cmp edx,200 jae near ptr M01_L15 xor edi,edi mov eax,ecx test al,3 jne near ptr M01_L16 M01_L02: mov eax,ecx dec eax test al,4 je short M01_L10 M01_L03: lea eax,[edx-10] sub edx,edi M01_L04: lea esi,[edi+10] xor ebx,ebx mov [ecx+edi],ebx mov [ecx+edi+4],ebx mov [ecx+edi+8],ebx mov [ecx+edi+0C],ebx mov edi,esi cmp edi,eax jbe short M01_L04 test dl,8 je short M01_L05 xor eax,eax mov [ecx+edi],eax mov [ecx+edi+4],eax add edi,8 M01_L05: test dl,4 jne short M01_L13 M01_L06: test dl,2 jne short M01_L11 M01_L07: test dl,1 jne short M01_L12 M01_L08: pop ebx pop esi pop edi pop ebp ret M01_L09: cmp esi,0B jne short M01_L14 xor edx,edx mov [ecx],edx mov [ecx+4],edx mov [ecx+8],edx jmp short M01_L08 M01_L10: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L03 M01_L11: mov word ptr [ecx+edi],0 add edi,2 jmp short M01_L07 M01_L12: mov byte ptr [ecx+edi],0 jmp short M01_L08 M01_L13: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L06 M01_L14: cmp esi,15 ja near ptr M01_L01 lea eax,ds:[0BF65400] mov eax,[eax+esi*4] lea edx,[M01_L00] add eax,edx jmp eax xor eax,eax mov [ecx],eax jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 mov byte ptr [ecx+6],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov byte ptr [ecx+4],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 mov byte ptr [ecx+12],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov byte ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 mov byte ptr [ecx+0E],0 jmp near ptr M01_L08 M01_L15: call dword ptr ds:[5511870] jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov word ptr [ecx+14],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 mov byte ptr [ecx+0A],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov byte ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov byte ptr [ecx+10],0 jmp near ptr M01_L08 mov word ptr [ecx],0 jmp near ptr M01_L08 mov word ptr [ecx],0 mov byte ptr [ecx+2],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov byte ptr [ecx+14],0 jmp near ptr M01_L08 M01_L16: mov eax,ecx test al,1 je short M01_L17 mov byte ptr [ecx],0 mov edi,1 mov eax,ecx test al,2 jne near ptr M01_L02 M01_L17: mov word ptr [ecx+edi],0 add edi,2 jmp near ptr M01_L02 mov byte ptr [ecx],0 jmp near ptr M01_L08 ; Total bytes of code 635 ``` ```assembly ; System.Text.Json.Utf8JsonWriter.ResetHelper() vzeroupper xor eax,eax mov [ecx+1C],eax lea eax,[ecx+4] xor edx,edx mov [eax],edx mov [eax+4],edx mov [ecx+24],edx mov [ecx+28],edx mov [ecx+2C],edx mov byte ptr [ecx+20],0 mov byte ptr [ecx+22],0 mov byte ptr [ecx+21],0 mov [ecx+18],edx vxorps xmm0,xmm0,xmm0 vmovq qword ptr [ecx+30],xmm0 vmovq qword ptr [ecx+38],xmm0 ret ; Total bytes of code 57 ``` ```assembly ; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebp mov ebp,esp push ebx movzx eax,byte ptr [ecx+5] movzx ebx,byte ptr [ecx+4] cmp ebx,2 jg short M03_L00 mov ecx,[ecx] test ecx,ecx jl short M03_L01 mov [edx],ecx mov [edx+4],bl mov [edx+5],al pop ebx pop ebp ret M03_L00: mov ecx,2C4E mov edx,0B876258 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0BC13588] int 3 M03_L01: mov ecx,2C4E mov edx,0B876258 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0BC13558] int 3 ; Total bytes of code 82 ``` ```assembly ; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) push ebp mov ebp,esp push edi push esi push ebx sub esp,44 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-48],xmm4 vmovdqu xmmword ptr [ebp-38],xmm4 xor eax,eax mov [ebp-28],eax mov [ebp-24],eax mov [ebp-18],eax mov [ebp-50],edx mov ebx,ecx xor ecx,ecx xor edx,edx mov eax,[ebp+10] test eax,eax je short M04_L01 mov ecx,[eax] test dword ptr [ecx],80000000 je near ptr M04_L05 lea ecx,[eax+8] mov edx,[eax+4] M04_L00: mov eax,[ebp+14] and eax,7FFFFFFF mov edi,[ebp+18] cmp eax,edx ja near ptr M04_L06 sub edx,eax cmp edx,edi jb near ptr M04_L06 add ecx,eax mov edx,edi M04_L01: mov edi,ecx mov eax,edx mov [ebp-4C],eax mov edx,[ebp+18] add edx,0C mov ecx,100000 cmp edx,400000 cmovg ecx,edx cmp edx,100000 cmovg edx,ecx mov ecx,ds:[76B4E64] call dword ptr ds:[0BC2FE38]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-2C],eax xor ecx,ecx mov [ebp-28],ecx mov byte ptr [ebp-24],0 mov byte ptr [ebp-23],0 mov ecx,ds:[76B4E64] mov edx,200 call dword ptr ds:[0BC2FE38]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-34],eax mov ecx,[ebp-34] mov ecx,[ecx+4] mov [ebp-30],ecx push dword ptr [ebp-4C] push edi push dword ptr [ebp+0C] push dword ptr [ebp+8] lea ecx,[ebp-2C] lea edx,[ebp-34] call dword ptr ds:[0BC81A08]; System.Text.Json.JsonDocument.Parse(System.ReadOnlySpan`1, System.Text.Json.JsonReaderOptions, MetadataDb ByRef, StackRowStack ByRef) jmp short M04_L02 lea ecx,[ebp-2C] call dword ptr ds:[0BC81528]; System.Text.Json.JsonDocument+MetadataDb.Dispose() call CORINFO_HELP_RETHROW int 3 M04_L02: mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M04_L04 push 0 mov ecx,ds:[76B4E64] call dword ptr ds:[0BC2FE3C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) jmp short M04_L04 mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M04_L03 push 0 mov ecx,ds:[76B4E64] call dword ptr ds:[0BC2FE3C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) M04_L03: pop eax jmp eax M04_L04: mov ecx,offset MT_System.Text.Json.JsonDocument call CORINFO_HELP_NEWSFAST lea edi,[ebp-48] lea esi,[ebp-2C] movsd movsd movsd lea edi,[eax+10] lea esi,[ebp+10] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edi,[eax+1C] lea esi,[ebp-48] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[eax+8] mov esi,[ebp-50] call CORINFO_HELP_ASSIGN_REF_ESI mov byte ptr [eax+0C],1 lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 14 M04_L05: lea edx,[ebp-3C] mov ecx,eax mov eax,[eax] mov eax,[eax+28] call dword ptr [eax+14] mov ecx,[ebp-3C] mov edx,[ebp-38] jmp near ptr M04_L00 M04_L06: call dword ptr ds:[8E95270] int 3 ; Total bytes of code 407 ``` ```assembly ; System.Text.Json.JsonDocument.WriteTo(System.Text.Json.Utf8JsonWriter) push ebp mov ebp,esp push esi test edx,edx je short M05_L00 test ecx,ecx je short M05_L01 push edx xor edx,edx call dword ptr ds:[0BC81978]; System.Text.Json.JsonDocument.WriteElementTo(Int32, System.Text.Json.Utf8JsonWriter) pop esi pop ebp ret M05_L00: mov ecx,2C16 mov edx,0B876258 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0BC13540] int 3 M05_L01: mov ecx,offset MT_System.InvalidOperationException call CORINFO_HELP_NEWSFAST mov esi,eax mov ecx,esi call dword ptr ds:[8E3FCC0] mov ecx,esi call CORINFO_HELP_THROW int 3 ; Total bytes of code 76 ``` ```assembly ; System.Text.Json.JsonDocument.Dispose() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+18] test edi,edi je short M06_L00 cmp byte ptr [esi+0C],0 jne short M06_L01 M06_L00: pop ebx pop esi pop edi pop ebp ret M06_L01: lea ebx,[esi+1C] xor ecx,ecx mov edx,ecx xchg edx,[ebx] test edx,edx je short M06_L02 push 0 mov ecx,ds:[76B4E64] call dword ptr ds:[0BC2FE3C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) xor ecx,ecx mov [ebx+4],ecx M06_L02: xor ecx,ecx mov [esi+10],ecx mov [esi+14],ecx mov [esi+18],ecx cmp dword ptr [esi+4],0 je short M06_L03 add esi,4 xor ecx,ecx mov ebx,ecx xchg ebx,[esi] test ebx,ebx je short M06_L04 mov ecx,[ebx+4] cmp ecx,edi jb short M06_L05 lea ecx,[ebx+8] mov edx,edi call dword ptr ds:[548F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push 0 mov ecx,ds:[76B4E64] mov edx,ebx call dword ptr ds:[0BC2FE3C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) pop ebx pop esi pop edi pop ebp ret M06_L03: cmp dword ptr [esi+8],0 je short M06_L04 lea ecx,[esi+8] xor eax,eax xchg eax,[ecx] test eax,eax je short M06_L04 mov ecx,eax call dword ptr ds:[0BC2FB64]; System.Text.Json.PooledByteBufferWriter.Dispose() M06_L04: pop ebx pop esi pop edi pop ebp ret M06_L05: call dword ptr ds:[8E95270] int 3 ; Total bytes of code 164 ``` #### System.Text.Json.Document.Tests.Perf_ParseThenWrite.ParseThenWrite(IsDataIndented: True, TestCase: Json400KB) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 2.2781484684684683 < 2.4407909931271474. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 165.1915948204949 (T) = (0 -2269452.591696346) / Math.Sqrt((156686766.02890855 / (299)) + (79193609.90309018 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.11920626267548293 = (2576599.3734128876 - 2269452.591696346) / 2576599.3734128876 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Text.Json.Document.Tests.Perf_ParseThenWrite.ParseThenWrite() push ebp mov ebp,esp push edi push esi push ebx sub esp,28 xor eax,eax mov [ebp-20],eax mov [ebp-1C],eax mov [ebp-18],eax mov [ebp-14],eax mov esi,ecx mov edi,[esi+8] cmp dword ptr [edi+10],0 jne short M00_L00 cmp dword ptr [edi+0C],0 je near ptr M00_L07 M00_L00: mov ebx,[edi+14] test ebx,ebx je short M00_L02 mov ecx,[ebx+4] mov edx,[ebx+8] test ecx,ecx je near ptr M00_L08 mov eax,[ecx+4] cmp [ecx+4],edx jb near ptr M00_L09 add ecx,8 M00_L01: call dword ptr ds:[8A2F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) xor ecx,ecx mov [ebx+8],ecx M00_L02: mov ecx,edi call dword ptr ds:[0BB2D510]; System.Text.Json.Utf8JsonWriter.ResetHelper() mov edi,[esi+4] test edi,edi je short M00_L04 mov ebx,edi mov edi,[ebx+4] M00_L03: xor ecx,ecx mov [ebp-28],ecx mov [ebp-24],ecx lea ecx,[ebp-28] lea edx,[ebp-30] call dword ptr ds:[0BC296F0]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push edi push 0 push ebx push dword ptr [ebp-2C] push dword ptr [ebp-30] xor ecx,ecx xor edx,edx call dword ptr ds:[0BC295A0]; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) mov [ebp-34],eax mov edx,[esi+8] mov ecx,eax cmp [ecx],ecx call dword ptr ds:[0BC29060]; System.Text.Json.JsonDocument.WriteTo(System.Text.Json.Utf8JsonWriter) mov ecx,[ebp-34] call dword ptr ds:[9134BE8]; System.Text.Json.JsonDocument.Dispose() jmp short M00_L06 M00_L04: xor ebx,ebx xor edi,edi jmp short M00_L03 cmp dword ptr [ebp-34],0 je short M00_L05 mov ecx,[ebp-34] call dword ptr ds:[9134BE8]; System.Text.Json.JsonDocument.Dispose() M00_L05: pop eax jmp eax M00_L06: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M00_L07: call dword ptr ds:[0BB59570] int 3 M00_L08: test edx,edx jne short M00_L09 xor ecx,ecx xor edx,edx jmp near ptr M00_L01 M00_L09: call dword ptr ds:[9125270] int 3 ; Total bytes of code 237 ``` ```assembly ; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push ebp mov ebp,esp push edi push esi push ebx M01_L00: test edx,edx je short M01_L08 xor eax,eax mov esi,edx sub esi,1 sbb eax,0 cmp esi,16 sbb eax,0 jb short M01_L09 M01_L01: cmp edx,200 jae near ptr M01_L15 xor edi,edi mov eax,ecx test al,3 jne near ptr M01_L16 M01_L02: mov eax,ecx dec eax test al,4 je short M01_L10 M01_L03: lea eax,[edx-10] sub edx,edi M01_L04: lea esi,[edi+10] xor ebx,ebx mov [ecx+edi],ebx mov [ecx+edi+4],ebx mov [ecx+edi+8],ebx mov [ecx+edi+0C],ebx mov edi,esi cmp edi,eax jbe short M01_L04 test dl,8 je short M01_L05 xor eax,eax mov [ecx+edi],eax mov [ecx+edi+4],eax add edi,8 M01_L05: test dl,4 jne short M01_L13 M01_L06: test dl,2 jne short M01_L11 M01_L07: test dl,1 jne short M01_L12 M01_L08: pop ebx pop esi pop edi pop ebp ret M01_L09: cmp esi,0B jne short M01_L14 xor edx,edx mov [ecx],edx mov [ecx+4],edx mov [ecx+8],edx jmp short M01_L08 M01_L10: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L03 M01_L11: mov word ptr [ecx+edi],0 add edi,2 jmp short M01_L07 M01_L12: mov byte ptr [ecx+edi],0 jmp short M01_L08 M01_L13: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L06 M01_L14: cmp esi,15 ja near ptr M01_L01 lea eax,ds:[0BF28380] mov eax,[eax+esi*4] lea edx,[M01_L00] add eax,edx jmp eax xor eax,eax mov [ecx],eax jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 mov byte ptr [ecx+6],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov byte ptr [ecx+4],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 mov byte ptr [ecx+12],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov byte ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 mov byte ptr [ecx+0E],0 jmp near ptr M01_L08 M01_L15: call dword ptr ds:[9031858] jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov word ptr [ecx+14],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 mov byte ptr [ecx+0A],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov byte ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov byte ptr [ecx+10],0 jmp near ptr M01_L08 mov word ptr [ecx],0 jmp near ptr M01_L08 mov word ptr [ecx],0 mov byte ptr [ecx+2],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov byte ptr [ecx+14],0 jmp near ptr M01_L08 M01_L16: mov eax,ecx test al,1 je short M01_L17 mov byte ptr [ecx],0 mov edi,1 mov eax,ecx test al,2 jne near ptr M01_L02 M01_L17: mov word ptr [ecx+edi],0 add edi,2 jmp near ptr M01_L02 mov byte ptr [ecx],0 jmp near ptr M01_L08 ; Total bytes of code 635 ``` ```assembly ; System.Text.Json.Utf8JsonWriter.ResetHelper() vzeroupper xor eax,eax mov [ecx+1C],eax lea eax,[ecx+4] xor edx,edx mov [eax],edx mov [eax+4],edx mov [ecx+24],edx mov [ecx+28],edx mov [ecx+2C],edx mov byte ptr [ecx+20],0 mov byte ptr [ecx+22],0 mov byte ptr [ecx+21],0 mov [ecx+18],edx vxorps xmm0,xmm0,xmm0 vmovq qword ptr [ecx+30],xmm0 vmovq qword ptr [ecx+38],xmm0 ret ; Total bytes of code 57 ``` ```assembly ; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebp mov ebp,esp push ebx movzx eax,byte ptr [ecx+5] movzx ebx,byte ptr [ecx+4] cmp ebx,2 jg short M03_L00 mov ecx,[ecx] test ecx,ecx jl short M03_L01 mov [edx],ecx mov [edx+4],bl mov [edx+5],al pop ebx pop ebp ret M03_L00: mov ecx,2C7A mov edx,0BB359D0 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0BB59060] int 3 M03_L01: mov ecx,2C7A mov edx,0BB359D0 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0BB59030] int 3 ; Total bytes of code 82 ``` ```assembly ; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) push ebp mov ebp,esp push edi push esi push ebx sub esp,44 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-48],xmm4 vmovdqu xmmword ptr [ebp-38],xmm4 xor eax,eax mov [ebp-28],eax mov [ebp-24],eax mov [ebp-18],eax mov [ebp-50],edx mov ebx,ecx xor ecx,ecx xor edx,edx mov eax,[ebp+10] test eax,eax je short M04_L01 mov ecx,[eax] test dword ptr [ecx],80000000 je near ptr M04_L06 lea ecx,[eax+8] mov edx,[eax+4] M04_L00: mov eax,[ebp+14] and eax,7FFFFFFF mov edi,[ebp+18] cmp eax,edx ja near ptr M04_L07 sub edx,eax cmp edx,edi jb near ptr M04_L07 add ecx,eax mov edx,edi M04_L01: mov edi,ecx mov eax,edx mov [ebp-4C],eax mov edx,[ebp+18] add edx,0C cmp edx,100000 jle short M04_L02 cmp edx,400000 jg short M04_L02 mov edx,100000 M04_L02: mov ecx,ds:[77C2004] call dword ptr ds:[9135310]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-2C],eax xor ecx,ecx mov [ebp-28],ecx mov byte ptr [ebp-24],0 mov byte ptr [ebp-23],0 mov ecx,ds:[77C2004] mov edx,200 call dword ptr ds:[9135310]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-34],eax mov ecx,[ebp-34] mov ecx,[ecx+4] mov [ebp-30],ecx push dword ptr [ebp-4C] push edi push dword ptr [ebp+0C] push dword ptr [ebp+8] lea ecx,[ebp-2C] lea edx,[ebp-34] call dword ptr ds:[0BC293C0]; System.Text.Json.JsonDocument.Parse(System.ReadOnlySpan`1, System.Text.Json.JsonReaderOptions, MetadataDb ByRef, StackRowStack ByRef) jmp short M04_L03 lea ecx,[ebp-2C] call dword ptr ds:[0BC27BA0]; System.Text.Json.JsonDocument+MetadataDb.Dispose() call CORINFO_HELP_RETHROW int 3 M04_L03: mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M04_L05 push 0 mov ecx,ds:[77C2004] call dword ptr ds:[9135314]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) jmp short M04_L05 mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M04_L04 push 0 mov ecx,ds:[77C2004] call dword ptr ds:[9135314]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) M04_L04: pop eax jmp eax M04_L05: mov ecx,offset MT_System.Text.Json.JsonDocument call CORINFO_HELP_NEWSFAST lea edi,[ebp-48] lea esi,[ebp-2C] movsd movsd movsd lea edi,[eax+10] lea esi,[ebp+10] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edi,[eax+1C] lea esi,[ebp-48] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[eax+8] mov esi,[ebp-50] call CORINFO_HELP_ASSIGN_REF_ESI mov byte ptr [eax+0C],1 lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 14 M04_L06: lea edx,[ebp-3C] mov ecx,eax mov eax,[eax] mov eax,[eax+28] call dword ptr [eax+14] mov ecx,[ebp-3C] mov edx,[ebp-38] jmp near ptr M04_L00 M04_L07: call dword ptr ds:[9125270] int 3 ; Total bytes of code 405 ``` ```assembly ; System.Text.Json.JsonDocument.WriteTo(System.Text.Json.Utf8JsonWriter) push ebp mov ebp,esp push esi test edx,edx je short M05_L00 test ecx,ecx je short M05_L01 push edx xor edx,edx call dword ptr ds:[0BC29330]; System.Text.Json.JsonDocument.WriteElementTo(Int32, System.Text.Json.Utf8JsonWriter) pop esi pop ebp ret M05_L00: mov ecx,2C42 mov edx,0BB359D0 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0BB59018] int 3 M05_L01: mov ecx,offset MT_System.InvalidOperationException call CORINFO_HELP_NEWSFAST mov esi,eax mov ecx,esi call dword ptr ds:[90CFCC0] mov ecx,esi call CORINFO_HELP_THROW int 3 ; Total bytes of code 76 ``` ```assembly ; System.Text.Json.JsonDocument.Dispose() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+18] test edi,edi je short M06_L00 cmp byte ptr [esi+0C],0 jne short M06_L01 M06_L00: pop ebx pop esi pop edi pop ebp ret M06_L01: lea ebx,[esi+1C] xor ecx,ecx mov edx,ecx xchg edx,[ebx] test edx,edx je short M06_L02 push 0 mov ecx,ds:[77C2004] call dword ptr ds:[9135314]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) xor ecx,ecx mov [ebx+4],ecx M06_L02: xor ecx,ecx mov [esi+10],ecx mov [esi+14],ecx mov [esi+18],ecx cmp dword ptr [esi+4],0 je short M06_L03 add esi,4 xor ecx,ecx mov ebx,ecx xchg ebx,[esi] test ebx,ebx je short M06_L04 mov ecx,[ebx+4] cmp ecx,edi jb short M06_L05 lea ecx,[ebx+8] mov edx,edi call dword ptr ds:[8A2F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push 0 mov ecx,ds:[77C2004] mov edx,ebx call dword ptr ds:[9135314]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) pop ebx pop esi pop edi pop ebp ret M06_L03: cmp dword ptr [esi+8],0 je short M06_L04 lea ecx,[esi+8] xor eax,eax xchg eax,[ecx] test eax,eax je short M06_L04 mov ecx,eax call dword ptr ds:[913503C]; System.Text.Json.PooledByteBufferWriter.Dispose() M06_L04: pop ebx pop esi pop edi pop ebp ret M06_L05: call dword ptr ds:[9125270] int 3 ; Total bytes of code 164 ``` ### Compare Jit Disasm ```assembly ; System.Text.Json.Document.Tests.Perf_ParseThenWrite.ParseThenWrite() push ebp mov ebp,esp push edi push esi push ebx sub esp,28 xor eax,eax mov [ebp-20],eax mov [ebp-1C],eax mov [ebp-18],eax mov [ebp-14],eax mov esi,ecx mov edi,[esi+8] cmp dword ptr [edi+10],0 jne short M00_L00 cmp dword ptr [edi+0C],0 je near ptr M00_L07 M00_L00: mov ebx,[edi+14] test ebx,ebx je short M00_L02 mov ecx,[ebx+4] mov edx,[ebx+8] test ecx,ecx je near ptr M00_L08 mov eax,[ecx+4] cmp [ecx+4],edx jb near ptr M00_L09 add ecx,8 M00_L01: call dword ptr ds:[8ABF390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) xor ecx,ecx mov [ebx+8],ecx M00_L02: mov ecx,edi call dword ptr ds:[0BBCDA50]; System.Text.Json.Utf8JsonWriter.ResetHelper() mov edi,[esi+4] test edi,edi je short M00_L04 mov ebx,edi mov edi,[ebx+4] M00_L03: xor ecx,ecx mov [ebp-28],ecx mov [ebp-24],ecx lea ecx,[ebp-28] lea edx,[ebp-30] call dword ptr ds:[0BCB96F0]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push edi push 0 push ebx push dword ptr [ebp-2C] push dword ptr [ebp-30] xor ecx,ecx xor edx,edx call dword ptr ds:[0BCB95A0]; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) mov [ebp-34],eax mov edx,[esi+8] mov ecx,eax cmp [ecx],ecx call dword ptr ds:[0BCB9060]; System.Text.Json.JsonDocument.WriteTo(System.Text.Json.Utf8JsonWriter) mov ecx,[ebp-34] call dword ptr ds:[91C52E0]; System.Text.Json.JsonDocument.Dispose() jmp short M00_L06 M00_L04: xor ebx,ebx xor edi,edi jmp short M00_L03 cmp dword ptr [ebp-34],0 je short M00_L05 mov ecx,[ebp-34] call dword ptr ds:[91C52E0]; System.Text.Json.JsonDocument.Dispose() M00_L05: pop eax jmp eax M00_L06: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M00_L07: call dword ptr ds:[0BBE95B8] int 3 M00_L08: test edx,edx jne short M00_L09 xor ecx,ecx xor edx,edx jmp near ptr M00_L01 M00_L09: call dword ptr ds:[91B5270] int 3 ; Total bytes of code 237 ``` ```assembly ; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push ebp mov ebp,esp push edi push esi push ebx M01_L00: test edx,edx je short M01_L08 xor eax,eax mov esi,edx sub esi,1 sbb eax,0 cmp esi,16 sbb eax,0 jb short M01_L09 M01_L01: cmp edx,200 jae near ptr M01_L15 xor edi,edi mov eax,ecx test al,3 jne near ptr M01_L16 M01_L02: mov eax,ecx dec eax test al,4 je short M01_L10 M01_L03: lea eax,[edx-10] sub edx,edi M01_L04: lea esi,[edi+10] xor ebx,ebx mov [ecx+edi],ebx mov [ecx+edi+4],ebx mov [ecx+edi+8],ebx mov [ecx+edi+0C],ebx mov edi,esi cmp edi,eax jbe short M01_L04 test dl,8 je short M01_L05 xor eax,eax mov [ecx+edi],eax mov [ecx+edi+4],eax add edi,8 M01_L05: test dl,4 jne short M01_L13 M01_L06: test dl,2 jne short M01_L11 M01_L07: test dl,1 jne short M01_L12 M01_L08: pop ebx pop esi pop edi pop ebp ret M01_L09: cmp esi,0B jne short M01_L14 xor edx,edx mov [ecx],edx mov [ecx+4],edx mov [ecx+8],edx jmp short M01_L08 M01_L10: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L03 M01_L11: mov word ptr [ecx+edi],0 add edi,2 jmp short M01_L07 M01_L12: mov byte ptr [ecx+edi],0 jmp short M01_L08 M01_L13: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L06 M01_L14: cmp esi,15 ja near ptr M01_L01 lea eax,ds:[0BFB72C0] mov eax,[eax+esi*4] lea edx,[M01_L00] add eax,edx jmp eax xor eax,eax mov [ecx],eax jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 mov byte ptr [ecx+6],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov byte ptr [ecx+4],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 mov byte ptr [ecx+12],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov byte ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 mov byte ptr [ecx+0E],0 jmp near ptr M01_L08 M01_L15: call dword ptr ds:[90C1870] jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov word ptr [ecx+14],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 mov byte ptr [ecx+0A],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov byte ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov byte ptr [ecx+10],0 jmp near ptr M01_L08 mov word ptr [ecx],0 jmp near ptr M01_L08 mov word ptr [ecx],0 mov byte ptr [ecx+2],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov byte ptr [ecx+14],0 jmp near ptr M01_L08 M01_L16: mov eax,ecx test al,1 je short M01_L17 mov byte ptr [ecx],0 mov edi,1 mov eax,ecx test al,2 jne near ptr M01_L02 M01_L17: mov word ptr [ecx+edi],0 add edi,2 jmp near ptr M01_L02 mov byte ptr [ecx],0 jmp near ptr M01_L08 ; Total bytes of code 635 ``` ```assembly ; System.Text.Json.Utf8JsonWriter.ResetHelper() vzeroupper xor eax,eax mov [ecx+1C],eax lea eax,[ecx+4] xor edx,edx mov [eax],edx mov [eax+4],edx mov [ecx+24],edx mov [ecx+28],edx mov [ecx+2C],edx mov byte ptr [ecx+20],0 mov byte ptr [ecx+22],0 mov byte ptr [ecx+21],0 mov [ecx+18],edx vxorps xmm0,xmm0,xmm0 vmovq qword ptr [ecx+30],xmm0 vmovq qword ptr [ecx+38],xmm0 ret ; Total bytes of code 57 ``` ```assembly ; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebp mov ebp,esp push ebx movzx eax,byte ptr [ecx+5] movzx ebx,byte ptr [ecx+4] cmp ebx,2 jg short M03_L00 mov ecx,[ecx] test ecx,ecx jl short M03_L01 mov [edx],ecx mov [edx+4],bl mov [edx+5],al pop ebx pop ebp ret M03_L00: mov ecx,2C4E mov edx,0BB96258 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0BBE90A8] int 3 M03_L01: mov ecx,2C4E mov edx,0BB96258 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0BBE9078] int 3 ; Total bytes of code 82 ``` ```assembly ; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) push ebp mov ebp,esp push edi push esi push ebx sub esp,44 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-48],xmm4 vmovdqu xmmword ptr [ebp-38],xmm4 xor eax,eax mov [ebp-28],eax mov [ebp-24],eax mov [ebp-18],eax mov [ebp-50],edx mov ebx,ecx xor ecx,ecx xor edx,edx mov eax,[ebp+10] test eax,eax je short M04_L01 mov ecx,[eax] test dword ptr [ecx],80000000 je near ptr M04_L05 lea ecx,[eax+8] mov edx,[eax+4] M04_L00: mov eax,[ebp+14] and eax,7FFFFFFF mov edi,[ebp+18] cmp eax,edx ja near ptr M04_L06 sub edx,eax cmp edx,edi jb near ptr M04_L06 add ecx,eax mov edx,edi M04_L01: mov edi,ecx mov eax,edx mov [ebp-4C],eax mov edx,[ebp+18] add edx,0C mov ecx,100000 cmp edx,400000 cmovg ecx,edx cmp edx,100000 cmovg edx,ecx mov ecx,ds:[78D5448] call dword ptr ds:[91C5A08]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-2C],eax xor ecx,ecx mov [ebp-28],ecx mov byte ptr [ebp-24],0 mov byte ptr [ebp-23],0 mov ecx,ds:[78D5448] mov edx,200 call dword ptr ds:[91C5A08]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-34],eax mov ecx,[ebp-34] mov ecx,[ecx+4] mov [ebp-30],ecx push dword ptr [ebp-4C] push edi push dword ptr [ebp+0C] push dword ptr [ebp+8] lea ecx,[ebp-2C] lea edx,[ebp-34] call dword ptr ds:[0BCB93C0]; System.Text.Json.JsonDocument.Parse(System.ReadOnlySpan`1, System.Text.Json.JsonReaderOptions, MetadataDb ByRef, StackRowStack ByRef) jmp short M04_L02 lea ecx,[ebp-2C] call dword ptr ds:[0BCB7BA0]; System.Text.Json.JsonDocument+MetadataDb.Dispose() call CORINFO_HELP_RETHROW int 3 M04_L02: mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M04_L04 push 0 mov ecx,ds:[78D5448] call dword ptr ds:[91C5A0C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) jmp short M04_L04 mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M04_L03 push 0 mov ecx,ds:[78D5448] call dword ptr ds:[91C5A0C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) M04_L03: pop eax jmp eax M04_L04: mov ecx,offset MT_System.Text.Json.JsonDocument call CORINFO_HELP_NEWSFAST lea edi,[ebp-48] lea esi,[ebp-2C] movsd movsd movsd lea edi,[eax+10] lea esi,[ebp+10] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edi,[eax+1C] lea esi,[ebp-48] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[eax+8] mov esi,[ebp-50] call CORINFO_HELP_ASSIGN_REF_ESI mov byte ptr [eax+0C],1 lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 14 M04_L05: lea edx,[ebp-3C] mov ecx,eax mov eax,[eax] mov eax,[eax+28] call dword ptr [eax+14] mov ecx,[ebp-3C] mov edx,[ebp-38] jmp near ptr M04_L00 M04_L06: call dword ptr ds:[91B5270] int 3 ; Total bytes of code 407 ``` ```assembly ; System.Text.Json.JsonDocument.WriteTo(System.Text.Json.Utf8JsonWriter) push ebp mov ebp,esp push esi test edx,edx je short M05_L00 test ecx,ecx je short M05_L01 push edx xor edx,edx call dword ptr ds:[0BCB9330]; System.Text.Json.JsonDocument.WriteElementTo(Int32, System.Text.Json.Utf8JsonWriter) pop esi pop ebp ret M05_L00: mov ecx,2C16 mov edx,0BB96258 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0BBE9060] int 3 M05_L01: mov ecx,offset MT_System.InvalidOperationException call CORINFO_HELP_NEWSFAST mov esi,eax mov ecx,esi call dword ptr ds:[915FCC0] mov ecx,esi call CORINFO_HELP_THROW int 3 ; Total bytes of code 76 ``` ```assembly ; System.Text.Json.JsonDocument.Dispose() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+18] test edi,edi je short M06_L00 cmp byte ptr [esi+0C],0 jne short M06_L01 M06_L00: pop ebx pop esi pop edi pop ebp ret M06_L01: lea ebx,[esi+1C] xor ecx,ecx mov edx,ecx xchg edx,[ebx] test edx,edx je short M06_L02 push 0 mov ecx,ds:[78D5448] call dword ptr ds:[91C5A0C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) xor ecx,ecx mov [ebx+4],ecx M06_L02: xor ecx,ecx mov [esi+10],ecx mov [esi+14],ecx mov [esi+18],ecx cmp dword ptr [esi+4],0 je short M06_L03 add esi,4 xor ecx,ecx mov ebx,ecx xchg ebx,[esi] test ebx,ebx je short M06_L04 mov ecx,[ebx+4] cmp ecx,edi jb short M06_L05 lea ecx,[ebx+8] mov edx,edi call dword ptr ds:[8ABF390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push 0 mov ecx,ds:[78D5448] mov edx,ebx call dword ptr ds:[91C5A0C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) pop ebx pop esi pop edi pop ebp ret M06_L03: cmp dword ptr [esi+8],0 je short M06_L04 lea ecx,[esi+8] xor eax,eax xchg eax,[ecx] test eax,eax je short M06_L04 mov ecx,eax call dword ptr ds:[91C5734]; System.Text.Json.PooledByteBufferWriter.Dispose() M06_L04: pop ebx pop esi pop edi pop ebp ret M06_L05: call dword ptr ds:[91B5270] int 3 ; Total bytes of code 164 ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)
performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in System.Text.Json.Serialization.Tests.ReadJson<LoginViewModel>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[DeserializeFromReader - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(LoginViewModel).DeserializeFromReader(Mode%3a%20SourceGen).html>) 877.33 ns 821.22 ns 0.94 0.02 False
[DeserializeFromReader - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(LoginViewModel).DeserializeFromReader(Mode%3a%20Reflection).html>) 888.77 ns 816.21 ns 0.92 0.02 False

graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Serialization.Tests.ReadJson&lt;LoginViewModel&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Text.Json.Serialization.Tests.ReadJson<LoginViewModel>.DeserializeFromReader(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 821.2196308693281 < 831.8937370091714. IsChangePoint: Marked as a change because one of 1/13/2023 11:01:49 AM, 1/18/2023 9:06:44 AM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 30.92761564386438 (T) = (0 -824.7206270717614) / Math.Sqrt((215.22669732334697 / (299)) + (95.24980308389102 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.07174295254032886 = (888.4614766230386 - 824.7206270717614) / 888.4614766230386 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.Text.Json.Serialization.Tests.ReadJson<LoginViewModel>.DeserializeFromReader(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 816.2074418661031 < 836.2571722675916. IsChangePoint: Marked as a change because one of 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 44.892872280222875 (T) = (0 -818.9845752598694) / Math.Sqrt((183.77280359572154 / (299)) + (38.02264572644792 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.07232394397576149 = (882.8346597300457 - 818.9845752598694) / 882.8346597300457 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in System.Text.Json.Document.Tests.Perf_EnumerateArray

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[Parse - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Document.Tests.Perf_EnumerateArray.Parse(TestCase%3a%20Json400KB).html>) 1.17 ms 884.39 μs 0.76 0.00 False 9606845.238095239 8514814.814814813 0.886327884314191) Trace Trace
[Parse - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Document.Tests.Perf_EnumerateArray.Parse(TestCase%3a%20ArrayOfStrings).html>) 14.57 μs 12.06 μs 0.83 0.01 False 134162.7358490566 123052.46422893481 0.9171880958612704) Trace Trace

graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Document.Tests.Perf_EnumerateArray*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Text.Json.Document.Tests.Perf_EnumerateArray.Parse(TestCase: Json400KB) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 884.3901537698414 < 1.1123331130420917. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 189.05638310572016 (T) = (0 -883547.0129561797) / Math.Sqrt((20686400.15655804 / (299)) + (60615719.91216219 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.24557293810616335 = (1171149.681107957 - 883547.0129561797) / 1171149.681107957 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Text.Json.Document.Tests.Perf_EnumerateArray.Parse() push ebp mov ebp,esp push edi push esi push ebx sub esp,28 xor eax,eax mov [ebp-20],eax mov [ebp-1C],eax mov [ebp-18],eax mov [ebp-14],eax mov esi,[ecx+4] test esi,esi je short M00_L01 mov edi,esi mov ebx,[edi+4] M00_L00: xor ecx,ecx mov [ebp-28],ecx mov [ebp-24],ecx lea ecx,[ebp-28] lea edx,[ebp-30] call dword ptr ds:[0B07D6F0]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebx push 0 push edi push dword ptr [ebp-2C] push dword ptr [ebp-30] xor ecx,ecx xor edx,edx call dword ptr ds:[0B07F768]; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) mov [ebp-34],eax cmp [eax],al mov ecx,eax call dword ptr ds:[0B0B81D8]; System.Text.Json.JsonDocument.Dispose() jmp short M00_L03 M00_L01: xor edi,edi xor ebx,ebx jmp short M00_L00 cmp dword ptr [ebp-34],0 je short M00_L02 mov ecx,[ebp-34] call dword ptr ds:[0B0B81D8]; System.Text.Json.JsonDocument.Dispose() M00_L02: pop eax jmp eax M00_L03: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 122 ``` ```assembly ; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebp mov ebp,esp push ebx movzx eax,byte ptr [ecx+5] movzx ebx,byte ptr [ecx+4] cmp ebx,2 jg short M01_L00 mov ecx,[ecx] test ecx,ecx jl short M01_L01 mov [edx],ecx mov [edx+4],bl mov [edx+5],al pop ebx pop ebp ret M01_L00: mov ecx,2C7A mov edx,0A776BCC call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B34D5D0] int 3 M01_L01: mov ecx,2C7A mov edx,0A776BCC call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B34D5A0] int 3 ; Total bytes of code 82 ``` ```assembly ; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) push ebp mov ebp,esp push edi push esi push ebx sub esp,44 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-48],xmm4 vmovdqu xmmword ptr [ebp-38],xmm4 xor eax,eax mov [ebp-28],eax mov [ebp-24],eax mov [ebp-18],eax mov [ebp-50],edx mov ebx,ecx xor ecx,ecx xor edx,edx mov eax,[ebp+10] test eax,eax je short M02_L01 mov ecx,[eax] test dword ptr [ecx],80000000 je near ptr M02_L06 lea ecx,[eax+8] mov edx,[eax+4] M02_L00: mov eax,[ebp+14] and eax,7FFFFFFF mov edi,[ebp+18] cmp eax,edx ja near ptr M02_L07 sub edx,eax cmp edx,edi jb near ptr M02_L07 add ecx,eax mov edx,edi M02_L01: mov edi,ecx mov eax,edx mov [ebp-4C],eax mov edx,[ebp+18] add edx,0C cmp edx,100000 jle short M02_L02 cmp edx,400000 jg short M02_L02 mov edx,100000 M02_L02: mov ecx,ds:[6BE1F80] call dword ptr ds:[0B357A84]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-2C],eax xor ecx,ecx mov [ebp-28],ecx mov byte ptr [ebp-24],0 mov byte ptr [ebp-23],0 mov ecx,ds:[6BE1F80] mov edx,200 call dword ptr ds:[0B357A84]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-34],eax mov ecx,[ebp-34] mov ecx,[ecx+4] mov [ebp-30],ecx push dword ptr [ebp-4C] push edi push dword ptr [ebp+0C] push dword ptr [ebp+8] lea ecx,[ebp-2C] lea edx,[ebp-34] call dword ptr ds:[0B07F588]; System.Text.Json.JsonDocument.Parse(System.ReadOnlySpan`1, System.Text.Json.JsonReaderOptions, MetadataDb ByRef, StackRowStack ByRef) jmp short M02_L03 lea ecx,[ebp-2C] call dword ptr ds:[0B07F0A8]; System.Text.Json.JsonDocument+MetadataDb.Dispose() call CORINFO_HELP_RETHROW int 3 M02_L03: mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L05 push 0 mov ecx,ds:[6BE1F80] call dword ptr ds:[0B357A88]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) jmp short M02_L05 mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L04 push 0 mov ecx,ds:[6BE1F80] call dword ptr ds:[0B357A88]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) M02_L04: pop eax jmp eax M02_L05: mov ecx,offset MT_System.Text.Json.JsonDocument call CORINFO_HELP_NEWSFAST lea edi,[ebp-48] lea esi,[ebp-2C] movsd movsd movsd lea edi,[eax+10] lea esi,[ebp+10] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edi,[eax+1C] lea esi,[ebp-48] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[eax+8] mov esi,[ebp-50] call CORINFO_HELP_ASSIGN_REF_ESI mov byte ptr [eax+0C],1 lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 14 M02_L06: lea edx,[ebp-3C] mov ecx,eax mov eax,[eax] mov eax,[eax+28] call dword ptr [eax+14] mov ecx,[ebp-3C] mov edx,[ebp-38] jmp near ptr M02_L00 M02_L07: call dword ptr ds:[85F5270] int 3 ; Total bytes of code 405 ``` ```assembly ; System.Text.Json.JsonDocument.Dispose() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+18] test edi,edi je short M03_L00 cmp byte ptr [esi+0C],0 jne short M03_L01 M03_L00: pop ebx pop esi pop edi pop ebp ret M03_L01: lea ebx,[esi+1C] xor ecx,ecx mov edx,ecx xchg edx,[ebx] test edx,edx je short M03_L02 push 0 mov ecx,ds:[6BE1F80] call dword ptr ds:[0B357A88]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) xor ecx,ecx mov [ebx+4],ecx M03_L02: xor ecx,ecx mov [esi+10],ecx mov [esi+14],ecx mov [esi+18],ecx cmp dword ptr [esi+4],0 je short M03_L03 add esi,4 xor ecx,ecx mov ebx,ecx xchg ebx,[esi] test ebx,ebx je short M03_L04 mov ecx,[ebx+4] cmp ecx,edi jb short M03_L05 lea ecx,[ebx+8] mov edx,edi call dword ptr ds:[7F0F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push 0 mov ecx,ds:[6BE1F80] mov edx,ebx call dword ptr ds:[0B357A88]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) pop ebx pop esi pop edi pop ebp ret M03_L03: cmp dword ptr [esi+8],0 je short M03_L04 lea ecx,[esi+8] xor eax,eax xchg eax,[ecx] test eax,eax je short M03_L04 mov ecx,eax call dword ptr ds:[0B357730]; System.Text.Json.PooledByteBufferWriter.Dispose() M03_L04: pop ebx pop esi pop edi pop ebp ret M03_L05: call dword ptr ds:[85F5270] int 3 ; Total bytes of code 164 ``` ### Compare Jit Disasm ```assembly ; System.Text.Json.Document.Tests.Perf_EnumerateArray.Parse() push ebp mov ebp,esp push edi push esi push ebx sub esp,28 xor eax,eax mov [ebp-20],eax mov [ebp-1C],eax mov [ebp-18],eax mov [ebp-14],eax mov esi,[ecx+4] test esi,esi je short M00_L01 mov edi,esi mov ebx,[edi+4] M00_L00: xor ecx,ecx mov [ebp-28],ecx mov [ebp-24],ecx lea ecx,[ebp-28] lea edx,[ebp-30] call dword ptr ds:[0B34D9A8]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebx push 0 push edi push dword ptr [ebp-2C] push dword ptr [ebp-30] xor ecx,ecx xor edx,edx call dword ptr ds:[0B34F9A8]; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) mov [ebp-34],eax cmp [eax],al mov ecx,eax call dword ptr ds:[0B3988E0]; System.Text.Json.JsonDocument.Dispose() jmp short M00_L03 M00_L01: xor edi,edi xor ebx,ebx jmp short M00_L00 cmp dword ptr [ebp-34],0 je short M00_L02 mov ecx,[ebp-34] call dword ptr ds:[0B3988E0]; System.Text.Json.JsonDocument.Dispose() M00_L02: pop eax jmp eax M00_L03: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 122 ``` ```assembly ; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebp mov ebp,esp push ebx movzx eax,byte ptr [ecx+5] movzx ebx,byte ptr [ecx+4] cmp ebx,2 jg short M01_L00 mov ecx,[ecx] test ecx,ecx jl short M01_L01 mov [edx],ecx mov [edx+4],bl mov [edx+5],al pop ebx pop ebp ret M01_L00: mov ecx,2C4E mov edx,0AA66BCC call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B6615D0] int 3 M01_L01: mov ecx,2C4E mov edx,0AA66BCC call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B6615A0] int 3 ; Total bytes of code 82 ``` ```assembly ; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) push ebp mov ebp,esp push edi push esi push ebx sub esp,44 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-48],xmm4 vmovdqu xmmword ptr [ebp-38],xmm4 xor eax,eax mov [ebp-28],eax mov [ebp-24],eax mov [ebp-18],eax mov [ebp-50],edx mov ebx,ecx xor ecx,ecx xor edx,edx mov eax,[ebp+10] test eax,eax je short M02_L01 mov ecx,[eax] test dword ptr [ecx],80000000 je near ptr M02_L05 lea ecx,[eax+8] mov edx,[eax+4] M02_L00: mov eax,[ebp+14] and eax,7FFFFFFF mov edi,[ebp+18] cmp eax,edx ja near ptr M02_L06 sub edx,eax cmp edx,edi jb near ptr M02_L06 add ecx,eax mov edx,edi M02_L01: mov edi,ecx mov eax,edx mov [ebp-4C],eax mov edx,[ebp+18] add edx,0C mov ecx,100000 cmp edx,400000 cmovg ecx,edx cmp edx,100000 cmovg edx,ecx mov ecx,ds:[6FC1F7C] call dword ptr ds:[0B64829C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-2C],eax xor ecx,ecx mov [ebp-28],ecx mov byte ptr [ebp-24],0 mov byte ptr [ebp-23],0 mov ecx,ds:[6FC1F7C] mov edx,200 call dword ptr ds:[0B64829C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-34],eax mov ecx,[ebp-34] mov ecx,[ecx+4] mov [ebp-30],ecx push dword ptr [ebp-4C] push edi push dword ptr [ebp+0C] push dword ptr [ebp+8] lea ecx,[ebp-2C] lea edx,[ebp-34] call dword ptr ds:[0B34F7C8]; System.Text.Json.JsonDocument.Parse(System.ReadOnlySpan`1, System.Text.Json.JsonReaderOptions, MetadataDb ByRef, StackRowStack ByRef) jmp short M02_L02 lea ecx,[ebp-2C] call dword ptr ds:[0B34F2E8]; System.Text.Json.JsonDocument+MetadataDb.Dispose() call CORINFO_HELP_RETHROW int 3 M02_L02: mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L04 push 0 mov ecx,ds:[6FC1F7C] call dword ptr ds:[0B6482A0]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) jmp short M02_L04 mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L03 push 0 mov ecx,ds:[6FC1F7C] call dword ptr ds:[0B6482A0]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) M02_L03: pop eax jmp eax M02_L04: mov ecx,offset MT_System.Text.Json.JsonDocument call CORINFO_HELP_NEWSFAST lea edi,[ebp-48] lea esi,[ebp-2C] movsd movsd movsd lea edi,[eax+10] lea esi,[ebp+10] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edi,[eax+1C] lea esi,[ebp-48] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[eax+8] mov esi,[ebp-50] call CORINFO_HELP_ASSIGN_REF_ESI mov byte ptr [eax+0C],1 lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 14 M02_L05: lea edx,[ebp-3C] mov ecx,eax mov eax,[eax] mov eax,[eax+28] call dword ptr [eax+14] mov ecx,[ebp-3C] mov edx,[ebp-38] jmp near ptr M02_L00 M02_L06: call dword ptr ds:[88E5270] int 3 ; Total bytes of code 407 ``` ```assembly ; System.Text.Json.JsonDocument.Dispose() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+18] test edi,edi je short M03_L00 cmp byte ptr [esi+0C],0 jne short M03_L01 M03_L00: pop ebx pop esi pop edi pop ebp ret M03_L01: lea ebx,[esi+1C] xor ecx,ecx mov edx,ecx xchg edx,[ebx] test edx,edx je short M03_L02 push 0 mov ecx,ds:[6FC1F7C] call dword ptr ds:[0B6482A0]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) xor ecx,ecx mov [ebx+4],ecx M03_L02: xor ecx,ecx mov [esi+10],ecx mov [esi+14],ecx mov [esi+18],ecx cmp dword ptr [esi+4],0 je short M03_L03 add esi,4 xor ecx,ecx mov ebx,ecx xchg ebx,[esi] test ebx,ebx je short M03_L04 mov ecx,[ebx+4] cmp ecx,edi jb short M03_L05 lea ecx,[ebx+8] mov edx,edi call dword ptr ds:[4F8F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push 0 mov ecx,ds:[6FC1F7C] mov edx,ebx call dword ptr ds:[0B6482A0]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) pop ebx pop esi pop edi pop ebp ret M03_L03: cmp dword ptr [esi+8],0 je short M03_L04 lea ecx,[esi+8] xor eax,eax xchg eax,[ecx] test eax,eax je short M03_L04 mov ecx,eax call dword ptr ds:[0B647F48]; System.Text.Json.PooledByteBufferWriter.Dispose() M03_L04: pop ebx pop esi pop edi pop ebp ret M03_L05: call dword ptr ds:[88E5270] int 3 ; Total bytes of code 164 ``` #### System.Text.Json.Document.Tests.Perf_EnumerateArray.Parse(TestCase: ArrayOfStrings) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 12.063076179427688 < 13.869925100782089. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 81.77441353853304 (T) = (0 -12081.974240035586) / Math.Sqrt((9344.738478409565 / (299)) + (24644.44381656187 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.17215412413528583 = (14594.472947534514 - 12081.974240035586) / 14594.472947534514 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Text.Json.Document.Tests.Perf_EnumerateArray.Parse() push ebp mov ebp,esp push edi push esi push ebx sub esp,28 xor eax,eax mov [ebp-20],eax mov [ebp-1C],eax mov [ebp-18],eax mov [ebp-14],eax mov esi,[ecx+4] test esi,esi je short M00_L01 mov edi,esi mov ebx,[edi+4] M00_L00: xor ecx,ecx mov [ebp-28],ecx mov [ebp-24],ecx lea ecx,[ebp-28] lea edx,[ebp-30] call dword ptr ds:[0BA9D6F0]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebx push 0 push edi push dword ptr [ebp-2C] push dword ptr [ebp-30] xor ecx,ecx xor edx,edx call dword ptr ds:[0BA9F768]; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) mov [ebp-34],eax cmp [eax],al mov ecx,eax call dword ptr ds:[0BAD81D8]; System.Text.Json.JsonDocument.Dispose() jmp short M00_L03 M00_L01: xor edi,edi xor ebx,ebx jmp short M00_L00 cmp dword ptr [ebp-34],0 je short M00_L02 mov ecx,[ebp-34] call dword ptr ds:[0BAD81D8]; System.Text.Json.JsonDocument.Dispose() M00_L02: pop eax jmp eax M00_L03: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 122 ``` ```assembly ; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebp mov ebp,esp push ebx movzx eax,byte ptr [ecx+5] movzx ebx,byte ptr [ecx+4] cmp ebx,2 jg short M01_L00 mov ecx,[ecx] test ecx,ecx jl short M01_L01 mov [edx],ecx mov [edx+4],bl mov [edx+5],al pop ebx pop ebp ret M01_L00: mov ecx,2C7A mov edx,0B196BCC call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0BD6BA38] int 3 M01_L01: mov ecx,2C7A mov edx,0B196BCC call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0BD6BA08] int 3 ; Total bytes of code 82 ``` ```assembly ; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) push ebp mov ebp,esp push edi push esi push ebx sub esp,44 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-48],xmm4 vmovdqu xmmword ptr [ebp-38],xmm4 xor eax,eax mov [ebp-28],eax mov [ebp-24],eax mov [ebp-18],eax mov [ebp-50],edx mov ebx,ecx xor ecx,ecx xor edx,edx mov eax,[ebp+10] test eax,eax je short M02_L01 mov ecx,[eax] test dword ptr [ecx],80000000 je near ptr M02_L06 lea ecx,[eax+8] mov edx,[eax+4] M02_L00: mov eax,[ebp+14] and eax,7FFFFFFF mov edi,[ebp+18] cmp eax,edx ja near ptr M02_L07 sub edx,eax cmp edx,edi jb near ptr M02_L07 add ecx,eax mov edx,edi M02_L01: mov edi,ecx mov eax,edx mov [ebp-4C],eax mov edx,[ebp+18] add edx,0C cmp edx,100000 jle short M02_L02 cmp edx,400000 jg short M02_L02 mov edx,100000 M02_L02: mov ecx,ds:[7741F7C] call dword ptr ds:[0BD76618]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-2C],eax xor ecx,ecx mov [ebp-28],ecx mov byte ptr [ebp-24],0 mov byte ptr [ebp-23],0 mov ecx,ds:[7741F7C] mov edx,200 call dword ptr ds:[0BD76618]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-34],eax mov ecx,[ebp-34] mov ecx,[ecx+4] mov [ebp-30],ecx push dword ptr [ebp-4C] push edi push dword ptr [ebp+0C] push dword ptr [ebp+8] lea ecx,[ebp-2C] lea edx,[ebp-34] call dword ptr ds:[0BA9F588]; System.Text.Json.JsonDocument.Parse(System.ReadOnlySpan`1, System.Text.Json.JsonReaderOptions, MetadataDb ByRef, StackRowStack ByRef) jmp short M02_L03 lea ecx,[ebp-2C] call dword ptr ds:[0BA9F0A8]; System.Text.Json.JsonDocument+MetadataDb.Dispose() call CORINFO_HELP_RETHROW int 3 M02_L03: mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L05 push 0 mov ecx,ds:[7741F7C] call dword ptr ds:[0BD7661C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) jmp short M02_L05 mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L04 push 0 mov ecx,ds:[7741F7C] call dword ptr ds:[0BD7661C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) M02_L04: pop eax jmp eax M02_L05: mov ecx,offset MT_System.Text.Json.JsonDocument call CORINFO_HELP_NEWSFAST lea edi,[ebp-48] lea esi,[ebp-2C] movsd movsd movsd lea edi,[eax+10] lea esi,[ebp+10] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edi,[eax+1C] lea esi,[ebp-48] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[eax+8] mov esi,[ebp-50] call CORINFO_HELP_ASSIGN_REF_ESI mov byte ptr [eax+0C],1 lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 14 M02_L06: lea edx,[ebp-3C] mov ecx,eax mov eax,[eax] mov eax,[eax+28] call dword ptr [eax+14] mov ecx,[ebp-3C] mov edx,[ebp-38] jmp near ptr M02_L00 M02_L07: call dword ptr ds:[9015270] int 3 ; Total bytes of code 405 ``` ```assembly ; System.Text.Json.JsonDocument.Dispose() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+18] test edi,edi je short M03_L00 cmp byte ptr [esi+0C],0 jne short M03_L01 M03_L00: pop ebx pop esi pop edi pop ebp ret M03_L01: lea ebx,[esi+1C] xor ecx,ecx mov edx,ecx xchg edx,[ebx] test edx,edx je short M03_L02 push 0 mov ecx,ds:[7741F7C] call dword ptr ds:[0BD7661C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) xor ecx,ecx mov [ebx+4],ecx M03_L02: xor ecx,ecx mov [esi+10],ecx mov [esi+14],ecx mov [esi+18],ecx cmp dword ptr [esi+4],0 je short M03_L03 add esi,4 xor ecx,ecx mov ebx,ecx xchg ebx,[esi] test ebx,ebx je short M03_L04 mov ecx,[ebx+4] cmp ecx,edi jb short M03_L05 lea ecx,[ebx+8] mov edx,edi call dword ptr ds:[892F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push 0 mov ecx,ds:[7741F7C] mov edx,ebx call dword ptr ds:[0BD7661C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) pop ebx pop esi pop edi pop ebp ret M03_L03: cmp dword ptr [esi+8],0 je short M03_L04 lea ecx,[esi+8] xor eax,eax xchg eax,[ecx] test eax,eax je short M03_L04 mov ecx,eax call dword ptr ds:[0BD762C4]; System.Text.Json.PooledByteBufferWriter.Dispose() M03_L04: pop ebx pop esi pop edi pop ebp ret M03_L05: call dword ptr ds:[9015270] int 3 ; Total bytes of code 164 ``` ### Compare Jit Disasm ```assembly ; System.Text.Json.Document.Tests.Perf_EnumerateArray.Parse() push ebp mov ebp,esp push edi push esi push ebx sub esp,28 xor eax,eax mov [ebp-20],eax mov [ebp-1C],eax mov [ebp-18],eax mov [ebp-14],eax mov esi,[ecx+4] test esi,esi je short M00_L01 mov edi,esi mov ebx,[edi+4] M00_L00: xor ecx,ecx mov [ebp-28],ecx mov [ebp-24],ecx lea ecx,[ebp-28] lea edx,[ebp-30] call dword ptr ds:[0B81D9A8]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebx push 0 push edi push dword ptr [ebp-2C] push dword ptr [ebp-30] xor ecx,ecx xor edx,edx call dword ptr ds:[0B81F9A8]; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) mov [ebp-34],eax cmp [eax],al mov ecx,eax call dword ptr ds:[0B8688E0]; System.Text.Json.JsonDocument.Dispose() jmp short M00_L03 M00_L01: xor edi,edi xor ebx,ebx jmp short M00_L00 cmp dword ptr [ebp-34],0 je short M00_L02 mov ecx,[ebp-34] call dword ptr ds:[0B8688E0]; System.Text.Json.JsonDocument.Dispose() M00_L02: pop eax jmp eax M00_L03: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 122 ``` ```assembly ; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebp mov ebp,esp push ebx movzx eax,byte ptr [ecx+5] movzx ebx,byte ptr [ecx+4] cmp ebx,2 jg short M01_L00 mov ecx,[ecx] test ecx,ecx jl short M01_L01 mov [edx],ecx mov [edx+4],bl mov [edx+5],al pop ebx pop ebp ret M01_L00: mov ecx,2C4E mov edx,0AF36BCC call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0BA6FA38] int 3 M01_L01: mov ecx,2C4E mov edx,0AF36BCC call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0BA6FA08] int 3 ; Total bytes of code 82 ``` ```assembly ; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) push ebp mov ebp,esp push edi push esi push ebx sub esp,44 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-48],xmm4 vmovdqu xmmword ptr [ebp-38],xmm4 xor eax,eax mov [ebp-28],eax mov [ebp-24],eax mov [ebp-18],eax mov [ebp-50],edx mov ebx,ecx xor ecx,ecx xor edx,edx mov eax,[ebp+10] test eax,eax je short M02_L01 mov ecx,[eax] test dword ptr [ecx],80000000 je near ptr M02_L05 lea ecx,[eax+8] mov edx,[eax+4] M02_L00: mov eax,[ebp+14] and eax,7FFFFFFF mov edi,[ebp+18] cmp eax,edx ja near ptr M02_L06 sub edx,eax cmp edx,edi jb near ptr M02_L06 add ecx,eax mov edx,edi M02_L01: mov edi,ecx mov eax,edx mov [ebp-4C],eax mov edx,[ebp+18] add edx,0C mov ecx,100000 cmp edx,400000 cmovg ecx,edx cmp edx,100000 cmovg edx,ecx mov ecx,ds:[74F1F78] call dword ptr ds:[0BB16E30]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-2C],eax xor ecx,ecx mov [ebp-28],ecx mov byte ptr [ebp-24],0 mov byte ptr [ebp-23],0 mov ecx,ds:[74F1F78] mov edx,200 call dword ptr ds:[0BB16E30]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-34],eax mov ecx,[ebp-34] mov ecx,[ecx+4] mov [ebp-30],ecx push dword ptr [ebp-4C] push edi push dword ptr [ebp+0C] push dword ptr [ebp+8] lea ecx,[ebp-2C] lea edx,[ebp-34] call dword ptr ds:[0B81F7C8]; System.Text.Json.JsonDocument.Parse(System.ReadOnlySpan`1, System.Text.Json.JsonReaderOptions, MetadataDb ByRef, StackRowStack ByRef) jmp short M02_L02 lea ecx,[ebp-2C] call dword ptr ds:[0B81F2E8]; System.Text.Json.JsonDocument+MetadataDb.Dispose() call CORINFO_HELP_RETHROW int 3 M02_L02: mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L04 push 0 mov ecx,ds:[74F1F78] call dword ptr ds:[0BB16E34]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) jmp short M02_L04 mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L03 push 0 mov ecx,ds:[74F1F78] call dword ptr ds:[0BB16E34]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) M02_L03: pop eax jmp eax M02_L04: mov ecx,offset MT_System.Text.Json.JsonDocument call CORINFO_HELP_NEWSFAST lea edi,[ebp-48] lea esi,[ebp-2C] movsd movsd movsd lea edi,[eax+10] lea esi,[ebp+10] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edi,[eax+1C] lea esi,[ebp-48] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[eax+8] mov esi,[ebp-50] call CORINFO_HELP_ASSIGN_REF_ESI mov byte ptr [eax+0C],1 lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 14 M02_L05: lea edx,[ebp-3C] mov ecx,eax mov eax,[eax] mov eax,[eax+28] call dword ptr [eax+14] mov ecx,[ebp-3C] mov edx,[ebp-38] jmp near ptr M02_L00 M02_L06: call dword ptr ds:[8DB5270] int 3 ; Total bytes of code 407 ``` ```assembly ; System.Text.Json.JsonDocument.Dispose() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+18] test edi,edi je short M03_L00 cmp byte ptr [esi+0C],0 jne short M03_L01 M03_L00: pop ebx pop esi pop edi pop ebp ret M03_L01: lea ebx,[esi+1C] xor ecx,ecx mov edx,ecx xchg edx,[ebx] test edx,edx je short M03_L02 push 0 mov ecx,ds:[74F1F78] call dword ptr ds:[0BB16E34]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) xor ecx,ecx mov [ebx+4],ecx M03_L02: xor ecx,ecx mov [esi+10],ecx mov [esi+14],ecx mov [esi+18],ecx cmp dword ptr [esi+4],0 je short M03_L03 add esi,4 xor ecx,ecx mov ebx,ecx xchg ebx,[esi] test ebx,ebx je short M03_L04 mov ecx,[ebx+4] cmp ecx,edi jb short M03_L05 lea ecx,[ebx+8] mov edx,edi call dword ptr ds:[86CF390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push 0 mov ecx,ds:[74F1F78] mov edx,ebx call dword ptr ds:[0BB16E34]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) pop ebx pop esi pop edi pop ebp ret M03_L03: cmp dword ptr [esi+8],0 je short M03_L04 lea ecx,[esi+8] xor eax,eax xchg eax,[ecx] test eax,eax je short M03_L04 mov ecx,eax call dword ptr ds:[0BB16ADC]; System.Text.Json.PooledByteBufferWriter.Dispose() M03_L04: pop ebx pop esi pop edi pop ebp ret M03_L05: call dword ptr ds:[8DB5270] int 3 ; Total bytes of code 164 ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in MicroBenchmarks.Serializers.Json_FromString<CollectionsOfPrimitives>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[SystemTextJsonReflection - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/MicroBenchmarks.Serializers.Json_FromString(CollectionsOfPrimitives).SystemTextJsonReflection.html>) 379.86 μs 360.10 μs 0.95 0.04 False
[SystemTextJsonSourceGen - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/MicroBenchmarks.Serializers.Json_FromString(CollectionsOfPrimitives).SystemTextJsonSourceGen.html>) 400.14 μs 369.36 μs 0.92 0.03 False

graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'MicroBenchmarks.Serializers.Json_FromString&lt;CollectionsOfPrimitives&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### MicroBenchmarks.Serializers.Json_FromString<CollectionsOfPrimitives>.SystemTextJson_Reflection_ ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 360.10479465138485 < 360.8458266876408. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 43.751284790207976 (T) = (0 -358342.76288871386) / Math.Sqrt((102003445.1993382 / (299)) + (2965407.520400141 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.07577852918303865 = (387723.9105600505 - 358342.76288871386) / 387723.9105600505 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### MicroBenchmarks.Serializers.Json_FromString<CollectionsOfPrimitives>.SystemTextJson_SourceGen_ ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 369.36349024110217 < 373.34630057652. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 41.206788773352805 (T) = (0 -364007.49039074074) / Math.Sqrt((95842259.21881154 / (299)) + (6205316.725701979 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.07747534204216126 = (394577.5186069624 - 364007.49039074074) / 394577.5186069624 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)
performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in System.Text.Json.Serialization.Tests.ReadJson<ImmutableSortedDictionary<String, String>>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[DeserializeFromReader - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(ImmutableSortedDictionary(String%2c%20String)).DeserializeFromReader(Mode%3a%20Reflection).html>) 121.46 μs 107.98 μs 0.89 0.06 False

graph_1.png>) Test Report.html>)

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Serialization.Tests.ReadJson&lt;ImmutableSortedDictionary&lt;String, String&gt;&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Text.Json.Serialization.Tests.ReadJson<ImmutableSortedDictionary<String, String>>.DeserializeFromReader(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 107.97899340848885 < 109.666490688366. IsChangePoint: Marked as a change because one of 12/21/2022 3:18:57 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 24.234964224469618 (T) = (0 -106398.1936077687) / Math.Sqrt((27863672.685881764 / (299)) + (3739396.752471327 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.09880450990531178 = (118063.38888423586 - 106398.1936077687) / 118063.38888423586 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)
performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in MicroBenchmarks.Serializers.Json_FromString<IndexViewModel>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[SystemTextJsonReflection - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/MicroBenchmarks.Serializers.Json_FromString(IndexViewModel).SystemTextJsonReflection.html>) 37.11 μs 31.65 μs 0.85 0.06 False
[SystemTextJsonSourceGen - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/MicroBenchmarks.Serializers.Json_FromString(IndexViewModel).SystemTextJsonSourceGen.html>) 36.54 μs 31.00 μs 0.85 0.10 False

graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'MicroBenchmarks.Serializers.Json_FromString&lt;IndexViewModel&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### MicroBenchmarks.Serializers.Json_FromString<IndexViewModel>.SystemTextJson_Reflection_ ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 31.648990255376344 < 35.230535285503066. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 98.25060167494505 (T) = (0 -31776.874251797846) / Math.Sqrt((786310.0536909112 / (299)) + (39733.92678889917 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.1652838188307666 = (38069.07661390511 - 31776.874251797846) / 38069.07661390511 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### MicroBenchmarks.Serializers.Json_FromString<IndexViewModel>.SystemTextJson_SourceGen_ ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 30.999113569478425 < 34.70180788798123. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 37.382571075795866 (T) = (0 -31399.040610000233) / Math.Sqrt((906241.5364154539 / (299)) + (692085.9368878074 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.16775332567356105 = (37728.045756881365 - 31399.040610000233) / 37728.045756881365 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in System.Text.Json.Serialization.Tests.ReadJson<BinaryData>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[DeserializeFromReader - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(BinaryData).DeserializeFromReader(Mode%3a%20SourceGen).html>) 962.13 ns 870.36 ns 0.90 0.13 False

graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Serialization.Tests.ReadJson&lt;BinaryData&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Text.Json.Serialization.Tests.ReadJson<BinaryData>.DeserializeFromReader(Mode: SourceGen) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 870.3634328021933 < 917.1488651146049. IsChangePoint: Marked as a change because one of 12/1/2022 1:10:54 PM, 12/1/2022 11:48:13 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 18.19794429766379 (T) = (0 -872.1178076100716) / Math.Sqrt((18067.615308851913 / (299)) + (162.2240573737567 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.14535550690957652 = (1020.4451262026671 - 872.1178076100716) / 1020.4451262026671 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in System.Text.Json.Serialization.Tests.ReadJson<Nullable<DateTimeOffset>>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[DeserializeFromUtf8Bytes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Serialization.Tests.ReadJson(Nullable(DateTimeOffset)).DeserializeFromUtf8Bytes(Mode%3a%20Reflection).html>) 202.93 ns 189.14 ns 0.93 0.01 False

graph_1.png>) Test Report.html>)

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Serialization.Tests.ReadJson&lt;Nullable&lt;DateTimeOffset&gt;&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Text.Json.Serialization.Tests.ReadJson<Nullable<DateTimeOffset>>.DeserializeFromUtf8Bytes(Mode: Reflection) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 189.14402534397917 < 192.12940556590794. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 49.236830660855894 (T) = (0 -189.9408222745571) / Math.Sqrt((4.865109243504254 / (299)) + (1.9829476247406947 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.0720487573349061 = (204.68836458372897 - 189.9408222745571) / 204.68836458372897 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)
performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in System.Text.Json.Document.Tests.Perf_EnumerateObject

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[Parse - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Document.Tests.Perf_EnumerateObject.Parse(TestCase%3a%20ObjectProperties).html>) 1.07 ms 827.65 μs 0.77 0.00 False Trace Trace
[Parse - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Document.Tests.Perf_EnumerateObject.Parse(TestCase%3a%20StringProperties).html>) 26.16 μs 20.94 μs 0.80 0.01 False Trace Trace

graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Document.Tests.Perf_EnumerateObject*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Text.Json.Document.Tests.Perf_EnumerateObject.Parse(TestCase: ObjectProperties) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 827.6538596491225 < 1.0179674465277777. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 358.05692506538765 (T) = (0 -823634.023426622) / Math.Sqrt((60320717.15813884 / (299)) + (8468092.666659271 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.2378569285180277 = (1080681.6387178877 - 823634.023426622) / 1080681.6387178877 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Text.Json.Document.Tests.Perf_EnumerateObject.Parse() push ebp mov ebp,esp push edi push esi push ebx sub esp,28 xor eax,eax mov [ebp-20],eax mov [ebp-1C],eax mov [ebp-18],eax mov [ebp-14],eax mov esi,[ecx+4] test esi,esi je short M00_L01 mov edi,esi mov ebx,[edi+4] M00_L00: xor ecx,ecx mov [ebp-28],ecx mov [ebp-24],ecx lea ecx,[ebp-28] lea edx,[ebp-30] call dword ptr ds:[0B6BD6F0]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebx push 0 push edi push dword ptr [ebp-2C] push dword ptr [ebp-30] xor ecx,ecx xor edx,edx call dword ptr ds:[0B6BF768]; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) mov [ebp-34],eax cmp [eax],al mov ecx,eax call dword ptr ds:[0B6F81D8]; System.Text.Json.JsonDocument.Dispose() jmp short M00_L03 M00_L01: xor edi,edi xor ebx,ebx jmp short M00_L00 cmp dword ptr [ebp-34],0 je short M00_L02 mov ecx,[ebp-34] call dword ptr ds:[0B6F81D8]; System.Text.Json.JsonDocument.Dispose() M00_L02: pop eax jmp eax M00_L03: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 122 ``` ```assembly ; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebp mov ebp,esp push ebx movzx eax,byte ptr [ecx+5] movzx ebx,byte ptr [ecx+4] cmp ebx,2 jg short M01_L00 mov ecx,[ecx] test ecx,ecx jl short M01_L01 mov [edx],ecx mov [edx+4],bl mov [edx+5],al pop ebx pop ebp ret M01_L00: mov ecx,2C7A mov edx,0ADB6BCC call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B98B930] int 3 M01_L01: mov ecx,2C7A mov edx,0ADB6BCC call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B98B900] int 3 ; Total bytes of code 82 ``` ```assembly ; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) push ebp mov ebp,esp push edi push esi push ebx sub esp,44 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-48],xmm4 vmovdqu xmmword ptr [ebp-38],xmm4 xor eax,eax mov [ebp-28],eax mov [ebp-24],eax mov [ebp-18],eax mov [ebp-50],edx mov ebx,ecx xor ecx,ecx xor edx,edx mov eax,[ebp+10] test eax,eax je short M02_L01 mov ecx,[eax] test dword ptr [ecx],80000000 je near ptr M02_L06 lea ecx,[eax+8] mov edx,[eax+4] M02_L00: mov eax,[ebp+14] and eax,7FFFFFFF mov edi,[ebp+18] cmp eax,edx ja near ptr M02_L07 sub edx,eax cmp edx,edi jb near ptr M02_L07 add ecx,eax mov edx,edi M02_L01: mov edi,ecx mov eax,edx mov [ebp-4C],eax mov edx,[ebp+18] add edx,0C cmp edx,100000 jle short M02_L02 cmp edx,400000 jg short M02_L02 mov edx,100000 M02_L02: mov ecx,ds:[7251F80] call dword ptr ds:[0B996BB4]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-2C],eax xor ecx,ecx mov [ebp-28],ecx mov byte ptr [ebp-24],0 mov byte ptr [ebp-23],0 mov ecx,ds:[7251F80] mov edx,200 call dword ptr ds:[0B996BB4]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-34],eax mov ecx,[ebp-34] mov ecx,[ecx+4] mov [ebp-30],ecx push dword ptr [ebp-4C] push edi push dword ptr [ebp+0C] push dword ptr [ebp+8] lea ecx,[ebp-2C] lea edx,[ebp-34] call dword ptr ds:[0B6BF588]; System.Text.Json.JsonDocument.Parse(System.ReadOnlySpan`1, System.Text.Json.JsonReaderOptions, MetadataDb ByRef, StackRowStack ByRef) jmp short M02_L03 lea ecx,[ebp-2C] call dword ptr ds:[0B6BF0A8]; System.Text.Json.JsonDocument+MetadataDb.Dispose() call CORINFO_HELP_RETHROW int 3 M02_L03: mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L05 push 0 mov ecx,ds:[7251F80] call dword ptr ds:[0B996BB8]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) jmp short M02_L05 mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L04 push 0 mov ecx,ds:[7251F80] call dword ptr ds:[0B996BB8]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) M02_L04: pop eax jmp eax M02_L05: mov ecx,offset MT_System.Text.Json.JsonDocument call CORINFO_HELP_NEWSFAST lea edi,[ebp-48] lea esi,[ebp-2C] movsd movsd movsd lea edi,[eax+10] lea esi,[ebp+10] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edi,[eax+1C] lea esi,[ebp-48] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[eax+8] mov esi,[ebp-50] call CORINFO_HELP_ASSIGN_REF_ESI mov byte ptr [eax+0C],1 lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 14 M02_L06: lea edx,[ebp-3C] mov ecx,eax mov eax,[eax] mov eax,[eax+28] call dword ptr [eax+14] mov ecx,[ebp-3C] mov edx,[ebp-38] jmp near ptr M02_L00 M02_L07: call dword ptr ds:[8BC5270] int 3 ; Total bytes of code 405 ``` ```assembly ; System.Text.Json.JsonDocument.Dispose() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+18] test edi,edi je short M03_L00 cmp byte ptr [esi+0C],0 jne short M03_L01 M03_L00: pop ebx pop esi pop edi pop ebp ret M03_L01: lea ebx,[esi+1C] xor ecx,ecx mov edx,ecx xchg edx,[ebx] test edx,edx je short M03_L02 push 0 mov ecx,ds:[7251F80] call dword ptr ds:[0B996BB8]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) xor ecx,ecx mov [ebx+4],ecx M03_L02: xor ecx,ecx mov [esi+10],ecx mov [esi+14],ecx mov [esi+18],ecx cmp dword ptr [esi+4],0 je short M03_L03 add esi,4 xor ecx,ecx mov ebx,ecx xchg ebx,[esi] test ebx,ebx je short M03_L04 mov ecx,[ebx+4] cmp ecx,edi jb short M03_L05 lea ecx,[ebx+8] mov edx,edi call dword ptr ds:[84DF390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push 0 mov ecx,ds:[7251F80] mov edx,ebx call dword ptr ds:[0B996BB8]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) pop ebx pop esi pop edi pop ebp ret M03_L03: cmp dword ptr [esi+8],0 je short M03_L04 lea ecx,[esi+8] xor eax,eax xchg eax,[ecx] test eax,eax je short M03_L04 mov ecx,eax call dword ptr ds:[0B996860]; System.Text.Json.PooledByteBufferWriter.Dispose() M03_L04: pop ebx pop esi pop edi pop ebp ret M03_L05: call dword ptr ds:[8BC5270] int 3 ; Total bytes of code 164 ``` ### Compare Jit Disasm ```assembly ; System.Text.Json.Document.Tests.Perf_EnumerateObject.Parse() push ebp mov ebp,esp push edi push esi push ebx sub esp,28 xor eax,eax mov [ebp-20],eax mov [ebp-1C],eax mov [ebp-18],eax mov [ebp-14],eax mov esi,[ecx+4] test esi,esi je short M00_L01 mov edi,esi mov ebx,[edi+4] M00_L00: xor ecx,ecx mov [ebp-28],ecx mov [ebp-24],ecx lea ecx,[ebp-28] lea edx,[ebp-30] call dword ptr ds:[0B1CD9A8]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebx push 0 push edi push dword ptr [ebp-2C] push dword ptr [ebp-30] xor ecx,ecx xor edx,edx call dword ptr ds:[0B1CF9A8]; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) mov [ebp-34],eax cmp [eax],al mov ecx,eax call dword ptr ds:[0B2188E0]; System.Text.Json.JsonDocument.Dispose() jmp short M00_L03 M00_L01: xor edi,edi xor ebx,ebx jmp short M00_L00 cmp dword ptr [ebp-34],0 je short M00_L02 mov ecx,[ebp-34] call dword ptr ds:[0B2188E0]; System.Text.Json.JsonDocument.Dispose() M00_L02: pop eax jmp eax M00_L03: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 122 ``` ```assembly ; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebp mov ebp,esp push ebx movzx eax,byte ptr [ecx+5] movzx ebx,byte ptr [ecx+4] cmp ebx,2 jg short M01_L00 mov ecx,[ecx] test ecx,ecx jl short M01_L01 mov [edx],ecx mov [edx+4],bl mov [edx+5],al pop ebx pop ebp ret M01_L00: mov ecx,2C4E mov edx,0A8E6BCC call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B41F930] int 3 M01_L01: mov ecx,2C4E mov edx,0A8E6BCC call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B41F900] int 3 ; Total bytes of code 82 ``` ```assembly ; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) push ebp mov ebp,esp push edi push esi push ebx sub esp,44 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-48],xmm4 vmovdqu xmmword ptr [ebp-38],xmm4 xor eax,eax mov [ebp-28],eax mov [ebp-24],eax mov [ebp-18],eax mov [ebp-50],edx mov ebx,ecx xor ecx,ecx xor edx,edx mov eax,[ebp+10] test eax,eax je short M02_L01 mov ecx,[eax] test dword ptr [ecx],80000000 je near ptr M02_L05 lea ecx,[eax+8] mov edx,[eax+4] M02_L00: mov eax,[ebp+14] and eax,7FFFFFFF mov edi,[ebp+18] cmp eax,edx ja near ptr M02_L06 sub edx,eax cmp edx,edi jb near ptr M02_L06 add ecx,eax mov edx,edi M02_L01: mov edi,ecx mov eax,edx mov [ebp-4C],eax mov edx,[ebp+18] add edx,0C mov ecx,100000 cmp edx,400000 cmovg ecx,edx cmp edx,100000 cmovg edx,ecx mov ecx,ds:[6EA1F7C] call dword ptr ds:[0B4C73CC]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-2C],eax xor ecx,ecx mov [ebp-28],ecx mov byte ptr [ebp-24],0 mov byte ptr [ebp-23],0 mov ecx,ds:[6EA1F7C] mov edx,200 call dword ptr ds:[0B4C73CC]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-34],eax mov ecx,[ebp-34] mov ecx,[ecx+4] mov [ebp-30],ecx push dword ptr [ebp-4C] push edi push dword ptr [ebp+0C] push dword ptr [ebp+8] lea ecx,[ebp-2C] lea edx,[ebp-34] call dword ptr ds:[0B1CF7C8]; System.Text.Json.JsonDocument.Parse(System.ReadOnlySpan`1, System.Text.Json.JsonReaderOptions, MetadataDb ByRef, StackRowStack ByRef) jmp short M02_L02 lea ecx,[ebp-2C] call dword ptr ds:[0B1CF2E8]; System.Text.Json.JsonDocument+MetadataDb.Dispose() call CORINFO_HELP_RETHROW int 3 M02_L02: mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L04 push 0 mov ecx,ds:[6EA1F7C] call dword ptr ds:[0B4C73D0]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) jmp short M02_L04 mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L03 push 0 mov ecx,ds:[6EA1F7C] call dword ptr ds:[0B4C73D0]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) M02_L03: pop eax jmp eax M02_L04: mov ecx,offset MT_System.Text.Json.JsonDocument call CORINFO_HELP_NEWSFAST lea edi,[ebp-48] lea esi,[ebp-2C] movsd movsd movsd lea edi,[eax+10] lea esi,[ebp+10] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edi,[eax+1C] lea esi,[ebp-48] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[eax+8] mov esi,[ebp-50] call CORINFO_HELP_ASSIGN_REF_ESI mov byte ptr [eax+0C],1 lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 14 M02_L05: lea edx,[ebp-3C] mov ecx,eax mov eax,[eax] mov eax,[eax+28] call dword ptr [eax+14] mov ecx,[ebp-3C] mov edx,[ebp-38] jmp near ptr M02_L00 M02_L06: call dword ptr ds:[8765270] int 3 ; Total bytes of code 407 ``` ```assembly ; System.Text.Json.JsonDocument.Dispose() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+18] test edi,edi je short M03_L00 cmp byte ptr [esi+0C],0 jne short M03_L01 M03_L00: pop ebx pop esi pop edi pop ebp ret M03_L01: lea ebx,[esi+1C] xor ecx,ecx mov edx,ecx xchg edx,[ebx] test edx,edx je short M03_L02 push 0 mov ecx,ds:[6EA1F7C] call dword ptr ds:[0B4C73D0]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) xor ecx,ecx mov [ebx+4],ecx M03_L02: xor ecx,ecx mov [esi+10],ecx mov [esi+14],ecx mov [esi+18],ecx cmp dword ptr [esi+4],0 je short M03_L03 add esi,4 xor ecx,ecx mov ebx,ecx xchg ebx,[esi] test ebx,ebx je short M03_L04 mov ecx,[ebx+4] cmp ecx,edi jb short M03_L05 lea ecx,[ebx+8] mov edx,edi call dword ptr ds:[807F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push 0 mov ecx,ds:[6EA1F7C] mov edx,ebx call dword ptr ds:[0B4C73D0]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) pop ebx pop esi pop edi pop ebp ret M03_L03: cmp dword ptr [esi+8],0 je short M03_L04 lea ecx,[esi+8] xor eax,eax xchg eax,[ecx] test eax,eax je short M03_L04 mov ecx,eax call dword ptr ds:[0B4C7078]; System.Text.Json.PooledByteBufferWriter.Dispose() M03_L04: pop ebx pop esi pop edi pop ebp ret M03_L05: call dword ptr ds:[8765270] int 3 ; Total bytes of code 164 ``` #### System.Text.Json.Document.Tests.Perf_EnumerateObject.Parse(TestCase: StringProperties) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 20.941181950022305 < 24.89427493369626. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 92.43766956788014 (T) = (0 -20849.114962407362) / Math.Sqrt((38320.372540446886 / (299)) + (91328.19925768625 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.2080452594407888 = (26326.144531549224 - 20849.114962407362) / 26326.144531549224 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Text.Json.Document.Tests.Perf_EnumerateObject.Parse() push ebp mov ebp,esp push edi push esi push ebx sub esp,28 xor eax,eax mov [ebp-20],eax mov [ebp-1C],eax mov [ebp-18],eax mov [ebp-14],eax mov esi,[ecx+4] test esi,esi je short M00_L01 mov edi,esi mov ebx,[edi+4] M00_L00: xor ecx,ecx mov [ebp-28],ecx mov [ebp-24],ecx lea ecx,[ebp-28] lea edx,[ebp-30] call dword ptr ds:[0BC5D6F0]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebx push 0 push edi push dword ptr [ebp-2C] push dword ptr [ebp-30] xor ecx,ecx xor edx,edx call dword ptr ds:[0BC5F768]; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) mov [ebp-34],eax cmp [eax],al mov ecx,eax call dword ptr ds:[0BC981D8]; System.Text.Json.JsonDocument.Dispose() jmp short M00_L03 M00_L01: xor edi,edi xor ebx,ebx jmp short M00_L00 cmp dword ptr [ebp-34],0 je short M00_L02 mov ecx,[ebp-34] call dword ptr ds:[0BC981D8]; System.Text.Json.JsonDocument.Dispose() M00_L02: pop eax jmp eax M00_L03: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 122 ``` ```assembly ; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebp mov ebp,esp push ebx movzx eax,byte ptr [ecx+5] movzx ebx,byte ptr [ecx+4] cmp ebx,2 jg short M01_L00 mov ecx,[ecx] test ecx,ecx jl short M01_L01 mov [edx],ecx mov [edx+4],bl mov [edx+5],al pop ebx pop ebp ret M01_L00: mov ecx,2C7A mov edx,0B356BCC call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0BF2B930] int 3 M01_L01: mov ecx,2C7A mov edx,0B356BCC call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0BF2B900] int 3 ; Total bytes of code 82 ``` ```assembly ; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) push ebp mov ebp,esp push edi push esi push ebx sub esp,44 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-48],xmm4 vmovdqu xmmword ptr [ebp-38],xmm4 xor eax,eax mov [ebp-28],eax mov [ebp-24],eax mov [ebp-18],eax mov [ebp-50],edx mov ebx,ecx xor ecx,ecx xor edx,edx mov eax,[ebp+10] test eax,eax je short M02_L01 mov ecx,[eax] test dword ptr [ecx],80000000 je near ptr M02_L06 lea ecx,[eax+8] mov edx,[eax+4] M02_L00: mov eax,[ebp+14] and eax,7FFFFFFF mov edi,[ebp+18] cmp eax,edx ja near ptr M02_L07 sub edx,eax cmp edx,edi jb near ptr M02_L07 add ecx,eax mov edx,edi M02_L01: mov edi,ecx mov eax,edx mov [ebp-4C],eax mov edx,[ebp+18] add edx,0C cmp edx,100000 jle short M02_L02 cmp edx,400000 jg short M02_L02 mov edx,100000 M02_L02: mov ecx,ds:[7851F7C] call dword ptr ds:[0BF36A94]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-2C],eax xor ecx,ecx mov [ebp-28],ecx mov byte ptr [ebp-24],0 mov byte ptr [ebp-23],0 mov ecx,ds:[7851F7C] mov edx,200 call dword ptr ds:[0BF36A94]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-34],eax mov ecx,[ebp-34] mov ecx,[ecx+4] mov [ebp-30],ecx push dword ptr [ebp-4C] push edi push dword ptr [ebp+0C] push dword ptr [ebp+8] lea ecx,[ebp-2C] lea edx,[ebp-34] call dword ptr ds:[0BC5F588]; System.Text.Json.JsonDocument.Parse(System.ReadOnlySpan`1, System.Text.Json.JsonReaderOptions, MetadataDb ByRef, StackRowStack ByRef) jmp short M02_L03 lea ecx,[ebp-2C] call dword ptr ds:[0BC5F0A8]; System.Text.Json.JsonDocument+MetadataDb.Dispose() call CORINFO_HELP_RETHROW int 3 M02_L03: mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L05 push 0 mov ecx,ds:[7851F7C] call dword ptr ds:[0BF36A98]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) jmp short M02_L05 mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L04 push 0 mov ecx,ds:[7851F7C] call dword ptr ds:[0BF36A98]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) M02_L04: pop eax jmp eax M02_L05: mov ecx,offset MT_System.Text.Json.JsonDocument call CORINFO_HELP_NEWSFAST lea edi,[ebp-48] lea esi,[ebp-2C] movsd movsd movsd lea edi,[eax+10] lea esi,[ebp+10] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edi,[eax+1C] lea esi,[ebp-48] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[eax+8] mov esi,[ebp-50] call CORINFO_HELP_ASSIGN_REF_ESI mov byte ptr [eax+0C],1 lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 14 M02_L06: lea edx,[ebp-3C] mov ecx,eax mov eax,[eax] mov eax,[eax+28] call dword ptr [eax+14] mov ecx,[ebp-3C] mov edx,[ebp-38] jmp near ptr M02_L00 M02_L07: call dword ptr ds:[9165270] int 3 ; Total bytes of code 405 ``` ```assembly ; System.Text.Json.JsonDocument.Dispose() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+18] test edi,edi je short M03_L00 cmp byte ptr [esi+0C],0 jne short M03_L01 M03_L00: pop ebx pop esi pop edi pop ebp ret M03_L01: lea ebx,[esi+1C] xor ecx,ecx mov edx,ecx xchg edx,[ebx] test edx,edx je short M03_L02 push 0 mov ecx,ds:[7851F7C] call dword ptr ds:[0BF36A98]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) xor ecx,ecx mov [ebx+4],ecx M03_L02: xor ecx,ecx mov [esi+10],ecx mov [esi+14],ecx mov [esi+18],ecx cmp dword ptr [esi+4],0 je short M03_L03 add esi,4 xor ecx,ecx mov ebx,ecx xchg ebx,[esi] test ebx,ebx je short M03_L04 mov ecx,[ebx+4] cmp ecx,edi jb short M03_L05 lea ecx,[ebx+8] mov edx,edi call dword ptr ds:[568F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push 0 mov ecx,ds:[7851F7C] mov edx,ebx call dword ptr ds:[0BF36A98]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) pop ebx pop esi pop edi pop ebp ret M03_L03: cmp dword ptr [esi+8],0 je short M03_L04 lea ecx,[esi+8] xor eax,eax xchg eax,[ecx] test eax,eax je short M03_L04 mov ecx,eax call dword ptr ds:[0BF36740]; System.Text.Json.PooledByteBufferWriter.Dispose() M03_L04: pop ebx pop esi pop edi pop ebp ret M03_L05: call dword ptr ds:[9165270] int 3 ; Total bytes of code 164 ``` ### Compare Jit Disasm ```assembly ; System.Text.Json.Document.Tests.Perf_EnumerateObject.Parse() push ebp mov ebp,esp push edi push esi push ebx sub esp,28 xor eax,eax mov [ebp-20],eax mov [ebp-1C],eax mov [ebp-18],eax mov [ebp-14],eax mov esi,[ecx+4] test esi,esi je short M00_L01 mov edi,esi mov ebx,[edi+4] M00_L00: xor ecx,ecx mov [ebp-28],ecx mov [ebp-24],ecx lea ecx,[ebp-28] lea edx,[ebp-30] call dword ptr ds:[0B51D9A8]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebx push 0 push edi push dword ptr [ebp-2C] push dword ptr [ebp-30] xor ecx,ecx xor edx,edx call dword ptr ds:[0B51F9A8]; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) mov [ebp-34],eax cmp [eax],al mov ecx,eax call dword ptr ds:[0B5688E0]; System.Text.Json.JsonDocument.Dispose() jmp short M00_L03 M00_L01: xor edi,edi xor ebx,ebx jmp short M00_L00 cmp dword ptr [ebp-34],0 je short M00_L02 mov ecx,[ebp-34] call dword ptr ds:[0B5688E0]; System.Text.Json.JsonDocument.Dispose() M00_L02: pop eax jmp eax M00_L03: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 122 ``` ```assembly ; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebp mov ebp,esp push ebx movzx eax,byte ptr [ecx+5] movzx ebx,byte ptr [ecx+4] cmp ebx,2 jg short M01_L00 mov ecx,[ecx] test ecx,ecx jl short M01_L01 mov [edx],ecx mov [edx+4],bl mov [edx+5],al pop ebx pop ebp ret M01_L00: mov ecx,2C4E mov edx,0AC36BCC call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B76F930] int 3 M01_L01: mov ecx,2C4E mov edx,0AC36BCC call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B76F900] int 3 ; Total bytes of code 82 ``` ```assembly ; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) push ebp mov ebp,esp push edi push esi push ebx sub esp,44 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-48],xmm4 vmovdqu xmmword ptr [ebp-38],xmm4 xor eax,eax mov [ebp-28],eax mov [ebp-24],eax mov [ebp-18],eax mov [ebp-50],edx mov ebx,ecx xor ecx,ecx xor edx,edx mov eax,[ebp+10] test eax,eax je short M02_L01 mov ecx,[eax] test dword ptr [ecx],80000000 je near ptr M02_L05 lea ecx,[eax+8] mov edx,[eax+4] M02_L00: mov eax,[ebp+14] and eax,7FFFFFFF mov edi,[ebp+18] cmp eax,edx ja near ptr M02_L06 sub edx,eax cmp edx,edi jb near ptr M02_L06 add ecx,eax mov edx,edi M02_L01: mov edi,ecx mov eax,edx mov [ebp-4C],eax mov edx,[ebp+18] add edx,0C mov ecx,100000 cmp edx,400000 cmovg ecx,edx cmp edx,100000 cmovg edx,ecx mov ecx,ds:[70C1F78] call dword ptr ds:[0B8172AC]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-2C],eax xor ecx,ecx mov [ebp-28],ecx mov byte ptr [ebp-24],0 mov byte ptr [ebp-23],0 mov ecx,ds:[70C1F78] mov edx,200 call dword ptr ds:[0B8172AC]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-34],eax mov ecx,[ebp-34] mov ecx,[ecx+4] mov [ebp-30],ecx push dword ptr [ebp-4C] push edi push dword ptr [ebp+0C] push dword ptr [ebp+8] lea ecx,[ebp-2C] lea edx,[ebp-34] call dword ptr ds:[0B51F7C8]; System.Text.Json.JsonDocument.Parse(System.ReadOnlySpan`1, System.Text.Json.JsonReaderOptions, MetadataDb ByRef, StackRowStack ByRef) jmp short M02_L02 lea ecx,[ebp-2C] call dword ptr ds:[0B51F2E8]; System.Text.Json.JsonDocument+MetadataDb.Dispose() call CORINFO_HELP_RETHROW int 3 M02_L02: mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L04 push 0 mov ecx,ds:[70C1F78] call dword ptr ds:[0B8172B0]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) jmp short M02_L04 mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L03 push 0 mov ecx,ds:[70C1F78] call dword ptr ds:[0B8172B0]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) M02_L03: pop eax jmp eax M02_L04: mov ecx,offset MT_System.Text.Json.JsonDocument call CORINFO_HELP_NEWSFAST lea edi,[ebp-48] lea esi,[ebp-2C] movsd movsd movsd lea edi,[eax+10] lea esi,[ebp+10] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edi,[eax+1C] lea esi,[ebp-48] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[eax+8] mov esi,[ebp-50] call CORINFO_HELP_ASSIGN_REF_ESI mov byte ptr [eax+0C],1 lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 14 M02_L05: lea edx,[ebp-3C] mov ecx,eax mov eax,[eax] mov eax,[eax+28] call dword ptr [eax+14] mov ecx,[ebp-3C] mov edx,[ebp-38] jmp near ptr M02_L00 M02_L06: call dword ptr ds:[8AB5270] int 3 ; Total bytes of code 407 ``` ```assembly ; System.Text.Json.JsonDocument.Dispose() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+18] test edi,edi je short M03_L00 cmp byte ptr [esi+0C],0 jne short M03_L01 M03_L00: pop ebx pop esi pop edi pop ebp ret M03_L01: lea ebx,[esi+1C] xor ecx,ecx mov edx,ecx xchg edx,[ebx] test edx,edx je short M03_L02 push 0 mov ecx,ds:[70C1F78] call dword ptr ds:[0B8172B0]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) xor ecx,ecx mov [ebx+4],ecx M03_L02: xor ecx,ecx mov [esi+10],ecx mov [esi+14],ecx mov [esi+18],ecx cmp dword ptr [esi+4],0 je short M03_L03 add esi,4 xor ecx,ecx mov ebx,ecx xchg ebx,[esi] test ebx,ebx je short M03_L04 mov ecx,[ebx+4] cmp ecx,edi jb short M03_L05 lea ecx,[ebx+8] mov edx,edi call dword ptr ds:[83CF390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push 0 mov ecx,ds:[70C1F78] mov edx,ebx call dword ptr ds:[0B8172B0]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) pop ebx pop esi pop edi pop ebp ret M03_L03: cmp dword ptr [esi+8],0 je short M03_L04 lea ecx,[esi+8] xor eax,eax xchg eax,[ecx] test eax,eax je short M03_L04 mov ecx,eax call dword ptr ds:[0B816F58]; System.Text.Json.PooledByteBufferWriter.Dispose() M03_L04: pop ebx pop esi pop edi pop ebp ret M03_L05: call dword ptr ds:[8AB5270] int 3 ; Total bytes of code 164 ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)
performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in System.Text.Json.Document.Tests.Perf_DocumentParse

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[Parse - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Document.Tests.Perf_DocumentParse.Parse(IsDataIndented%3a%20False%2c%20TestRandomAccess%3a%20False%2c%20TestCase%3a%20Json400KB).html>) 1.18 ms 886.24 μs 0.75 0.00 False 9582938.388625592 8494724.220623503 0.8864425373647671) Trace Trace
[Parse - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Document.Tests.Perf_DocumentParse.Parse(IsDataIndented%3a%20True%2c%20TestRandomAccess%3a%20False%2c%20TestCase%3a%20Json400KB).html>) 1.49 ms 1.19 ms 0.80 0.00 False 12612774.451097803 11517384.370015949 0.9131523293840783) Trace Trace

graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Document.Tests.Perf_DocumentParse*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Text.Json.Document.Tests.Perf_DocumentParse.Parse(IsDataIndented: False, TestRandomAccess: False, TestCase: Json400KB) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 886.2380192502534 < 1.1169808378583872. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 576.2690797598576 (T) = (0 -882965.8202680617) / Math.Sqrt((13553697.612890828 / (299)) + (5765599.465761794 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.24928582571288208 = (1176167.7753141276 - 882965.8202680617) / 1176167.7753141276 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Text.Json.Document.Tests.Perf_DocumentParse.Parse() push ebp mov ebp,esp push edi push esi push ebx sub esp,28 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-34],xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov esi,ecx mov edi,[esi+4] test edi,edi je near ptr M00_L05 mov ebx,edi mov edi,[ebx+4] M00_L00: xor ecx,ecx mov [ebp-28],ecx mov [ebp-24],ecx lea ecx,[ebp-28] lea edx,[ebp-30] call dword ptr ds:[0B595D38]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push edi push 0 push ebx push dword ptr [ebp-2C] push dword ptr [ebp-30] xor ecx,ecx xor edx,edx call dword ptr ds:[0B595BE8]; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) mov edi,eax mov [ebp-34],edi cmp byte ptr [esi+0D],0 je near ptr M00_L04 mov esi,[esi+8] test esi,esi jne short M00_L01 mov ebx,edi cmp [ebx],bl mov eax,edi push 0 push eax call dword ptr ds:[0A88F450] mov dword ptr [ebp-1C],0 mov dword ptr [ebp-18],0FC push offset M00_L06 jmp near ptr M00_L09 M00_L01: cmp esi,2 jne short M00_L02 mov ebx,edi cmp [ebx],bl mov eax,edi push 0 push eax call dword ptr ds:[0A88F468] mov dword ptr [ebp-1C],0 mov dword ptr [ebp-18],0FC push offset M00_L07 jmp short M00_L09 M00_L02: cmp esi,1 jne short M00_L03 mov ebx,edi cmp [ebx],bl mov eax,edi push 0 push eax call dword ptr ds:[0A88F480] mov dword ptr [ebp-1C],0 mov dword ptr [ebp-18],0FC push offset M00_L08 jmp short M00_L09 M00_L03: cmp esi,3 jne short M00_L04 mov ebx,edi cmp [ebx],bl mov eax,edi push 0 push eax call dword ptr ds:[0A88F498] M00_L04: test edi,edi je short M00_L11 mov ecx,edi call dword ptr ds:[0B51BE28]; System.Text.Json.JsonDocument.Dispose() jmp short M00_L11 M00_L05: xor ebx,ebx xor edi,edi jmp near ptr M00_L00 M00_L06: mov dword ptr [ebp-18],0 jmp short M00_L11 M00_L07: mov dword ptr [ebp-18],0 jmp short M00_L11 M00_L08: mov dword ptr [ebp-18],0 jmp short M00_L11 M00_L09: mov ebx,[ebp-34] test ebx,ebx je short M00_L10 mov ecx,ebx call dword ptr ds:[0B51BE28]; System.Text.Json.JsonDocument.Dispose() M00_L10: pop eax jmp eax M00_L11: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 325 ``` ```assembly ; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebp mov ebp,esp push ebx movzx eax,byte ptr [ecx+5] movzx ebx,byte ptr [ecx+4] cmp ebx,2 jg short M01_L00 mov ecx,[ecx] test ecx,ecx jl short M01_L01 mov [edx],ecx mov [edx+4],bl mov [edx+5],al pop ebx pop ebp ret M01_L00: mov ecx,2C7A mov edx,0B5198F8 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B597720] int 3 M01_L01: mov ecx,2C7A mov edx,0B5198F8 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B5976F0] int 3 ; Total bytes of code 82 ``` ```assembly ; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) push ebp mov ebp,esp push edi push esi push ebx sub esp,44 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-48],xmm4 vmovdqu xmmword ptr [ebp-38],xmm4 xor eax,eax mov [ebp-28],eax mov [ebp-24],eax mov [ebp-18],eax mov [ebp-50],edx mov ebx,ecx xor ecx,ecx xor edx,edx mov eax,[ebp+10] test eax,eax je short M02_L01 mov ecx,[eax] test dword ptr [ecx],80000000 je near ptr M02_L06 lea ecx,[eax+8] mov edx,[eax+4] M02_L00: mov eax,[ebp+14] and eax,7FFFFFFF mov edi,[ebp+18] cmp eax,edx ja near ptr M02_L07 sub edx,eax cmp edx,edi jb near ptr M02_L07 add ecx,eax mov edx,edi M02_L01: mov edi,ecx mov eax,edx mov [ebp-4C],eax mov edx,[ebp+18] add edx,0C cmp edx,100000 jle short M02_L02 cmp edx,400000 jg short M02_L02 mov edx,100000 M02_L02: mov ecx,ds:[6EC4EA4] call dword ptr ds:[0B51D590]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-2C],eax xor ecx,ecx mov [ebp-28],ecx mov byte ptr [ebp-24],0 mov byte ptr [ebp-23],0 mov ecx,ds:[6EC4EA4] mov edx,200 call dword ptr ds:[0B51D590]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-34],eax mov ecx,[ebp-34] mov ecx,[ecx+4] mov [ebp-30],ecx push dword ptr [ebp-4C] push edi push dword ptr [ebp+0C] push dword ptr [ebp+8] lea ecx,[ebp-2C] lea edx,[ebp-34] call dword ptr ds:[0B595A08]; System.Text.Json.JsonDocument.Parse(System.ReadOnlySpan`1, System.Text.Json.JsonReaderOptions, MetadataDb ByRef, StackRowStack ByRef) jmp short M02_L03 lea ecx,[ebp-2C] call dword ptr ds:[0B595528]; System.Text.Json.JsonDocument+MetadataDb.Dispose() call CORINFO_HELP_RETHROW int 3 M02_L03: mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L05 push 0 mov ecx,ds:[6EC4EA4] call dword ptr ds:[0B51D594]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) jmp short M02_L05 mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L04 push 0 mov ecx,ds:[6EC4EA4] call dword ptr ds:[0B51D594]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) M02_L04: pop eax jmp eax M02_L05: mov ecx,offset MT_System.Text.Json.JsonDocument call CORINFO_HELP_NEWSFAST lea edi,[ebp-48] lea esi,[ebp-2C] movsd movsd movsd lea edi,[eax+10] lea esi,[ebp+10] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edi,[eax+1C] lea esi,[ebp-48] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[eax+8] mov esi,[ebp-50] call CORINFO_HELP_ASSIGN_REF_ESI mov byte ptr [eax+0C],1 lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 14 M02_L06: lea edx,[ebp-3C] mov ecx,eax mov eax,[eax] mov eax,[eax+28] call dword ptr [eax+14] mov ecx,[ebp-3C] mov edx,[ebp-38] jmp near ptr M02_L00 M02_L07: call dword ptr ds:[8835270] int 3 ; Total bytes of code 405 ``` ```assembly ; System.Text.Json.JsonDocument.Dispose() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+18] test edi,edi je short M03_L00 cmp byte ptr [esi+0C],0 jne short M03_L01 M03_L00: pop ebx pop esi pop edi pop ebp ret M03_L01: lea ebx,[esi+1C] xor ecx,ecx mov edx,ecx xchg edx,[ebx] test edx,edx je short M03_L02 push 0 mov ecx,ds:[6EC4EA4] call dword ptr ds:[0B51D594]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) xor ecx,ecx mov [ebx+4],ecx M03_L02: xor ecx,ecx mov [esi+10],ecx mov [esi+14],ecx mov [esi+18],ecx cmp dword ptr [esi+4],0 je short M03_L03 add esi,4 xor ecx,ecx mov ebx,ecx xchg ebx,[esi] test ebx,ebx je short M03_L04 mov ecx,[ebx+4] cmp ecx,edi jb short M03_L05 lea ecx,[ebx+8] mov edx,edi call dword ptr ds:[813F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push 0 mov ecx,ds:[6EC4EA4] mov edx,ebx call dword ptr ds:[0B51D594]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) pop ebx pop esi pop edi pop ebp ret M03_L03: cmp dword ptr [esi+8],0 je short M03_L04 lea ecx,[esi+8] xor eax,eax xchg eax,[ecx] test eax,eax je short M03_L04 mov ecx,eax call dword ptr ds:[0B51D23C]; System.Text.Json.PooledByteBufferWriter.Dispose() M03_L04: pop ebx pop esi pop edi pop ebp ret M03_L05: call dword ptr ds:[8835270] int 3 ; Total bytes of code 164 ``` ### Compare Jit Disasm ```assembly ; System.Text.Json.Document.Tests.Perf_DocumentParse.Parse() push ebp mov ebp,esp push edi push esi push ebx sub esp,28 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-34],xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov esi,ecx mov edi,[esi+4] test edi,edi je near ptr M00_L05 mov ebx,edi mov edi,[ebx+4] M00_L00: xor ecx,ecx mov [ebp-28],ecx mov [ebp-24],ecx lea ecx,[ebp-28] lea edx,[ebp-30] call dword ptr ds:[0B1B9D38]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push edi push 0 push ebx push dword ptr [ebp-2C] push dword ptr [ebp-30] xor ecx,ecx xor edx,edx call dword ptr ds:[0B1B9BE8]; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) mov edi,eax mov [ebp-34],edi cmp byte ptr [esi+0D],0 je near ptr M00_L04 mov esi,[esi+8] test esi,esi jne short M00_L01 mov ebx,edi cmp [ebx],bl mov eax,edi push 0 push eax call dword ptr ds:[0A4BF450] mov dword ptr [ebp-1C],0 mov dword ptr [ebp-18],0FC push offset M00_L06 jmp near ptr M00_L09 M00_L01: cmp esi,2 jne short M00_L02 mov ebx,edi cmp [ebx],bl mov eax,edi push 0 push eax call dword ptr ds:[0A4BF468] mov dword ptr [ebp-1C],0 mov dword ptr [ebp-18],0FC push offset M00_L07 jmp short M00_L09 M00_L02: cmp esi,1 jne short M00_L03 mov ebx,edi cmp [ebx],bl mov eax,edi push 0 push eax call dword ptr ds:[0A4BF480] mov dword ptr [ebp-1C],0 mov dword ptr [ebp-18],0FC push offset M00_L08 jmp short M00_L09 M00_L03: cmp esi,3 jne short M00_L04 mov ebx,edi cmp [ebx],bl mov eax,edi push 0 push eax call dword ptr ds:[0A4BF498] M00_L04: test edi,edi je short M00_L11 mov ecx,edi call dword ptr ds:[847D648]; System.Text.Json.JsonDocument.Dispose() jmp short M00_L11 M00_L05: xor ebx,ebx xor edi,edi jmp near ptr M00_L00 M00_L06: mov dword ptr [ebp-18],0 jmp short M00_L11 M00_L07: mov dword ptr [ebp-18],0 jmp short M00_L11 M00_L08: mov dword ptr [ebp-18],0 jmp short M00_L11 M00_L09: mov ebx,[ebp-34] test ebx,ebx je short M00_L10 mov ecx,ebx call dword ptr ds:[847D648]; System.Text.Json.JsonDocument.Dispose() M00_L10: pop eax jmp eax M00_L11: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 325 ``` ```assembly ; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebp mov ebp,esp push ebx movzx eax,byte ptr [ecx+5] movzx ebx,byte ptr [ecx+4] cmp ebx,2 jg short M01_L00 mov ecx,[ecx] test ecx,ecx jl short M01_L01 mov [edx],ecx mov [edx+4],bl mov [edx+5],al pop ebx pop ebp ret M01_L00: mov ecx,2C4E mov edx,847B298 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B1BB720] int 3 M01_L01: mov ecx,2C4E mov edx,847B298 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B1BB6F0] int 3 ; Total bytes of code 82 ``` ```assembly ; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) push ebp mov ebp,esp push edi push esi push ebx sub esp,44 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-48],xmm4 vmovdqu xmmword ptr [ebp-38],xmm4 xor eax,eax mov [ebp-28],eax mov [ebp-24],eax mov [ebp-18],eax mov [ebp-50],edx mov ebx,ecx xor ecx,ecx xor edx,edx mov eax,[ebp+10] test eax,eax je short M02_L01 mov ecx,[eax] test dword ptr [ecx],80000000 je near ptr M02_L05 lea ecx,[eax+8] mov edx,[eax+4] M02_L00: mov eax,[ebp+14] and eax,7FFFFFFF mov edi,[ebp+18] cmp eax,edx ja near ptr M02_L06 sub edx,eax cmp edx,edi jb near ptr M02_L06 add ecx,eax mov edx,edi M02_L01: mov edi,ecx mov eax,edx mov [ebp-4C],eax mov edx,[ebp+18] add edx,0C mov ecx,100000 cmp edx,400000 cmovg ecx,edx cmp edx,100000 cmovg edx,ecx mov ecx,ds:[6A64EA0] call dword ptr ds:[847EDA0]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-2C],eax xor ecx,ecx mov [ebp-28],ecx mov byte ptr [ebp-24],0 mov byte ptr [ebp-23],0 mov ecx,ds:[6A64EA0] mov edx,200 call dword ptr ds:[847EDA0]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-34],eax mov ecx,[ebp-34] mov ecx,[ecx+4] mov [ebp-30],ecx push dword ptr [ebp-4C] push edi push dword ptr [ebp+0C] push dword ptr [ebp+8] lea ecx,[ebp-2C] lea edx,[ebp-34] call dword ptr ds:[0B1B9A08]; System.Text.Json.JsonDocument.Parse(System.ReadOnlySpan`1, System.Text.Json.JsonReaderOptions, MetadataDb ByRef, StackRowStack ByRef) jmp short M02_L02 lea ecx,[ebp-2C] call dword ptr ds:[0B1B9528]; System.Text.Json.JsonDocument+MetadataDb.Dispose() call CORINFO_HELP_RETHROW int 3 M02_L02: mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L04 push 0 mov ecx,ds:[6A64EA0] call dword ptr ds:[847EDA4]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) jmp short M02_L04 mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L03 push 0 mov ecx,ds:[6A64EA0] call dword ptr ds:[847EDA4]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) M02_L03: pop eax jmp eax M02_L04: mov ecx,offset MT_System.Text.Json.JsonDocument call CORINFO_HELP_NEWSFAST lea edi,[ebp-48] lea esi,[ebp-2C] movsd movsd movsd lea edi,[eax+10] lea esi,[ebp+10] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edi,[eax+1C] lea esi,[ebp-48] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[eax+8] mov esi,[ebp-50] call CORINFO_HELP_ASSIGN_REF_ESI mov byte ptr [eax+0C],1 lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 14 M02_L05: lea edx,[ebp-3C] mov ecx,eax mov eax,[eax] mov eax,[eax+28] call dword ptr [eax+14] mov ecx,[ebp-3C] mov edx,[ebp-38] jmp near ptr M02_L00 M02_L06: call dword ptr ds:[8465270] int 3 ; Total bytes of code 407 ``` ```assembly ; System.Text.Json.JsonDocument.Dispose() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+18] test edi,edi je short M03_L00 cmp byte ptr [esi+0C],0 jne short M03_L01 M03_L00: pop ebx pop esi pop edi pop ebp ret M03_L01: lea ebx,[esi+1C] xor ecx,ecx mov edx,ecx xchg edx,[ebx] test edx,edx je short M03_L02 push 0 mov ecx,ds:[6A64EA0] call dword ptr ds:[847EDA4]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) xor ecx,ecx mov [ebx+4],ecx M03_L02: xor ecx,ecx mov [esi+10],ecx mov [esi+14],ecx mov [esi+18],ecx cmp dword ptr [esi+4],0 je short M03_L03 add esi,4 xor ecx,ecx mov ebx,ecx xchg ebx,[esi] test ebx,ebx je short M03_L04 mov ecx,[ebx+4] cmp ecx,edi jb short M03_L05 lea ecx,[ebx+8] mov edx,edi call dword ptr ds:[7D6F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push 0 mov ecx,ds:[6A64EA0] mov edx,ebx call dword ptr ds:[847EDA4]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) pop ebx pop esi pop edi pop ebp ret M03_L03: cmp dword ptr [esi+8],0 je short M03_L04 lea ecx,[esi+8] xor eax,eax xchg eax,[ecx] test eax,eax je short M03_L04 mov ecx,eax call dword ptr ds:[847EA4C]; System.Text.Json.PooledByteBufferWriter.Dispose() M03_L04: pop ebx pop esi pop edi pop ebp ret M03_L05: call dword ptr ds:[8465270] int 3 ; Total bytes of code 164 ``` #### System.Text.Json.Document.Tests.Perf_DocumentParse.Parse(IsDataIndented: True, TestRandomAccess: False, TestCase: Json400KB) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 1.1923763174603175 < 1.4089501153846153. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 236.84833502858672 (T) = (0 -1193001.35933719) / Math.Sqrt((69394419.49156627 / (299)) + (32526766.623712182 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.19222699854840355 = (1476901.7498645345 - 1193001.35933719) / 1476901.7498645345 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Text.Json.Document.Tests.Perf_DocumentParse.Parse() push ebp mov ebp,esp push edi push esi push ebx sub esp,28 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-34],xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov esi,ecx mov edi,[esi+4] test edi,edi je near ptr M00_L05 mov ebx,edi mov edi,[ebx+4] M00_L00: xor ecx,ecx mov [ebp-28],ecx mov [ebp-24],ecx lea ecx,[ebp-28] lea edx,[ebp-30] call dword ptr ds:[0BBCF6F0]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push edi push 0 push ebx push dword ptr [ebp-2C] push dword ptr [ebp-30] xor ecx,ecx xor edx,edx call dword ptr ds:[0BBCF5A0]; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) mov edi,eax mov [ebp-34],edi cmp byte ptr [esi+0D],0 je near ptr M00_L04 mov esi,[esi+8] test esi,esi jne short M00_L01 mov ebx,edi cmp [ebx],bl mov eax,edi push 0 push eax call dword ptr ds:[0B1BF450] mov dword ptr [ebp-1C],0 mov dword ptr [ebp-18],0FC push offset M00_L06 jmp near ptr M00_L09 M00_L01: cmp esi,2 jne short M00_L02 mov ebx,edi cmp [ebx],bl mov eax,edi push 0 push eax call dword ptr ds:[0B1BF468] mov dword ptr [ebp-1C],0 mov dword ptr [ebp-18],0FC push offset M00_L07 jmp short M00_L09 M00_L02: cmp esi,1 jne short M00_L03 mov ebx,edi cmp [ebx],bl mov eax,edi push 0 push eax call dword ptr ds:[0B1BF480] mov dword ptr [ebp-1C],0 mov dword ptr [ebp-18],0FC push offset M00_L08 jmp short M00_L09 M00_L03: cmp esi,3 jne short M00_L04 mov ebx,edi cmp [ebx],bl mov eax,edi push 0 push eax call dword ptr ds:[0B1BF498] M00_L04: test edi,edi je short M00_L11 mov ecx,edi call dword ptr ds:[0BBD1B3C]; System.Text.Json.JsonDocument.Dispose() jmp short M00_L11 M00_L05: xor ebx,ebx xor edi,edi jmp near ptr M00_L00 M00_L06: mov dword ptr [ebp-18],0 jmp short M00_L11 M00_L07: mov dword ptr [ebp-18],0 jmp short M00_L11 M00_L08: mov dword ptr [ebp-18],0 jmp short M00_L11 M00_L09: mov ebx,[ebp-34] test ebx,ebx je short M00_L10 mov ecx,ebx call dword ptr ds:[0BBD1B3C]; System.Text.Json.JsonDocument.Dispose() M00_L10: pop eax jmp eax M00_L11: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 325 ``` ```assembly ; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebp mov ebp,esp push ebx movzx eax,byte ptr [ecx+5] movzx ebx,byte ptr [ecx+4] cmp ebx,2 jg short M01_L00 mov ecx,[ecx] test ecx,ecx jl short M01_L01 mov [edx],ecx mov [edx+4],bl mov [edx+5],al pop ebx pop ebp ret M01_L00: mov ecx,2C7A mov edx,0BBAF5E8 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0BC81060] int 3 M01_L01: mov ecx,2C7A mov edx,0BBAF5E8 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0BC81030] int 3 ; Total bytes of code 82 ``` ```assembly ; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) push ebp mov ebp,esp push edi push esi push ebx sub esp,44 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-48],xmm4 vmovdqu xmmword ptr [ebp-38],xmm4 xor eax,eax mov [ebp-28],eax mov [ebp-24],eax mov [ebp-18],eax mov [ebp-50],edx mov ebx,ecx xor ecx,ecx xor edx,edx mov eax,[ebp+10] test eax,eax je short M02_L01 mov ecx,[eax] test dword ptr [ecx],80000000 je near ptr M02_L06 lea ecx,[eax+8] mov edx,[eax+4] M02_L00: mov eax,[ebp+14] and eax,7FFFFFFF mov edi,[ebp+18] cmp eax,edx ja near ptr M02_L07 sub edx,eax cmp edx,edi jb near ptr M02_L07 add ecx,eax mov edx,edi M02_L01: mov edi,ecx mov eax,edx mov [ebp-4C],eax mov edx,[ebp+18] add edx,0C cmp edx,100000 jle short M02_L02 cmp edx,400000 jg short M02_L02 mov edx,100000 M02_L02: mov ecx,ds:[77A4E80] call dword ptr ds:[0BBD327C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-2C],eax xor ecx,ecx mov [ebp-28],ecx mov byte ptr [ebp-24],0 mov byte ptr [ebp-23],0 mov ecx,ds:[77A4E80] mov edx,200 call dword ptr ds:[0BBD327C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-34],eax mov ecx,[ebp-34] mov ecx,[ecx+4] mov [ebp-30],ecx push dword ptr [ebp-4C] push edi push dword ptr [ebp+0C] push dword ptr [ebp+8] lea ecx,[ebp-2C] lea edx,[ebp-34] call dword ptr ds:[0BBCF3C0]; System.Text.Json.JsonDocument.Parse(System.ReadOnlySpan`1, System.Text.Json.JsonReaderOptions, MetadataDb ByRef, StackRowStack ByRef) jmp short M02_L03 lea ecx,[ebp-2C] call dword ptr ds:[0BBCDBA0]; System.Text.Json.JsonDocument+MetadataDb.Dispose() call CORINFO_HELP_RETHROW int 3 M02_L03: mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L05 push 0 mov ecx,ds:[77A4E80] call dword ptr ds:[0BBD3280]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) jmp short M02_L05 mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L04 push 0 mov ecx,ds:[77A4E80] call dword ptr ds:[0BBD3280]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) M02_L04: pop eax jmp eax M02_L05: mov ecx,offset MT_System.Text.Json.JsonDocument call CORINFO_HELP_NEWSFAST lea edi,[ebp-48] lea esi,[ebp-2C] movsd movsd movsd lea edi,[eax+10] lea esi,[ebp+10] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edi,[eax+1C] lea esi,[ebp-48] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[eax+8] mov esi,[ebp-50] call CORINFO_HELP_ASSIGN_REF_ESI mov byte ptr [eax+0C],1 lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 14 M02_L06: lea edx,[ebp-3C] mov ecx,eax mov eax,[eax] mov eax,[eax+28] call dword ptr [eax+14] mov ecx,[ebp-3C] mov edx,[ebp-38] jmp near ptr M02_L00 M02_L07: call dword ptr ds:[9165270] int 3 ; Total bytes of code 405 ``` ```assembly ; System.Text.Json.JsonDocument.Dispose() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+18] test edi,edi je short M03_L00 cmp byte ptr [esi+0C],0 jne short M03_L01 M03_L00: pop ebx pop esi pop edi pop ebp ret M03_L01: lea ebx,[esi+1C] xor ecx,ecx mov edx,ecx xchg edx,[ebx] test edx,edx je short M03_L02 push 0 mov ecx,ds:[77A4E80] call dword ptr ds:[0BBD3280]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) xor ecx,ecx mov [ebx+4],ecx M03_L02: xor ecx,ecx mov [esi+10],ecx mov [esi+14],ecx mov [esi+18],ecx cmp dword ptr [esi+4],0 je short M03_L03 add esi,4 xor ecx,ecx mov ebx,ecx xchg ebx,[esi] test ebx,ebx je short M03_L04 mov ecx,[ebx+4] cmp ecx,edi jb short M03_L05 lea ecx,[ebx+8] mov edx,edi call dword ptr ds:[8A6F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push 0 mov ecx,ds:[77A4E80] mov edx,ebx call dword ptr ds:[0BBD3280]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) pop ebx pop esi pop edi pop ebp ret M03_L03: cmp dword ptr [esi+8],0 je short M03_L04 lea ecx,[esi+8] xor eax,eax xchg eax,[ecx] test eax,eax je short M03_L04 mov ecx,eax call dword ptr ds:[0BBD2F2C]; System.Text.Json.PooledByteBufferWriter.Dispose() M03_L04: pop ebx pop esi pop edi pop ebp ret M03_L05: call dword ptr ds:[9165270] int 3 ; Total bytes of code 164 ``` ### Compare Jit Disasm ```assembly ; System.Text.Json.Document.Tests.Perf_DocumentParse.Parse() push ebp mov ebp,esp push edi push esi push ebx sub esp,28 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-34],xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov esi,ecx mov edi,[esi+4] test edi,edi je near ptr M00_L05 mov ebx,edi mov edi,[ebx+4] M00_L00: xor ecx,ecx mov [ebp-28],ecx mov [ebp-24],ecx lea ecx,[ebp-28] lea edx,[ebp-30] call dword ptr ds:[0B4BF6F0]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push edi push 0 push ebx push dword ptr [ebp-2C] push dword ptr [ebp-30] xor ecx,ecx xor edx,edx call dword ptr ds:[0B4BF5A0]; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) mov edi,eax mov [ebp-34],edi cmp byte ptr [esi+0D],0 je near ptr M00_L04 mov esi,[esi+8] test esi,esi jne short M00_L01 mov ebx,edi cmp [ebx],bl mov eax,edi push 0 push eax call dword ptr ds:[0AAAF450] mov dword ptr [ebp-1C],0 mov dword ptr [ebp-18],0FC push offset M00_L06 jmp near ptr M00_L09 M00_L01: cmp esi,2 jne short M00_L02 mov ebx,edi cmp [ebx],bl mov eax,edi push 0 push eax call dword ptr ds:[0AAAF468] mov dword ptr [ebp-1C],0 mov dword ptr [ebp-18],0FC push offset M00_L07 jmp short M00_L09 M00_L02: cmp esi,1 jne short M00_L03 mov ebx,edi cmp [ebx],bl mov eax,edi push 0 push eax call dword ptr ds:[0AAAF480] mov dword ptr [ebp-1C],0 mov dword ptr [ebp-18],0FC push offset M00_L08 jmp short M00_L09 M00_L03: cmp esi,3 jne short M00_L04 mov ebx,edi cmp [ebx],bl mov eax,edi push 0 push eax call dword ptr ds:[0AAAF498] M00_L04: test edi,edi je short M00_L11 mov ecx,edi call dword ptr ds:[0B4A2224]; System.Text.Json.JsonDocument.Dispose() jmp short M00_L11 M00_L05: xor ebx,ebx xor edi,edi jmp near ptr M00_L00 M00_L06: mov dword ptr [ebp-18],0 jmp short M00_L11 M00_L07: mov dword ptr [ebp-18],0 jmp short M00_L11 M00_L08: mov dword ptr [ebp-18],0 jmp short M00_L11 M00_L09: mov ebx,[ebp-34] test ebx,ebx je short M00_L10 mov ecx,ebx call dword ptr ds:[0B4A2224]; System.Text.Json.JsonDocument.Dispose() M00_L10: pop eax jmp eax M00_L11: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 325 ``` ```assembly ; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push ebp mov ebp,esp push ebx movzx eax,byte ptr [ecx+5] movzx ebx,byte ptr [ecx+4] cmp ebx,2 jg short M01_L00 mov ecx,[ecx] test ecx,ecx jl short M01_L01 mov [edx],ecx mov [edx+4],bl mov [edx+5],al pop ebx pop ebp ret M01_L00: mov ecx,2C4E mov edx,0B4A0000 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B4C1060] int 3 M01_L01: mov ecx,2C4E mov edx,0B4A0000 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[0B4C1030] int 3 ; Total bytes of code 82 ``` ```assembly ; System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, Byte[], System.Text.Json.PooledByteBufferWriter) push ebp mov ebp,esp push edi push esi push ebx sub esp,44 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-48],xmm4 vmovdqu xmmword ptr [ebp-38],xmm4 xor eax,eax mov [ebp-28],eax mov [ebp-24],eax mov [ebp-18],eax mov [ebp-50],edx mov ebx,ecx xor ecx,ecx xor edx,edx mov eax,[ebp+10] test eax,eax je short M02_L01 mov ecx,[eax] test dword ptr [ecx],80000000 je near ptr M02_L05 lea ecx,[eax+8] mov edx,[eax+4] M02_L00: mov eax,[ebp+14] and eax,7FFFFFFF mov edi,[ebp+18] cmp eax,edx ja near ptr M02_L06 sub edx,eax cmp edx,edi jb near ptr M02_L06 add ecx,eax mov edx,edi M02_L01: mov edi,ecx mov eax,edx mov [ebp-4C],eax mov edx,[ebp+18] add edx,0C mov ecx,100000 cmp edx,400000 cmovg ecx,edx cmp edx,100000 cmovg edx,ecx mov ecx,ds:[71A4E84] call dword ptr ds:[0B4A3978]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-2C],eax xor ecx,ecx mov [ebp-28],ecx mov byte ptr [ebp-24],0 mov byte ptr [ebp-23],0 mov ecx,ds:[71A4E84] mov edx,200 call dword ptr ds:[0B4A3978]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Rent(Int32) mov [ebp-34],eax mov ecx,[ebp-34] mov ecx,[ecx+4] mov [ebp-30],ecx push dword ptr [ebp-4C] push edi push dword ptr [ebp+0C] push dword ptr [ebp+8] lea ecx,[ebp-2C] lea edx,[ebp-34] call dword ptr ds:[0B4BF3C0]; System.Text.Json.JsonDocument.Parse(System.ReadOnlySpan`1, System.Text.Json.JsonReaderOptions, MetadataDb ByRef, StackRowStack ByRef) jmp short M02_L02 lea ecx,[ebp-2C] call dword ptr ds:[0B4BDBA0]; System.Text.Json.JsonDocument+MetadataDb.Dispose() call CORINFO_HELP_RETHROW int 3 M02_L02: mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L04 push 0 mov ecx,ds:[71A4E84] call dword ptr ds:[0B4A397C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) jmp short M02_L04 mov edx,[ebp-34] xor ecx,ecx mov [ebp-34],ecx mov [ebp-30],ecx test edx,edx je short M02_L03 push 0 mov ecx,ds:[71A4E84] call dword ptr ds:[0B4A397C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) M02_L03: pop eax jmp eax M02_L04: mov ecx,offset MT_System.Text.Json.JsonDocument call CORINFO_HELP_NEWSFAST lea edi,[ebp-48] lea esi,[ebp-2C] movsd movsd movsd lea edi,[eax+10] lea esi,[ebp+10] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edi,[eax+1C] lea esi,[ebp-48] call CORINFO_HELP_ASSIGN_BYREF movsd movsd lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[eax+8] mov esi,[ebp-50] call CORINFO_HELP_ASSIGN_REF_ESI mov byte ptr [eax+0C],1 lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 14 M02_L05: lea edx,[ebp-3C] mov ecx,eax mov eax,[eax] mov eax,[eax+28] call dword ptr [eax+14] mov ecx,[ebp-3C] mov edx,[ebp-38] jmp near ptr M02_L00 M02_L06: call dword ptr ds:[8A55270] int 3 ; Total bytes of code 407 ``` ```assembly ; System.Text.Json.JsonDocument.Dispose() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+18] test edi,edi je short M03_L00 cmp byte ptr [esi+0C],0 jne short M03_L01 M03_L00: pop ebx pop esi pop edi pop ebp ret M03_L01: lea ebx,[esi+1C] xor ecx,ecx mov edx,ecx xchg edx,[ebx] test edx,edx je short M03_L02 push 0 mov ecx,ds:[71A4E84] call dword ptr ds:[0B4A397C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) xor ecx,ecx mov [ebx+4],ecx M03_L02: xor ecx,ecx mov [esi+10],ecx mov [esi+14],ecx mov [esi+18],ecx cmp dword ptr [esi+4],0 je short M03_L03 add esi,4 xor ecx,ecx mov ebx,ecx xchg ebx,[esi] test ebx,ebx je short M03_L04 mov ecx,[ebx+4] cmp ecx,edi jb short M03_L05 lea ecx,[ebx+8] mov edx,edi call dword ptr ds:[835F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push 0 mov ecx,ds:[71A4E84] mov edx,ebx call dword ptr ds:[0B4A397C]; System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1[[System.Byte, System.Private.CoreLib]].Return(Byte[], Boolean) pop ebx pop esi pop edi pop ebp ret M03_L03: cmp dword ptr [esi+8],0 je short M03_L04 lea ecx,[esi+8] xor eax,eax xchg eax,[ecx] test eax,eax je short M03_L04 mov ecx,eax call dword ptr ds:[0B4A3628]; System.Text.Json.PooledByteBufferWriter.Dispose() M03_L04: pop ebx pop esi pop edi pop ebp ret M03_L05: call dword ptr ds:[8A55270] int 3 ; Total bytes of code 164 ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in MicroBenchmarks.Serializers.Json_FromStream<MyEventsListerViewModel>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[SystemTextJsonReflection - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/MicroBenchmarks.Serializers.Json_FromStream(MyEventsListerViewModel).SystemTextJsonReflection.html>) 464.91 μs 400.59 μs 0.86 0.05 False
[SystemTextJsonSourceGen - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/MicroBenchmarks.Serializers.Json_FromStream(MyEventsListerViewModel).SystemTextJsonSourceGen.html>) 481.90 μs 422.55 μs 0.88 0.06 False

graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'MicroBenchmarks.Serializers.Json_FromStream&lt;MyEventsListerViewModel&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### MicroBenchmarks.Serializers.Json_FromStream<MyEventsListerViewModel>.SystemTextJson_Reflection_ ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 400.58993321790757 < 457.6701798313323. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 110.87953584978341 (T) = (0 -403129.3881014203) / Math.Sqrt((90252944.05904807 / (299)) + (6075903.318767454 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.16642182252706486 = (483613.173899948 - 403129.3881014203) / 483613.173899948 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### MicroBenchmarks.Serializers.Json_FromStream<MyEventsListerViewModel>.SystemTextJson_SourceGen_ ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 422.54751126126126 < 459.24669902364093. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 70.97067673744141 (T) = (0 -402938.192154689) / Math.Sqrt((98115850.42028974 / (299)) + (25974438.60243052 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.16670913834613893 = (483550.4752265778 - 402938.192154689) / 483550.4752265778 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)
performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 59dddfdef247b9b85a69d663a1d1c1746206711e
Compare 081d93a5e8817d47e660a38404c08364c286172f
Diff Diff

Improvements in System.Text.Json.Node.Tests.Perf_ParseThenWrite

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[ParseThenWrite - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Node.Tests.Perf_ParseThenWrite.ParseThenWrite(IsDataIndented%3a%20False%2c%20TestCase%3a%20Json400KB).html>) 5.06 ms 4.77 ms 0.94 0.01 False 40621333.333333336 37812636.165577345 0.9308565983123156) Trace Trace
[ParseThenWrite - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Node.Tests.Perf_ParseThenWrite.ParseThenWrite(IsDataIndented%3a%20True%2c%20TestCase%3a%20LotsOfStrings).html>) 10.76 μs 10.10 μs 0.94 0.01 False 91191.26268487933 88769.07763769077 0.9734384087260787) Trace Trace
[ParseThenWrite - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Node.Tests.Perf_ParseThenWrite.ParseThenWrite(IsDataIndented%3a%20False%2c%20TestCase%3a%20Json4KB).html>) 45.99 μs 43.20 μs 0.94 0.01 False 355626.84783292445 343824.2069821017 0.9668117271720507) Trace Trace
[ParseThenWrite - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Text.Json.Node.Tests.Perf_ParseThenWrite.ParseThenWrite(IsDataIndented%3a%20True%2c%20TestCase%3a%20Json4KB).html>) 50.69 μs 47.49 μs 0.94 0.01 False 398063.97306397307 386988.36144893424 0.9721763023923321) Trace Trace

graph graph graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Node.Tests.Perf_ParseThenWrite*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Text.Json.Node.Tests.Perf_ParseThenWrite.ParseThenWrite(IsDataIndented: False, TestCase: Json400KB) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 4.767432075471699 < 4.843289472222222. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 5:52:57 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 36.7894433277995 (T) = (0 -4795686.976608758) / Math.Sqrt((10163143464.438185 / (299)) + (1746287708.095511 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.07080545134103261 = (5161122.59109784 - 4795686.976608758) / 5161122.59109784 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Text.Json.Node.Tests.Perf_ParseThenWrite.ParseThenWrite() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+8] cmp dword ptr [edi+10],0 jne short M00_L00 cmp dword ptr [edi+0C],0 je near ptr M00_L05 M00_L00: mov ebx,[edi+14] test ebx,ebx je short M00_L02 mov ecx,[ebx+4] mov edx,[ebx+8] test ecx,ecx je near ptr M00_L06 mov eax,[ecx+4] cmp [ecx+4],edx jb near ptr M00_L07 add ecx,8 M00_L01: call dword ptr ds:[57DF390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) xor ecx,ecx mov [ebx+8],ecx M00_L02: mov ecx,edi call dword ptr ds:[0BA6D510]; System.Text.Json.Utf8JsonWriter.ResetHelper() mov eax,[esi+4] test eax,eax je short M00_L04 lea edx,[eax+8] mov ecx,[eax+4] M00_L03: push ecx push edx sub esp,4 xor eax,eax mov [esp+1],al xor eax,eax mov [esp],al push 0 call dword ptr ds:[0BE53AE0]; System.Text.Json.JsonDocument.ParseValue(System.ReadOnlySpan`1, System.Text.Json.JsonDocumentOptions) cmp [eax],al push 0 push eax sub esp,4 xor eax,eax mov [esp+1],al xor eax,eax mov [esp],al call dword ptr ds:[0BE51DB0]; System.Text.Json.Serialization.Converters.JsonNodeConverter.Create(System.Text.Json.JsonElement, System.Nullable`1) mov edi,eax mov ecx,edi call dword ptr ds:[0B0BF480]; System.Text.Json.Node.Tests.Perf_ParseThenWrite.g__WalkNode|7_0(System.Text.Json.Nodes.JsonNode) mov edx,[esi+8] push 0 mov ecx,edi mov eax,[edi] mov eax,[eax+2C] call dword ptr [eax+8] pop ebx pop esi pop edi pop ebp ret M00_L04: xor edx,edx xor ecx,ecx jmp short M00_L03 M00_L05: call dword ptr ds:[0BDC1A98] int 3 M00_L06: test edx,edx jne short M00_L07 xor ecx,ecx xor edx,edx jmp near ptr M00_L01 M00_L07: call dword ptr ds:[9065270] int 3 ; Total bytes of code 207 ``` ```assembly ; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push ebp mov ebp,esp push edi push esi push ebx M01_L00: test edx,edx je short M01_L08 xor eax,eax mov esi,edx sub esi,1 sbb eax,0 cmp esi,16 sbb eax,0 jb short M01_L09 M01_L01: cmp edx,200 jae near ptr M01_L15 xor edi,edi mov eax,ecx test al,3 jne near ptr M01_L16 M01_L02: mov eax,ecx dec eax test al,4 je short M01_L10 M01_L03: lea eax,[edx-10] sub edx,edi M01_L04: lea esi,[edi+10] xor ebx,ebx mov [ecx+edi],ebx mov [ecx+edi+4],ebx mov [ecx+edi+8],ebx mov [ecx+edi+0C],ebx mov edi,esi cmp edi,eax jbe short M01_L04 test dl,8 je short M01_L05 xor eax,eax mov [ecx+edi],eax mov [ecx+edi+4],eax add edi,8 M01_L05: test dl,4 jne short M01_L13 M01_L06: test dl,2 jne short M01_L11 M01_L07: test dl,1 jne short M01_L12 M01_L08: pop ebx pop esi pop edi pop ebp ret M01_L09: cmp esi,0B jne short M01_L14 xor edx,edx mov [ecx],edx mov [ecx+4],edx mov [ecx+8],edx jmp short M01_L08 M01_L10: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L03 M01_L11: mov word ptr [ecx+edi],0 add edi,2 jmp short M01_L07 M01_L12: mov byte ptr [ecx+edi],0 jmp short M01_L08 M01_L13: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L06 M01_L14: cmp esi,15 ja near ptr M01_L01 lea eax,ds:[0C33CD80] mov eax,[eax+esi*4] lea edx,[M01_L00] add eax,edx jmp eax xor eax,eax mov [ecx],eax jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 mov byte ptr [ecx+6],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov byte ptr [ecx+4],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 mov byte ptr [ecx+12],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov byte ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 mov byte ptr [ecx+0E],0 jmp near ptr M01_L08 M01_L15: call dword ptr ds:[8F71858] jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov word ptr [ecx+14],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 mov byte ptr [ecx+0A],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov byte ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov byte ptr [ecx+10],0 jmp near ptr M01_L08 mov word ptr [ecx],0 jmp near ptr M01_L08 mov word ptr [ecx],0 mov byte ptr [ecx+2],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov byte ptr [ecx+14],0 jmp near ptr M01_L08 M01_L16: mov eax,ecx test al,1 je short M01_L17 mov byte ptr [ecx],0 mov edi,1 mov eax,ecx test al,2 jne near ptr M01_L02 M01_L17: mov word ptr [ecx+edi],0 add edi,2 jmp near ptr M01_L02 mov byte ptr [ecx],0 jmp near ptr M01_L08 ; Total bytes of code 635 ``` ```assembly ; System.Text.Json.Utf8JsonWriter.ResetHelper() vzeroupper xor eax,eax mov [ecx+1C],eax lea eax,[ecx+4] xor edx,edx mov [eax],edx mov [eax+4],edx mov [ecx+24],edx mov [ecx+28],edx mov [ecx+2C],edx mov byte ptr [ecx+20],0 mov byte ptr [ecx+22],0 mov byte ptr [ecx+21],0 mov [ecx+18],edx vxorps xmm0,xmm0,xmm0 vmovq qword ptr [ecx+30],xmm0 vmovq qword ptr [ecx+38],xmm0 ret ; Total bytes of code 57 ``` ```assembly ; System.Text.Json.JsonDocument.ParseValue(System.ReadOnlySpan`1, System.Text.Json.JsonDocumentOptions) push ebp mov ebp,esp push edi push esi sub esp,8 mov esi,[ebp+14] mov edx,esi mov ecx,offset MT_System.Byte[] call CORINFO_HELP_NEWARR_1_VC mov edi,eax lea ecx,[edi+8] mov edx,[edi+4] cmp esi,edx ja short M03_L00 mov edx,[ebp+10] push esi call dword ptr ds:[8F71828]; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr) mov esi,[edi+4] lea ecx,[ebp+8] lea edx,[ebp-10] call dword ptr ds:[0BE3F900]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push esi push 0 push edi push dword ptr [ebp-0C] push dword ptr [ebp-10] xor ecx,ecx call dword ptr ds:[0BE53C00]; System.Text.Json.JsonDocument.ParseUnrented(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, System.Text.Json.JsonTokenType) lea esp,[ebp-8] pop esi pop edi pop ebp ret 10 M03_L00: call dword ptr ds:[9065288] int 3 ; Total bytes of code 94 ``` ```assembly ; System.Text.Json.Serialization.Converters.JsonNodeConverter.Create(System.Text.Json.JsonElement, System.Nullable`1) push ebp mov ebp,esp push edi push esi push ebx sub esp,18 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov [ebp-10],eax mov ecx,[ebp+0C] test ecx,ecx jne short M04_L00 xor ecx,ecx jmp short M04_L02 M04_L00: mov eax,[ebp+10] cmp dword ptr [ecx+18],0 je near ptr M04_L07 mov ecx,[ecx+1C] add eax,8 test ecx,ecx je near ptr M04_L08 cmp [ecx+4],eax jb near ptr M04_L09 lea edx,[ecx+eax+8] mov ecx,[ecx+4] sub ecx,eax M04_L01: cmp ecx,4 jl near ptr M04_L10 mov ecx,[edx] shr ecx,1C movzx ecx,cl M04_L02: call dword ptr ds:[0BE5B990]; System.Text.Json.JsonReaderHelper.ToValueKind(System.Text.Json.JsonTokenType) cmp eax,1 je short M04_L03 cmp eax,2 je short M04_L04 cmp eax,7 jne short M04_L05 xor eax,eax jmp near ptr M04_L06 M04_L03: mov ecx,offset MT_System.Text.Json.Nodes.JsonObject call CORINFO_HELP_NEWSFAST movzx ecx,word ptr [ebp+8] mov [eax+8],cx xor ecx,ecx mov [ebp-18],ecx mov [ebp-14],ecx mov [ebp-10],ecx lea edi,[ebp-14] lea esi,[ebp+0C] movsd movsd mov byte ptr [ebp-18],1 lea edi,[eax+10] lea esi,[ebp-18] movsd call CORINFO_HELP_ASSIGN_BYREF movsd jmp short M04_L06 M04_L04: mov ecx,offset MT_System.Text.Json.Nodes.JsonArray call CORINFO_HELP_NEWSFAST movzx ecx,word ptr [ebp+8] mov [eax+8],cx xor ecx,ecx mov [ebp-24],ecx mov [ebp-20],ecx mov [ebp-1C],ecx lea edi,[ebp-20] lea esi,[ebp+0C] movsd movsd mov byte ptr [ebp-24],1 lea edi,[eax+10] lea esi,[ebp-24] movsd call CORINFO_HELP_ASSIGN_BYREF movsd jmp short M04_L06 M04_L05: mov ecx,offset MT_System.Text.Json.Nodes.JsonValueTrimmable`1[[System.Text.Json.JsonElement, System.Text.Json]] call CORINFO_HELP_NEWSFAST mov ebx,eax call dword ptr ds:[0BE83B40]; System.Text.Json.Serialization.Metadata.JsonMetadataServices.get_JsonElementConverter() movzx ecx,word ptr [ebp+8] mov [ebx+8],cx lea edi,[ebx+0C] lea esi,[ebp+0C] call CORINFO_HELP_ASSIGN_BYREF movsd lea edx,[ebx+18] call CORINFO_HELP_ASSIGN_REF_EAX mov eax,ebx M04_L06: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 0C M04_L07: call dword ptr ds:[0BDC1AB0] int 3 M04_L08: test eax,eax jne short M04_L09 xor edx,edx xor ecx,ecx jmp near ptr M04_L01 M04_L09: call dword ptr ds:[9065270] int 3 M04_L10: mov ecx,29 call dword ptr ds:[90655B8] int 3 ; Total bytes of code 336 ``` ```assembly ; System.Text.Json.Node.Tests.Perf_ParseThenWrite.g__WalkNode|7_0(System.Text.Json.Nodes.JsonNode) M05_L00: push ebp mov ebp,esp push esi push ebx sub esp,24 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov [ebp-10],eax mov esi,ecx test esi,esi je short M05_L01 cmp dword ptr [esi],offset MT_System.Text.Json.Nodes.JsonObject je short M05_L03 M05_L01: test ecx,ecx je short M05_L02 cmp dword ptr [ecx],offset MT_System.Text.Json.Nodes.JsonArray je short M05_L07 M05_L02: lea esp,[ebp-8] pop ebx pop esi pop ebp ret M05_L03: cmp dword ptr [esi+0C],0 jne short M05_L04 mov ecx,esi call dword ptr ds:[0BE83528]; System.Text.Json.Nodes.JsonObject.g__InitializeCore|32_0() M05_L04: mov ebx,[esi+0C] cmp [ebx],bl mov ecx,offset MT_System.Text.Json.JsonPropertyDictionary`1+d__18[[System.Text.Json.Nodes.JsonNode, System.Text.Json]] call CORINFO_HELP_NEWSFAST mov esi,eax xor edx,edx mov [esi+8],edx lea edx,[esi+4] call CORINFO_HELP_ASSIGN_REF_EBX mov [ebp-28],esi mov ecx,esi call dword ptr ds:[0BE6FA60]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].MoveNext() test eax,eax je short M05_L06 M05_L05: lea edx,[ebp-24] mov ecx,esi call dword ptr ds:[0BE6FA64]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.Collections.Generic.IEnumerator>.get_Current() mov ecx,[ebp-20] call dword ptr ds:[0B0BF480] mov ecx,esi call dword ptr ds:[0BE6FA60]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].MoveNext() test eax,eax jne short M05_L05 M05_L06: mov ecx,esi call dword ptr ds:[0BE6FA5C]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.IDisposable.Dispose() jmp short M05_L11 mov ecx,[ebp-28] call dword ptr ds:[0BE6FA5C]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.IDisposable.Dispose() pop eax jmp eax M05_L07: cmp [ecx],ecx call dword ptr ds:[0BE696B4]; System.Text.Json.Nodes.JsonArray.GetEnumerator() mov ebx,eax mov [ebp-2C],ebx mov ecx,ebx call dword ptr ds:[3510418] test eax,eax je short M05_L09 M05_L08: mov ecx,ebx call dword ptr ds:[351041C] mov ecx,eax call dword ptr ds:[0B0BF480] mov ecx,ebx call dword ptr ds:[3510418] test eax,eax jne short M05_L08 M05_L09: mov ecx,ebx call dword ptr ds:[3510420] jmp short M05_L11 cmp dword ptr [ebp-2C],0 je short M05_L10 mov ecx,[ebp-2C] call dword ptr ds:[3510420] M05_L10: pop eax jmp eax M05_L11: lea esp,[ebp-8] pop ebx pop esi pop ebp ret ; Total bytes of code 259 ``` ### Compare Jit Disasm ```assembly ; System.Text.Json.Node.Tests.Perf_ParseThenWrite.ParseThenWrite() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+8] cmp dword ptr [edi+10],0 jne short M00_L00 cmp dword ptr [edi+0C],0 je near ptr M00_L05 M00_L00: mov ebx,[edi+14] test ebx,ebx je short M00_L02 mov ecx,[ebx+4] mov edx,[ebx+8] test ecx,ecx je near ptr M00_L06 mov eax,[ecx+4] cmp [ecx+4],edx jb near ptr M00_L07 add ecx,8 M00_L01: call dword ptr ds:[505F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) xor ecx,ecx mov [ebx+8],ecx M00_L02: mov ecx,edi call dword ptr ds:[0B5CDA50]; System.Text.Json.Utf8JsonWriter.ResetHelper() mov eax,[esi+4] test eax,eax je short M00_L04 lea edx,[eax+8] mov ecx,[eax+4] M00_L03: push ecx push edx sub esp,4 xor eax,eax mov [esp+1],al xor eax,eax mov [esp],al push 0 call dword ptr ds:[0B9A58A0]; System.Text.Json.JsonDocument.ParseValue(System.ReadOnlySpan`1, System.Text.Json.JsonDocumentOptions) cmp [eax],al push 0 push eax sub esp,4 xor eax,eax mov [esp+1],al xor eax,eax mov [esp],al call dword ptr ds:[0B9A3D68]; System.Text.Json.Serialization.Converters.JsonNodeConverter.Create(System.Text.Json.JsonElement, System.Nullable`1) mov edi,eax mov ecx,edi call dword ptr ds:[0AC0F480]; System.Text.Json.Node.Tests.Perf_ParseThenWrite.g__WalkNode|7_0(System.Text.Json.Nodes.JsonNode) mov edx,[esi+8] push 0 mov ecx,edi mov eax,[edi] mov eax,[eax+2C] call dword ptr [eax+8] pop ebx pop esi pop edi pop ebp ret M00_L04: xor edx,edx xor ecx,ecx jmp short M00_L03 M00_L05: call dword ptr ds:[0B933A98] int 3 M00_L06: test edx,edx jne short M00_L07 xor ecx,ecx xor edx,edx jmp near ptr M00_L01 M00_L07: call dword ptr ds:[8B45270] int 3 ; Total bytes of code 207 ``` ```assembly ; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push ebp mov ebp,esp push edi push esi push ebx M01_L00: test edx,edx je short M01_L08 xor eax,eax mov esi,edx sub esi,1 sbb eax,0 cmp esi,16 sbb eax,0 jb short M01_L09 M01_L01: cmp edx,200 jae near ptr M01_L15 xor edi,edi mov eax,ecx test al,3 jne near ptr M01_L16 M01_L02: mov eax,ecx dec eax test al,4 je short M01_L10 M01_L03: lea eax,[edx-10] sub edx,edi M01_L04: lea esi,[edi+10] xor ebx,ebx mov [ecx+edi],ebx mov [ecx+edi+4],ebx mov [ecx+edi+8],ebx mov [ecx+edi+0C],ebx mov edi,esi cmp edi,eax jbe short M01_L04 test dl,8 je short M01_L05 xor eax,eax mov [ecx+edi],eax mov [ecx+edi+4],eax add edi,8 M01_L05: test dl,4 jne short M01_L13 M01_L06: test dl,2 jne short M01_L11 M01_L07: test dl,1 jne short M01_L12 M01_L08: pop ebx pop esi pop edi pop ebp ret M01_L09: cmp esi,0B jne short M01_L14 xor edx,edx mov [ecx],edx mov [ecx+4],edx mov [ecx+8],edx jmp short M01_L08 M01_L10: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L03 M01_L11: mov word ptr [ecx+edi],0 add edi,2 jmp short M01_L07 M01_L12: mov byte ptr [ecx+edi],0 jmp short M01_L08 M01_L13: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L06 M01_L14: cmp esi,15 ja near ptr M01_L01 lea eax,ds:[0BCBB820] mov eax,[eax+esi*4] lea edx,[M01_L00] add eax,edx jmp eax xor eax,eax mov [ecx],eax jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 mov byte ptr [ecx+6],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov byte ptr [ecx+4],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 mov byte ptr [ecx+12],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov byte ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 mov byte ptr [ecx+0E],0 jmp near ptr M01_L08 M01_L15: call dword ptr ds:[8A51870] jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov word ptr [ecx+14],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 mov byte ptr [ecx+0A],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov byte ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov byte ptr [ecx+10],0 jmp near ptr M01_L08 mov word ptr [ecx],0 jmp near ptr M01_L08 mov word ptr [ecx],0 mov byte ptr [ecx+2],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov byte ptr [ecx+14],0 jmp near ptr M01_L08 M01_L16: mov eax,ecx test al,1 je short M01_L17 mov byte ptr [ecx],0 mov edi,1 mov eax,ecx test al,2 jne near ptr M01_L02 M01_L17: mov word ptr [ecx+edi],0 add edi,2 jmp near ptr M01_L02 mov byte ptr [ecx],0 jmp near ptr M01_L08 ; Total bytes of code 635 ``` ```assembly ; System.Text.Json.Utf8JsonWriter.ResetHelper() vzeroupper xor eax,eax mov [ecx+1C],eax lea eax,[ecx+4] xor edx,edx mov [eax],edx mov [eax+4],edx mov [ecx+24],edx mov [ecx+28],edx mov [ecx+2C],edx mov byte ptr [ecx+20],0 mov byte ptr [ecx+22],0 mov byte ptr [ecx+21],0 mov [ecx+18],edx vxorps xmm0,xmm0,xmm0 vmovq qword ptr [ecx+30],xmm0 vmovq qword ptr [ecx+38],xmm0 ret ; Total bytes of code 57 ``` ```assembly ; System.Text.Json.JsonDocument.ParseValue(System.ReadOnlySpan`1, System.Text.Json.JsonDocumentOptions) push ebp mov ebp,esp push edi push esi sub esp,8 mov esi,[ebp+14] mov edx,esi mov ecx,offset MT_System.Byte[] call CORINFO_HELP_NEWARR_1_VC mov edi,eax lea ecx,[edi+8] mov edx,[edi+4] cmp esi,edx ja short M03_L00 mov edx,[ebp+10] push esi call dword ptr ds:[8A51840]; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr) mov esi,[edi+4] lea ecx,[ebp+8] lea edx,[ebp-10] call dword ptr ds:[0B9A1900]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push esi push 0 push edi push dword ptr [ebp-0C] push dword ptr [ebp-10] xor ecx,ecx call dword ptr ds:[0B9A59C0]; System.Text.Json.JsonDocument.ParseUnrented(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, System.Text.Json.JsonTokenType) lea esp,[ebp-8] pop esi pop edi pop ebp ret 10 M03_L00: call dword ptr ds:[8B45288] int 3 ; Total bytes of code 94 ``` ```assembly ; System.Text.Json.Serialization.Converters.JsonNodeConverter.Create(System.Text.Json.JsonElement, System.Nullable`1) push ebp mov ebp,esp push edi push esi push ebx sub esp,1C vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov [ebp-10],eax mov ebx,[ebp+8] mov ecx,[ebp+0C] test ecx,ecx jne short M04_L00 xor ecx,ecx jmp short M04_L02 M04_L00: mov eax,[ebp+10] cmp dword ptr [ecx+18],0 je near ptr M04_L07 mov ecx,[ecx+1C] add eax,8 test ecx,ecx je near ptr M04_L08 cmp [ecx+4],eax jb near ptr M04_L09 lea edx,[ecx+eax+8] mov ecx,[ecx+4] sub ecx,eax M04_L01: cmp ecx,4 jl near ptr M04_L10 mov ecx,[edx] shr ecx,1C movzx ecx,cl M04_L02: call dword ptr ds:[0B9AD030]; System.Text.Json.JsonReaderHelper.ToValueKind(System.Text.Json.JsonTokenType) cmp eax,1 je short M04_L03 cmp eax,2 je short M04_L04 cmp eax,7 jne short M04_L05 xor eax,eax jmp near ptr M04_L06 M04_L03: mov ecx,offset MT_System.Text.Json.Nodes.JsonObject call CORINFO_HELP_NEWSFAST mov [eax+8],bx xor ecx,ecx mov [ebp-18],ecx mov [ebp-14],ecx mov [ebp-10],ecx lea edi,[ebp-14] lea esi,[ebp+0C] movsd movsd mov byte ptr [ebp-18],1 lea edi,[eax+10] lea esi,[ebp-18] movsd call CORINFO_HELP_ASSIGN_BYREF movsd jmp short M04_L06 M04_L04: mov ecx,offset MT_System.Text.Json.Nodes.JsonArray call CORINFO_HELP_NEWSFAST mov [eax+8],bx xor ecx,ecx mov [ebp-24],ecx mov [ebp-20],ecx mov [ebp-1C],ecx lea edi,[ebp-20] lea esi,[ebp+0C] movsd movsd mov byte ptr [ebp-24],1 lea edi,[eax+10] lea esi,[ebp-24] movsd call CORINFO_HELP_ASSIGN_BYREF movsd jmp short M04_L06 M04_L05: mov ecx,offset MT_System.Text.Json.Nodes.JsonValueTrimmable`1[[System.Text.Json.JsonElement, System.Text.Json]] call CORINFO_HELP_NEWSFAST mov [ebp-28],eax call dword ptr ds:[0BBE3378]; System.Text.Json.Serialization.Metadata.JsonMetadataServices.get_JsonElementConverter() mov esi,[ebp-28] mov [esi+8],bx mov [ebp-28],esi lea edi,[esi+0C] lea esi,[ebp+0C] call CORINFO_HELP_ASSIGN_BYREF movsd mov esi,[ebp-28] lea edx,[esi+18] call CORINFO_HELP_ASSIGN_REF_EAX mov eax,esi M04_L06: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 0C M04_L07: call dword ptr ds:[0B933AB0] int 3 M04_L08: test eax,eax jne short M04_L09 xor edx,edx xor ecx,ecx jmp near ptr M04_L01 M04_L09: call dword ptr ds:[8B45270] int 3 M04_L10: mov ecx,29 call dword ptr ds:[8B455B8] int 3 ; Total bytes of code 337 ``` ```assembly ; System.Text.Json.Node.Tests.Perf_ParseThenWrite.g__WalkNode|7_0(System.Text.Json.Nodes.JsonNode) M05_L00: push ebp mov ebp,esp push esi push ebx sub esp,24 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov [ebp-10],eax mov esi,ecx test esi,esi je short M05_L01 cmp dword ptr [esi],offset MT_System.Text.Json.Nodes.JsonObject je short M05_L03 M05_L01: test ecx,ecx je short M05_L02 cmp dword ptr [ecx],offset MT_System.Text.Json.Nodes.JsonArray je short M05_L07 M05_L02: lea esp,[ebp-8] pop ebx pop esi pop ebp ret M05_L03: cmp dword ptr [esi+0C],0 jne short M05_L04 mov ecx,esi call dword ptr ds:[0BBE19A8]; System.Text.Json.Nodes.JsonObject.g__InitializeCore|32_0() M05_L04: mov ebx,[esi+0C] cmp [ebx],bl mov ecx,offset MT_System.Text.Json.JsonPropertyDictionary`1+d__18[[System.Text.Json.Nodes.JsonNode, System.Text.Json]] call CORINFO_HELP_NEWSFAST mov esi,eax xor edx,edx mov [esi+8],edx lea edx,[esi+4] call CORINFO_HELP_ASSIGN_REF_EBX mov [ebp-28],esi mov ecx,esi call dword ptr ds:[0B9BF8DC]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].MoveNext() test eax,eax je short M05_L06 M05_L05: lea edx,[ebp-24] mov ecx,esi call dword ptr ds:[0B9BF8E0]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.Collections.Generic.IEnumerator>.get_Current() mov ecx,[ebp-20] call dword ptr ds:[0AC0F480] mov ecx,esi call dword ptr ds:[0B9BF8DC]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].MoveNext() test eax,eax jne short M05_L05 M05_L06: mov ecx,esi call dword ptr ds:[0B9BF8D8]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.IDisposable.Dispose() jmp short M05_L11 mov ecx,[ebp-28] call dword ptr ds:[0B9BF8D8]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.IDisposable.Dispose() pop eax jmp eax M05_L07: cmp [ecx],ecx call dword ptr ds:[0B9B9514]; System.Text.Json.Nodes.JsonArray.GetEnumerator() mov ebx,eax mov [ebp-2C],ebx mov ecx,ebx call dword ptr ds:[357041C] test eax,eax je short M05_L09 M05_L08: mov ecx,ebx call dword ptr ds:[3570420] mov ecx,eax call dword ptr ds:[0AC0F480] mov ecx,ebx call dword ptr ds:[357041C] test eax,eax jne short M05_L08 M05_L09: mov ecx,ebx call dword ptr ds:[3570424] jmp short M05_L11 cmp dword ptr [ebp-2C],0 je short M05_L10 mov ecx,[ebp-2C] call dword ptr ds:[3570424] M05_L10: pop eax jmp eax M05_L11: lea esp,[ebp-8] pop ebx pop esi pop ebp ret ; Total bytes of code 259 ``` #### System.Text.Json.Node.Tests.Perf_ParseThenWrite.ParseThenWrite(IsDataIndented: True, TestCase: LotsOfStrings) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 10.096784042282051 < 10.319642681655427. IsChangePoint: Marked as a change because one of 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 26.97212294814146 (T) = (0 -10154.768242108195) / Math.Sqrt((20330.95949874919 / (299)) + (11764.193652568569 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.05625840011609901 = (10760.115102860183 - 10154.768242108195) / 10760.115102860183 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Text.Json.Node.Tests.Perf_ParseThenWrite.ParseThenWrite() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+8] cmp dword ptr [edi+10],0 jne short M00_L00 cmp dword ptr [edi+0C],0 je near ptr M00_L05 M00_L00: mov ebx,[edi+14] test ebx,ebx je short M00_L02 mov ecx,[ebx+4] mov edx,[ebx+8] test ecx,ecx je near ptr M00_L06 mov eax,[ecx+4] cmp [ecx+4],edx jb near ptr M00_L07 add ecx,8 M00_L01: call dword ptr ds:[86AF390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) xor ecx,ecx mov [ebx+8],ecx M00_L02: mov ecx,edi call dword ptr ds:[0B7AD510]; System.Text.Json.Utf8JsonWriter.ResetHelper() mov eax,[esi+4] test eax,eax je short M00_L04 lea edx,[eax+8] mov ecx,[eax+4] M00_L03: push ecx push edx sub esp,4 xor eax,eax mov [esp+1],al xor eax,eax mov [esp],al push 0 call dword ptr ds:[0B8AD498]; System.Text.Json.JsonDocument.ParseValue(System.ReadOnlySpan`1, System.Text.Json.JsonDocumentOptions) cmp [eax],al push 0 push eax sub esp,4 xor eax,eax mov [esp+1],al xor eax,eax mov [esp],al call dword ptr ds:[0B8AB900]; System.Text.Json.Serialization.Converters.JsonNodeConverter.Create(System.Text.Json.JsonElement, System.Nullable`1) mov edi,eax mov ecx,edi call dword ptr ds:[0ADFF480]; System.Text.Json.Node.Tests.Perf_ParseThenWrite.g__WalkNode|7_0(System.Text.Json.Nodes.JsonNode) mov edx,[esi+8] push 0 mov ecx,edi mov eax,[edi] mov eax,[eax+2C] call dword ptr [eax+8] pop ebx pop esi pop edi pop ebp ret M00_L04: xor edx,edx xor ecx,ecx jmp short M00_L03 M00_L05: call dword ptr ds:[0B7D9570] int 3 M00_L06: test edx,edx jne short M00_L07 xor ecx,ecx xor edx,edx jmp near ptr M00_L01 M00_L07: call dword ptr ds:[8DA5270] int 3 ; Total bytes of code 207 ``` ```assembly ; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push ebp mov ebp,esp push edi push esi push ebx M01_L00: test edx,edx je short M01_L08 xor eax,eax mov esi,edx sub esi,1 sbb eax,0 cmp esi,16 sbb eax,0 jb short M01_L09 M01_L01: cmp edx,200 jae near ptr M01_L15 xor edi,edi mov eax,ecx test al,3 jne near ptr M01_L16 M01_L02: mov eax,ecx dec eax test al,4 je short M01_L10 M01_L03: lea eax,[edx-10] sub edx,edi M01_L04: lea esi,[edi+10] xor ebx,ebx mov [ecx+edi],ebx mov [ecx+edi+4],ebx mov [ecx+edi+8],ebx mov [ecx+edi+0C],ebx mov edi,esi cmp edi,eax jbe short M01_L04 test dl,8 je short M01_L05 xor eax,eax mov [ecx+edi],eax mov [ecx+edi+4],eax add edi,8 M01_L05: test dl,4 jne short M01_L13 M01_L06: test dl,2 jne short M01_L11 M01_L07: test dl,1 jne short M01_L12 M01_L08: pop ebx pop esi pop edi pop ebp ret M01_L09: cmp esi,0B jne short M01_L14 xor edx,edx mov [ecx],edx mov [ecx+4],edx mov [ecx+8],edx jmp short M01_L08 M01_L10: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L03 M01_L11: mov word ptr [ecx+edi],0 add edi,2 jmp short M01_L07 M01_L12: mov byte ptr [ecx+edi],0 jmp short M01_L08 M01_L13: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L06 M01_L14: cmp esi,15 ja near ptr M01_L01 lea eax,ds:[0BBC9E80] mov eax,[eax+esi*4] lea edx,[M01_L00] add eax,edx jmp eax xor eax,eax mov [ecx],eax jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 mov byte ptr [ecx+6],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov byte ptr [ecx+4],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 mov byte ptr [ecx+12],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov byte ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 mov byte ptr [ecx+0E],0 jmp near ptr M01_L08 M01_L15: call dword ptr ds:[8CB1858] jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov word ptr [ecx+14],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 mov byte ptr [ecx+0A],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov byte ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov byte ptr [ecx+10],0 jmp near ptr M01_L08 mov word ptr [ecx],0 jmp near ptr M01_L08 mov word ptr [ecx],0 mov byte ptr [ecx+2],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov byte ptr [ecx+14],0 jmp near ptr M01_L08 M01_L16: mov eax,ecx test al,1 je short M01_L17 mov byte ptr [ecx],0 mov edi,1 mov eax,ecx test al,2 jne near ptr M01_L02 M01_L17: mov word ptr [ecx+edi],0 add edi,2 jmp near ptr M01_L02 mov byte ptr [ecx],0 jmp near ptr M01_L08 ; Total bytes of code 635 ``` ```assembly ; System.Text.Json.Utf8JsonWriter.ResetHelper() vzeroupper xor eax,eax mov [ecx+1C],eax lea eax,[ecx+4] xor edx,edx mov [eax],edx mov [eax+4],edx mov [ecx+24],edx mov [ecx+28],edx mov [ecx+2C],edx mov byte ptr [ecx+20],0 mov byte ptr [ecx+22],0 mov byte ptr [ecx+21],0 mov [ecx+18],edx vxorps xmm0,xmm0,xmm0 vmovq qword ptr [ecx+30],xmm0 vmovq qword ptr [ecx+38],xmm0 ret ; Total bytes of code 57 ``` ```assembly ; System.Text.Json.JsonDocument.ParseValue(System.ReadOnlySpan`1, System.Text.Json.JsonDocumentOptions) push ebp mov ebp,esp push edi push esi sub esp,8 mov esi,[ebp+14] mov edx,esi mov ecx,offset MT_System.Byte[] call CORINFO_HELP_NEWARR_1_VC mov edi,eax lea ecx,[edi+8] mov edx,[edi+4] cmp esi,edx ja short M03_L00 mov edx,[ebp+10] push esi call dword ptr ds:[8CB1828]; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr) mov esi,[edi+4] lea ecx,[ebp+8] lea edx,[ebp-10] call dword ptr ds:[0B8A9300]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push esi push 0 push edi push dword ptr [ebp-0C] push dword ptr [ebp-10] xor ecx,ecx call dword ptr ds:[0B8AD5B8]; System.Text.Json.JsonDocument.ParseUnrented(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, System.Text.Json.JsonTokenType) lea esp,[ebp-8] pop esi pop edi pop ebp ret 10 M03_L00: call dword ptr ds:[8DA5288] int 3 ; Total bytes of code 94 ``` ```assembly ; System.Text.Json.Serialization.Converters.JsonNodeConverter.Create(System.Text.Json.JsonElement, System.Nullable`1) push ebp mov ebp,esp push edi push esi push ebx sub esp,18 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov [ebp-10],eax mov ecx,[ebp+0C] test ecx,ecx jne short M04_L00 xor ecx,ecx jmp short M04_L02 M04_L00: mov eax,[ebp+10] cmp dword ptr [ecx+18],0 je near ptr M04_L07 mov ecx,[ecx+1C] add eax,8 test ecx,ecx je near ptr M04_L08 cmp [ecx+4],eax jb near ptr M04_L09 lea edx,[ecx+eax+8] mov ecx,[ecx+4] sub ecx,eax M04_L01: cmp ecx,4 jl near ptr M04_L10 mov ecx,[edx] shr ecx,1C movzx ecx,cl M04_L02: call dword ptr ds:[0B8E3BA0]; System.Text.Json.JsonReaderHelper.ToValueKind(System.Text.Json.JsonTokenType) cmp eax,1 je short M04_L03 cmp eax,2 je short M04_L04 cmp eax,7 jne short M04_L05 xor eax,eax jmp near ptr M04_L06 M04_L03: mov ecx,offset MT_System.Text.Json.Nodes.JsonObject call CORINFO_HELP_NEWSFAST movzx ecx,word ptr [ebp+8] mov [eax+8],cx xor ecx,ecx mov [ebp-18],ecx mov [ebp-14],ecx mov [ebp-10],ecx lea edi,[ebp-14] lea esi,[ebp+0C] movsd movsd mov byte ptr [ebp-18],1 lea edi,[eax+10] lea esi,[ebp-18] movsd call CORINFO_HELP_ASSIGN_BYREF movsd jmp short M04_L06 M04_L04: mov ecx,offset MT_System.Text.Json.Nodes.JsonArray call CORINFO_HELP_NEWSFAST movzx ecx,word ptr [ebp+8] mov [eax+8],cx xor ecx,ecx mov [ebp-24],ecx mov [ebp-20],ecx mov [ebp-1C],ecx lea edi,[ebp-20] lea esi,[ebp+0C] movsd movsd mov byte ptr [ebp-24],1 lea edi,[eax+10] lea esi,[ebp-24] movsd call CORINFO_HELP_ASSIGN_BYREF movsd jmp short M04_L06 M04_L05: mov ecx,offset MT_System.Text.Json.Nodes.JsonValueTrimmable`1[[System.Text.Json.JsonElement, System.Text.Json]] call CORINFO_HELP_NEWSFAST mov ebx,eax call dword ptr ds:[0B8E7E88]; System.Text.Json.Serialization.Metadata.JsonMetadataServices.get_JsonElementConverter() movzx ecx,word ptr [ebp+8] mov [ebx+8],cx lea edi,[ebx+0C] lea esi,[ebp+0C] call CORINFO_HELP_ASSIGN_BYREF movsd lea edx,[ebx+18] call CORINFO_HELP_ASSIGN_REF_EAX mov eax,ebx M04_L06: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 0C M04_L07: call dword ptr ds:[0B7D9588] int 3 M04_L08: test eax,eax jne short M04_L09 xor edx,edx xor ecx,ecx jmp near ptr M04_L01 M04_L09: call dword ptr ds:[8DA5270] int 3 M04_L10: mov ecx,29 call dword ptr ds:[8DA55B8] int 3 ; Total bytes of code 336 ``` ```assembly ; System.Text.Json.Node.Tests.Perf_ParseThenWrite.g__WalkNode|7_0(System.Text.Json.Nodes.JsonNode) M05_L00: push ebp mov ebp,esp push esi push ebx sub esp,24 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov [ebp-10],eax mov esi,ecx test esi,esi je short M05_L01 cmp dword ptr [esi],offset MT_System.Text.Json.Nodes.JsonObject je short M05_L03 M05_L01: test ecx,ecx je short M05_L02 cmp dword ptr [ecx],offset MT_System.Text.Json.Nodes.JsonArray je short M05_L07 M05_L02: lea esp,[ebp-8] pop ebx pop esi pop ebp ret M05_L03: cmp dword ptr [esi+0C],0 jne short M05_L04 mov ecx,esi call dword ptr ds:[0B8E7870]; System.Text.Json.Nodes.JsonObject.g__InitializeCore|32_0() M05_L04: mov ebx,[esi+0C] cmp [ebx],bl mov ecx,offset MT_System.Text.Json.JsonPropertyDictionary`1+d__18[[System.Text.Json.Nodes.JsonNode, System.Text.Json]] call CORINFO_HELP_NEWSFAST mov esi,eax xor edx,edx mov [esi+8],edx lea edx,[esi+4] call CORINFO_HELP_ASSIGN_REF_EBX mov [ebp-28],esi mov ecx,esi call dword ptr ds:[0B8C2754]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].MoveNext() test eax,eax je short M05_L06 M05_L05: lea edx,[ebp-24] mov ecx,esi call dword ptr ds:[0B8C2758]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.Collections.Generic.IEnumerator>.get_Current() mov ecx,[ebp-20] call dword ptr ds:[0ADFF480] mov ecx,esi call dword ptr ds:[0B8C2754]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].MoveNext() test eax,eax jne short M05_L05 M05_L06: mov ecx,esi call dword ptr ds:[0B8C2750]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.IDisposable.Dispose() jmp short M05_L11 mov ecx,[ebp-28] call dword ptr ds:[0B8C2750]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.IDisposable.Dispose() pop eax jmp eax M05_L07: cmp [ecx],ecx call dword ptr ds:[8DBC338]; System.Text.Json.Nodes.JsonArray.GetEnumerator() mov ebx,eax mov [ebp-2C],ebx mov ecx,ebx call dword ptr ds:[39602A8] test eax,eax je short M05_L09 M05_L08: mov ecx,ebx call dword ptr ds:[39602AC] mov ecx,eax call dword ptr ds:[0ADFF480] mov ecx,ebx call dword ptr ds:[39602A8] test eax,eax jne short M05_L08 M05_L09: mov ecx,ebx call dword ptr ds:[39602B0] jmp short M05_L11 cmp dword ptr [ebp-2C],0 je short M05_L10 mov ecx,[ebp-2C] call dword ptr ds:[39602B0] M05_L10: pop eax jmp eax M05_L11: lea esp,[ebp-8] pop ebx pop esi pop ebp ret ; Total bytes of code 259 ``` ### Compare Jit Disasm ```assembly ; System.Text.Json.Node.Tests.Perf_ParseThenWrite.ParseThenWrite() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+8] cmp dword ptr [edi+10],0 jne short M00_L00 cmp dword ptr [edi+0C],0 je near ptr M00_L05 M00_L00: mov ebx,[edi+14] test ebx,ebx je short M00_L02 mov ecx,[ebx+4] mov edx,[ebx+8] test ecx,ecx je near ptr M00_L06 mov eax,[ecx+4] cmp [ecx+4],edx jb near ptr M00_L07 add ecx,8 M00_L01: call dword ptr ds:[533F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) xor ecx,ecx mov [ebx+8],ecx M00_L02: mov ecx,edi call dword ptr ds:[0B64DA50]; System.Text.Json.Utf8JsonWriter.ResetHelper() mov eax,[esi+4] test eax,eax je short M00_L04 lea edx,[eax+8] mov ecx,[eax+4] M00_L03: push ecx push edx sub esp,4 xor eax,eax mov [esp+1],al xor eax,eax mov [esp],al push 0 call dword ptr ds:[0B73D498]; System.Text.Json.JsonDocument.ParseValue(System.ReadOnlySpan`1, System.Text.Json.JsonDocumentOptions) cmp [eax],al push 0 push eax sub esp,4 xor eax,eax mov [esp+1],al xor eax,eax mov [esp],al call dword ptr ds:[0B73B8D0]; System.Text.Json.Serialization.Converters.JsonNodeConverter.Create(System.Text.Json.JsonElement, System.Nullable`1) mov edi,eax mov ecx,edi call dword ptr ds:[0AC8F480]; System.Text.Json.Node.Tests.Perf_ParseThenWrite.g__WalkNode|7_0(System.Text.Json.Nodes.JsonNode) mov edx,[esi+8] push 0 mov ecx,edi mov eax,[edi] mov eax,[eax+2C] call dword ptr [eax+8] pop ebx pop esi pop edi pop ebp ret M00_L04: xor edx,edx xor ecx,ecx jmp short M00_L03 M00_L05: call dword ptr ds:[0B6695B8] int 3 M00_L06: test edx,edx jne short M00_L07 xor ecx,ecx xor edx,edx jmp near ptr M00_L01 M00_L07: call dword ptr ds:[8BC5270] int 3 ; Total bytes of code 207 ``` ```assembly ; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push ebp mov ebp,esp push edi push esi push ebx M01_L00: test edx,edx je short M01_L08 xor eax,eax mov esi,edx sub esi,1 sbb eax,0 cmp esi,16 sbb eax,0 jb short M01_L09 M01_L01: cmp edx,200 jae near ptr M01_L15 xor edi,edi mov eax,ecx test al,3 jne near ptr M01_L16 M01_L02: mov eax,ecx dec eax test al,4 je short M01_L10 M01_L03: lea eax,[edx-10] sub edx,edi M01_L04: lea esi,[edi+10] xor ebx,ebx mov [ecx+edi],ebx mov [ecx+edi+4],ebx mov [ecx+edi+8],ebx mov [ecx+edi+0C],ebx mov edi,esi cmp edi,eax jbe short M01_L04 test dl,8 je short M01_L05 xor eax,eax mov [ecx+edi],eax mov [ecx+edi+4],eax add edi,8 M01_L05: test dl,4 jne short M01_L13 M01_L06: test dl,2 jne short M01_L11 M01_L07: test dl,1 jne short M01_L12 M01_L08: pop ebx pop esi pop edi pop ebp ret M01_L09: cmp esi,0B jne short M01_L14 xor edx,edx mov [ecx],edx mov [ecx+4],edx mov [ecx+8],edx jmp short M01_L08 M01_L10: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L03 M01_L11: mov word ptr [ecx+edi],0 add edi,2 jmp short M01_L07 M01_L12: mov byte ptr [ecx+edi],0 jmp short M01_L08 M01_L13: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L06 M01_L14: cmp esi,15 ja near ptr M01_L01 lea eax,ds:[0BA39240] mov eax,[eax+esi*4] lea edx,[M01_L00] add eax,edx jmp eax xor eax,eax mov [ecx],eax jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 mov byte ptr [ecx+6],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov byte ptr [ecx+4],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 mov byte ptr [ecx+12],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov byte ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 mov byte ptr [ecx+0E],0 jmp near ptr M01_L08 M01_L15: call dword ptr ds:[8AD1870] jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov word ptr [ecx+14],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 mov byte ptr [ecx+0A],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov byte ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov byte ptr [ecx+10],0 jmp near ptr M01_L08 mov word ptr [ecx],0 jmp near ptr M01_L08 mov word ptr [ecx],0 mov byte ptr [ecx+2],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov byte ptr [ecx+14],0 jmp near ptr M01_L08 M01_L16: mov eax,ecx test al,1 je short M01_L17 mov byte ptr [ecx],0 mov edi,1 mov eax,ecx test al,2 jne near ptr M01_L02 M01_L17: mov word ptr [ecx+edi],0 add edi,2 jmp near ptr M01_L02 mov byte ptr [ecx],0 jmp near ptr M01_L08 ; Total bytes of code 635 ``` ```assembly ; System.Text.Json.Utf8JsonWriter.ResetHelper() vzeroupper xor eax,eax mov [ecx+1C],eax lea eax,[ecx+4] xor edx,edx mov [eax],edx mov [eax+4],edx mov [ecx+24],edx mov [ecx+28],edx mov [ecx+2C],edx mov byte ptr [ecx+20],0 mov byte ptr [ecx+22],0 mov byte ptr [ecx+21],0 mov [ecx+18],edx vxorps xmm0,xmm0,xmm0 vmovq qword ptr [ecx+30],xmm0 vmovq qword ptr [ecx+38],xmm0 ret ; Total bytes of code 57 ``` ```assembly ; System.Text.Json.JsonDocument.ParseValue(System.ReadOnlySpan`1, System.Text.Json.JsonDocumentOptions) push ebp mov ebp,esp push edi push esi sub esp,8 mov esi,[ebp+14] mov edx,esi mov ecx,offset MT_System.Byte[] call CORINFO_HELP_NEWARR_1_VC mov edi,eax lea ecx,[edi+8] mov edx,[edi+4] cmp esi,edx ja short M03_L00 mov edx,[ebp+10] push esi call dword ptr ds:[8AD1840]; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr) mov esi,[edi+4] lea ecx,[ebp+8] lea edx,[ebp-10] call dword ptr ds:[0B739300]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push esi push 0 push edi push dword ptr [ebp-0C] push dword ptr [ebp-10] xor ecx,ecx call dword ptr ds:[0B73D5B8]; System.Text.Json.JsonDocument.ParseUnrented(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, System.Text.Json.JsonTokenType) lea esp,[ebp-8] pop esi pop edi pop ebp ret 10 M03_L00: call dword ptr ds:[8BC5288] int 3 ; Total bytes of code 94 ``` ```assembly ; System.Text.Json.Serialization.Converters.JsonNodeConverter.Create(System.Text.Json.JsonElement, System.Nullable`1) push ebp mov ebp,esp push edi push esi push ebx sub esp,1C vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov [ebp-10],eax mov ebx,[ebp+8] mov ecx,[ebp+0C] test ecx,ecx jne short M04_L00 xor ecx,ecx jmp short M04_L02 M04_L00: mov eax,[ebp+10] cmp dword ptr [ecx+18],0 je near ptr M04_L07 mov ecx,[ecx+1C] add eax,8 test ecx,ecx je near ptr M04_L08 cmp [ecx+4],eax jb near ptr M04_L09 lea edx,[ecx+eax+8] mov ecx,[ecx+4] sub ecx,eax M04_L01: cmp ecx,4 jl near ptr M04_L10 mov ecx,[edx] shr ecx,1C movzx ecx,cl M04_L02: call dword ptr ds:[0B773BA0]; System.Text.Json.JsonReaderHelper.ToValueKind(System.Text.Json.JsonTokenType) cmp eax,1 je short M04_L03 cmp eax,2 je short M04_L04 cmp eax,7 jne short M04_L05 xor eax,eax jmp near ptr M04_L06 M04_L03: mov ecx,offset MT_System.Text.Json.Nodes.JsonObject call CORINFO_HELP_NEWSFAST mov [eax+8],bx xor ecx,ecx mov [ebp-18],ecx mov [ebp-14],ecx mov [ebp-10],ecx lea edi,[ebp-14] lea esi,[ebp+0C] movsd movsd mov byte ptr [ebp-18],1 lea edi,[eax+10] lea esi,[ebp-18] movsd call CORINFO_HELP_ASSIGN_BYREF movsd jmp short M04_L06 M04_L04: mov ecx,offset MT_System.Text.Json.Nodes.JsonArray call CORINFO_HELP_NEWSFAST mov [eax+8],bx xor ecx,ecx mov [ebp-24],ecx mov [ebp-20],ecx mov [ebp-1C],ecx lea edi,[ebp-20] lea esi,[ebp+0C] movsd movsd mov byte ptr [ebp-24],1 lea edi,[eax+10] lea esi,[ebp-24] movsd call CORINFO_HELP_ASSIGN_BYREF movsd jmp short M04_L06 M04_L05: mov ecx,offset MT_System.Text.Json.Nodes.JsonValueTrimmable`1[[System.Text.Json.JsonElement, System.Text.Json]] call CORINFO_HELP_NEWSFAST mov [ebp-28],eax call dword ptr ds:[0B777378]; System.Text.Json.Serialization.Metadata.JsonMetadataServices.get_JsonElementConverter() mov esi,[ebp-28] mov [esi+8],bx mov [ebp-28],esi lea edi,[esi+0C] lea esi,[ebp+0C] call CORINFO_HELP_ASSIGN_BYREF movsd mov esi,[ebp-28] lea edx,[esi+18] call CORINFO_HELP_ASSIGN_REF_EAX mov eax,esi M04_L06: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 0C M04_L07: call dword ptr ds:[0B6695D0] int 3 M04_L08: test eax,eax jne short M04_L09 xor edx,edx xor ecx,ecx jmp near ptr M04_L01 M04_L09: call dword ptr ds:[8BC5270] int 3 M04_L10: mov ecx,29 call dword ptr ds:[8BC55B8] int 3 ; Total bytes of code 337 ``` ```assembly ; System.Text.Json.Node.Tests.Perf_ParseThenWrite.g__WalkNode|7_0(System.Text.Json.Nodes.JsonNode) M05_L00: push ebp mov ebp,esp push esi push ebx sub esp,24 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov [ebp-10],eax mov esi,ecx test esi,esi je short M05_L01 cmp dword ptr [esi],offset MT_System.Text.Json.Nodes.JsonObject je short M05_L03 M05_L01: test ecx,ecx je short M05_L02 cmp dword ptr [ecx],offset MT_System.Text.Json.Nodes.JsonArray je short M05_L07 M05_L02: lea esp,[ebp-8] pop ebx pop esi pop ebp ret M05_L03: cmp dword ptr [esi+0C],0 jne short M05_L04 mov ecx,esi call dword ptr ds:[0B775CD8]; System.Text.Json.Nodes.JsonObject.g__InitializeCore|32_0() M05_L04: mov ebx,[esi+0C] cmp [ebx],bl mov ecx,offset MT_System.Text.Json.JsonPropertyDictionary`1+d__18[[System.Text.Json.Nodes.JsonNode, System.Text.Json]] call CORINFO_HELP_NEWSFAST mov esi,eax xor edx,edx mov [esi+8],edx lea edx,[esi+4] call CORINFO_HELP_ASSIGN_REF_EBX mov [ebp-28],esi mov ecx,esi call dword ptr ds:[0B742578]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].MoveNext() test eax,eax je short M05_L06 M05_L05: lea edx,[ebp-24] mov ecx,esi call dword ptr ds:[0B74257C]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.Collections.Generic.IEnumerator>.get_Current() mov ecx,[ebp-20] call dword ptr ds:[0AC8F480] mov ecx,esi call dword ptr ds:[0B742578]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].MoveNext() test eax,eax jne short M05_L05 M05_L06: mov ecx,esi call dword ptr ds:[0B742574]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.IDisposable.Dispose() jmp short M05_L11 mov ecx,[ebp-28] call dword ptr ds:[0B742574]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.IDisposable.Dispose() pop eax jmp eax M05_L07: cmp [ecx],ecx call dword ptr ds:[8BDC140]; System.Text.Json.Nodes.JsonArray.GetEnumerator() mov ebx,eax mov [ebp-2C],ebx mov ecx,ebx call dword ptr ds:[35F02AC] test eax,eax je short M05_L09 M05_L08: mov ecx,ebx call dword ptr ds:[35F02B0] mov ecx,eax call dword ptr ds:[0AC8F480] mov ecx,ebx call dword ptr ds:[35F02AC] test eax,eax jne short M05_L08 M05_L09: mov ecx,ebx call dword ptr ds:[35F02B4] jmp short M05_L11 cmp dword ptr [ebp-2C],0 je short M05_L10 mov ecx,[ebp-2C] call dword ptr ds:[35F02B4] M05_L10: pop eax jmp eax M05_L11: lea esp,[ebp-8] pop ebx pop esi pop ebp ret ; Total bytes of code 259 ``` #### System.Text.Json.Node.Tests.Perf_ParseThenWrite.ParseThenWrite(IsDataIndented: False, TestCase: Json4KB) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 43.19521966948811 < 43.702523542523146. IsChangePoint: Marked as a change because one of 12/21/2022 9:23:17 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 59.02358425020611 (T) = (0 -42826.734498576625) / Math.Sqrt((579960.2639365505 / (299)) + (50675.05704117412 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.07846171461134986 = (46473.093063642875 - 42826.734498576625) / 46473.093063642875 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Text.Json.Node.Tests.Perf_ParseThenWrite.ParseThenWrite() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+8] cmp dword ptr [edi+10],0 jne short M00_L00 cmp dword ptr [edi+0C],0 je near ptr M00_L05 M00_L00: mov ebx,[edi+14] test ebx,ebx je short M00_L02 mov ecx,[ebx+4] mov edx,[ebx+8] test ecx,ecx je near ptr M00_L06 mov eax,[ecx+4] cmp [ecx+4],edx jb near ptr M00_L07 add ecx,8 M00_L01: call dword ptr ds:[886F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) xor ecx,ecx mov [ebx+8],ecx M00_L02: mov ecx,edi call dword ptr ds:[0B96D510]; System.Text.Json.Utf8JsonWriter.ResetHelper() mov eax,[esi+4] test eax,eax je short M00_L04 lea edx,[eax+8] mov ecx,[eax+4] M00_L03: push ecx push edx sub esp,4 xor eax,eax mov [esp+1],al xor eax,eax mov [esp],al push 0 call dword ptr ds:[0BD53AE0]; System.Text.Json.JsonDocument.ParseValue(System.ReadOnlySpan`1, System.Text.Json.JsonDocumentOptions) cmp [eax],al push 0 push eax sub esp,4 xor eax,eax mov [esp+1],al xor eax,eax mov [esp],al call dword ptr ds:[0BD51DB0]; System.Text.Json.Serialization.Converters.JsonNodeConverter.Create(System.Text.Json.JsonElement, System.Nullable`1) mov edi,eax mov ecx,edi call dword ptr ds:[0AFBF480]; System.Text.Json.Node.Tests.Perf_ParseThenWrite.g__WalkNode|7_0(System.Text.Json.Nodes.JsonNode) mov edx,[esi+8] push 0 mov ecx,edi mov eax,[edi] mov eax,[eax+2C] call dword ptr [eax+8] pop ebx pop esi pop edi pop ebp ret M00_L04: xor edx,edx xor ecx,ecx jmp short M00_L03 M00_L05: call dword ptr ds:[0BCC1A98] int 3 M00_L06: test edx,edx jne short M00_L07 xor ecx,ecx xor edx,edx jmp near ptr M00_L01 M00_L07: call dword ptr ds:[8F65270] int 3 ; Total bytes of code 207 ``` ```assembly ; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push ebp mov ebp,esp push edi push esi push ebx M01_L00: test edx,edx je short M01_L08 xor eax,eax mov esi,edx sub esi,1 sbb eax,0 cmp esi,16 sbb eax,0 jb short M01_L09 M01_L01: cmp edx,200 jae near ptr M01_L15 xor edi,edi mov eax,ecx test al,3 jne near ptr M01_L16 M01_L02: mov eax,ecx dec eax test al,4 je short M01_L10 M01_L03: lea eax,[edx-10] sub edx,edi M01_L04: lea esi,[edi+10] xor ebx,ebx mov [ecx+edi],ebx mov [ecx+edi+4],ebx mov [ecx+edi+8],ebx mov [ecx+edi+0C],ebx mov edi,esi cmp edi,eax jbe short M01_L04 test dl,8 je short M01_L05 xor eax,eax mov [ecx+edi],eax mov [ecx+edi+4],eax add edi,8 M01_L05: test dl,4 jne short M01_L13 M01_L06: test dl,2 jne short M01_L11 M01_L07: test dl,1 jne short M01_L12 M01_L08: pop ebx pop esi pop edi pop ebp ret M01_L09: cmp esi,0B jne short M01_L14 xor edx,edx mov [ecx],edx mov [ecx+4],edx mov [ecx+8],edx jmp short M01_L08 M01_L10: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L03 M01_L11: mov word ptr [ecx+edi],0 add edi,2 jmp short M01_L07 M01_L12: mov byte ptr [ecx+edi],0 jmp short M01_L08 M01_L13: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L06 M01_L14: cmp esi,15 ja near ptr M01_L01 lea eax,ds:[0C06CEC0] mov eax,[eax+esi*4] lea edx,[M01_L00] add eax,edx jmp eax xor eax,eax mov [ecx],eax jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 mov byte ptr [ecx+6],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov byte ptr [ecx+4],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 mov byte ptr [ecx+12],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov byte ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 mov byte ptr [ecx+0E],0 jmp near ptr M01_L08 M01_L15: call dword ptr ds:[8E71858] jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov word ptr [ecx+14],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 mov byte ptr [ecx+0A],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov byte ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov byte ptr [ecx+10],0 jmp near ptr M01_L08 mov word ptr [ecx],0 jmp near ptr M01_L08 mov word ptr [ecx],0 mov byte ptr [ecx+2],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov byte ptr [ecx+14],0 jmp near ptr M01_L08 M01_L16: mov eax,ecx test al,1 je short M01_L17 mov byte ptr [ecx],0 mov edi,1 mov eax,ecx test al,2 jne near ptr M01_L02 M01_L17: mov word ptr [ecx+edi],0 add edi,2 jmp near ptr M01_L02 mov byte ptr [ecx],0 jmp near ptr M01_L08 ; Total bytes of code 635 ``` ```assembly ; System.Text.Json.Utf8JsonWriter.ResetHelper() vzeroupper xor eax,eax mov [ecx+1C],eax lea eax,[ecx+4] xor edx,edx mov [eax],edx mov [eax+4],edx mov [ecx+24],edx mov [ecx+28],edx mov [ecx+2C],edx mov byte ptr [ecx+20],0 mov byte ptr [ecx+22],0 mov byte ptr [ecx+21],0 mov [ecx+18],edx vxorps xmm0,xmm0,xmm0 vmovq qword ptr [ecx+30],xmm0 vmovq qword ptr [ecx+38],xmm0 ret ; Total bytes of code 57 ``` ```assembly ; System.Text.Json.JsonDocument.ParseValue(System.ReadOnlySpan`1, System.Text.Json.JsonDocumentOptions) push ebp mov ebp,esp push edi push esi sub esp,8 mov esi,[ebp+14] mov edx,esi mov ecx,offset MT_System.Byte[] call CORINFO_HELP_NEWARR_1_VC mov edi,eax lea ecx,[edi+8] mov edx,[edi+4] cmp esi,edx ja short M03_L00 mov edx,[ebp+10] push esi call dword ptr ds:[8E71828]; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr) mov esi,[edi+4] lea ecx,[ebp+8] lea edx,[ebp-10] call dword ptr ds:[0BD3F900]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push esi push 0 push edi push dword ptr [ebp-0C] push dword ptr [ebp-10] xor ecx,ecx call dword ptr ds:[0BD53C00]; System.Text.Json.JsonDocument.ParseUnrented(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, System.Text.Json.JsonTokenType) lea esp,[ebp-8] pop esi pop edi pop ebp ret 10 M03_L00: call dword ptr ds:[8F65288] int 3 ; Total bytes of code 94 ``` ```assembly ; System.Text.Json.Serialization.Converters.JsonNodeConverter.Create(System.Text.Json.JsonElement, System.Nullable`1) push ebp mov ebp,esp push edi push esi push ebx sub esp,18 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov [ebp-10],eax mov ecx,[ebp+0C] test ecx,ecx jne short M04_L00 xor ecx,ecx jmp short M04_L02 M04_L00: mov eax,[ebp+10] cmp dword ptr [ecx+18],0 je near ptr M04_L07 mov ecx,[ecx+1C] add eax,8 test ecx,ecx je near ptr M04_L08 cmp [ecx+4],eax jb near ptr M04_L09 lea edx,[ecx+eax+8] mov ecx,[ecx+4] sub ecx,eax M04_L01: cmp ecx,4 jl near ptr M04_L10 mov ecx,[edx] shr ecx,1C movzx ecx,cl M04_L02: call dword ptr ds:[0BD5B990]; System.Text.Json.JsonReaderHelper.ToValueKind(System.Text.Json.JsonTokenType) cmp eax,1 je short M04_L03 cmp eax,2 je short M04_L04 cmp eax,7 jne short M04_L05 xor eax,eax jmp near ptr M04_L06 M04_L03: mov ecx,offset MT_System.Text.Json.Nodes.JsonObject call CORINFO_HELP_NEWSFAST movzx ecx,word ptr [ebp+8] mov [eax+8],cx xor ecx,ecx mov [ebp-18],ecx mov [ebp-14],ecx mov [ebp-10],ecx lea edi,[ebp-14] lea esi,[ebp+0C] movsd movsd mov byte ptr [ebp-18],1 lea edi,[eax+10] lea esi,[ebp-18] movsd call CORINFO_HELP_ASSIGN_BYREF movsd jmp short M04_L06 M04_L04: mov ecx,offset MT_System.Text.Json.Nodes.JsonArray call CORINFO_HELP_NEWSFAST movzx ecx,word ptr [ebp+8] mov [eax+8],cx xor ecx,ecx mov [ebp-24],ecx mov [ebp-20],ecx mov [ebp-1C],ecx lea edi,[ebp-20] lea esi,[ebp+0C] movsd movsd mov byte ptr [ebp-24],1 lea edi,[eax+10] lea esi,[ebp-24] movsd call CORINFO_HELP_ASSIGN_BYREF movsd jmp short M04_L06 M04_L05: mov ecx,offset MT_System.Text.Json.Nodes.JsonValueTrimmable`1[[System.Text.Json.JsonElement, System.Text.Json]] call CORINFO_HELP_NEWSFAST mov ebx,eax call dword ptr ds:[0BD83B40]; System.Text.Json.Serialization.Metadata.JsonMetadataServices.get_JsonElementConverter() movzx ecx,word ptr [ebp+8] mov [ebx+8],cx lea edi,[ebx+0C] lea esi,[ebp+0C] call CORINFO_HELP_ASSIGN_BYREF movsd lea edx,[ebx+18] call CORINFO_HELP_ASSIGN_REF_EAX mov eax,ebx M04_L06: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 0C M04_L07: call dword ptr ds:[0BCC1AB0] int 3 M04_L08: test eax,eax jne short M04_L09 xor edx,edx xor ecx,ecx jmp near ptr M04_L01 M04_L09: call dword ptr ds:[8F65270] int 3 M04_L10: mov ecx,29 call dword ptr ds:[8F655B8] int 3 ; Total bytes of code 336 ``` ```assembly ; System.Text.Json.Node.Tests.Perf_ParseThenWrite.g__WalkNode|7_0(System.Text.Json.Nodes.JsonNode) M05_L00: push ebp mov ebp,esp push esi push ebx sub esp,24 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov [ebp-10],eax mov esi,ecx test esi,esi je short M05_L01 cmp dword ptr [esi],offset MT_System.Text.Json.Nodes.JsonObject je short M05_L03 M05_L01: test ecx,ecx je short M05_L02 cmp dword ptr [ecx],offset MT_System.Text.Json.Nodes.JsonArray je short M05_L07 M05_L02: lea esp,[ebp-8] pop ebx pop esi pop ebp ret M05_L03: cmp dword ptr [esi+0C],0 jne short M05_L04 mov ecx,esi call dword ptr ds:[0BD83528]; System.Text.Json.Nodes.JsonObject.g__InitializeCore|32_0() M05_L04: mov ebx,[esi+0C] cmp [ebx],bl mov ecx,offset MT_System.Text.Json.JsonPropertyDictionary`1+d__18[[System.Text.Json.Nodes.JsonNode, System.Text.Json]] call CORINFO_HELP_NEWSFAST mov esi,eax xor edx,edx mov [esi+8],edx lea edx,[esi+4] call CORINFO_HELP_ASSIGN_REF_EBX mov [ebp-28],esi mov ecx,esi call dword ptr ds:[0BD7FA60]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].MoveNext() test eax,eax je short M05_L06 M05_L05: lea edx,[ebp-24] mov ecx,esi call dword ptr ds:[0BD7FA64]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.Collections.Generic.IEnumerator>.get_Current() mov ecx,[ebp-20] call dword ptr ds:[0AFBF480] mov ecx,esi call dword ptr ds:[0BD7FA60]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].MoveNext() test eax,eax jne short M05_L05 M05_L06: mov ecx,esi call dword ptr ds:[0BD7FA5C]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.IDisposable.Dispose() jmp short M05_L11 mov ecx,[ebp-28] call dword ptr ds:[0BD7FA5C]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.IDisposable.Dispose() pop eax jmp eax M05_L07: cmp [ecx],ecx call dword ptr ds:[0BD796B4]; System.Text.Json.Nodes.JsonArray.GetEnumerator() mov ebx,eax mov [ebp-2C],ebx mov ecx,ebx call dword ptr ds:[52D0418] test eax,eax je short M05_L09 M05_L08: mov ecx,ebx call dword ptr ds:[52D041C] mov ecx,eax call dword ptr ds:[0AFBF480] mov ecx,ebx call dword ptr ds:[52D0418] test eax,eax jne short M05_L08 M05_L09: mov ecx,ebx call dword ptr ds:[52D0420] jmp short M05_L11 cmp dword ptr [ebp-2C],0 je short M05_L10 mov ecx,[ebp-2C] call dword ptr ds:[52D0420] M05_L10: pop eax jmp eax M05_L11: lea esp,[ebp-8] pop ebx pop esi pop ebp ret ; Total bytes of code 259 ``` ### Compare Jit Disasm ```assembly ; System.Text.Json.Node.Tests.Perf_ParseThenWrite.ParseThenWrite() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+8] cmp dword ptr [edi+10],0 jne short M00_L00 cmp dword ptr [edi+0C],0 je near ptr M00_L05 M00_L00: mov ebx,[edi+14] test ebx,ebx je short M00_L02 mov ecx,[ebx+4] mov edx,[ebx+8] test ecx,ecx je near ptr M00_L06 mov eax,[ecx+4] cmp [ecx+4],edx jb near ptr M00_L07 add ecx,8 M00_L01: call dword ptr ds:[87BF390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) xor ecx,ecx mov [ebx+8],ecx M00_L02: mov ecx,edi call dword ptr ds:[0B93DA50]; System.Text.Json.Utf8JsonWriter.ResetHelper() mov eax,[esi+4] test eax,eax je short M00_L04 lea edx,[eax+8] mov ecx,[eax+4] M00_L03: push ecx push edx sub esp,4 xor eax,eax mov [esp+1],al xor eax,eax mov [esp],al push 0 call dword ptr ds:[0BD158A0]; System.Text.Json.JsonDocument.ParseValue(System.ReadOnlySpan`1, System.Text.Json.JsonDocumentOptions) cmp [eax],al push 0 push eax sub esp,4 xor eax,eax mov [esp+1],al xor eax,eax mov [esp],al call dword ptr ds:[0BD13D68]; System.Text.Json.Serialization.Converters.JsonNodeConverter.Create(System.Text.Json.JsonElement, System.Nullable`1) mov edi,eax mov ecx,edi call dword ptr ds:[0AF7F480]; System.Text.Json.Node.Tests.Perf_ParseThenWrite.g__WalkNode|7_0(System.Text.Json.Nodes.JsonNode) mov edx,[esi+8] push 0 mov ecx,edi mov eax,[edi] mov eax,[eax+2C] call dword ptr [eax+8] pop ebx pop esi pop edi pop ebp ret M00_L04: xor edx,edx xor ecx,ecx jmp short M00_L03 M00_L05: call dword ptr ds:[0BCA3A98] int 3 M00_L06: test edx,edx jne short M00_L07 xor ecx,ecx xor edx,edx jmp near ptr M00_L01 M00_L07: call dword ptr ds:[8EB5270] int 3 ; Total bytes of code 207 ``` ```assembly ; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push ebp mov ebp,esp push edi push esi push ebx M01_L00: test edx,edx je short M01_L08 xor eax,eax mov esi,edx sub esi,1 sbb eax,0 cmp esi,16 sbb eax,0 jb short M01_L09 M01_L01: cmp edx,200 jae near ptr M01_L15 xor edi,edi mov eax,ecx test al,3 jne near ptr M01_L16 M01_L02: mov eax,ecx dec eax test al,4 je short M01_L10 M01_L03: lea eax,[edx-10] sub edx,edi M01_L04: lea esi,[edi+10] xor ebx,ebx mov [ecx+edi],ebx mov [ecx+edi+4],ebx mov [ecx+edi+8],ebx mov [ecx+edi+0C],ebx mov edi,esi cmp edi,eax jbe short M01_L04 test dl,8 je short M01_L05 xor eax,eax mov [ecx+edi],eax mov [ecx+edi+4],eax add edi,8 M01_L05: test dl,4 jne short M01_L13 M01_L06: test dl,2 jne short M01_L11 M01_L07: test dl,1 jne short M01_L12 M01_L08: pop ebx pop esi pop edi pop ebp ret M01_L09: cmp esi,0B jne short M01_L14 xor edx,edx mov [ecx],edx mov [ecx+4],edx mov [ecx+8],edx jmp short M01_L08 M01_L10: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L03 M01_L11: mov word ptr [ecx+edi],0 add edi,2 jmp short M01_L07 M01_L12: mov byte ptr [ecx+edi],0 jmp short M01_L08 M01_L13: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L06 M01_L14: cmp esi,15 ja near ptr M01_L01 lea eax,ds:[0C05B580] mov eax,[eax+esi*4] lea edx,[M01_L00] add eax,edx jmp eax xor eax,eax mov [ecx],eax jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 mov byte ptr [ecx+6],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov byte ptr [ecx+4],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 mov byte ptr [ecx+12],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov byte ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 mov byte ptr [ecx+0E],0 jmp near ptr M01_L08 M01_L15: call dword ptr ds:[8DC1870] jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov word ptr [ecx+14],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 mov byte ptr [ecx+0A],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov byte ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov byte ptr [ecx+10],0 jmp near ptr M01_L08 mov word ptr [ecx],0 jmp near ptr M01_L08 mov word ptr [ecx],0 mov byte ptr [ecx+2],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov byte ptr [ecx+14],0 jmp near ptr M01_L08 M01_L16: mov eax,ecx test al,1 je short M01_L17 mov byte ptr [ecx],0 mov edi,1 mov eax,ecx test al,2 jne near ptr M01_L02 M01_L17: mov word ptr [ecx+edi],0 add edi,2 jmp near ptr M01_L02 mov byte ptr [ecx],0 jmp near ptr M01_L08 ; Total bytes of code 635 ``` ```assembly ; System.Text.Json.Utf8JsonWriter.ResetHelper() vzeroupper xor eax,eax mov [ecx+1C],eax lea eax,[ecx+4] xor edx,edx mov [eax],edx mov [eax+4],edx mov [ecx+24],edx mov [ecx+28],edx mov [ecx+2C],edx mov byte ptr [ecx+20],0 mov byte ptr [ecx+22],0 mov byte ptr [ecx+21],0 mov [ecx+18],edx vxorps xmm0,xmm0,xmm0 vmovq qword ptr [ecx+30],xmm0 vmovq qword ptr [ecx+38],xmm0 ret ; Total bytes of code 57 ``` ```assembly ; System.Text.Json.JsonDocument.ParseValue(System.ReadOnlySpan`1, System.Text.Json.JsonDocumentOptions) push ebp mov ebp,esp push edi push esi sub esp,8 mov esi,[ebp+14] mov edx,esi mov ecx,offset MT_System.Byte[] call CORINFO_HELP_NEWARR_1_VC mov edi,eax lea ecx,[edi+8] mov edx,[edi+4] cmp esi,edx ja short M03_L00 mov edx,[ebp+10] push esi call dword ptr ds:[8DC1840]; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr) mov esi,[edi+4] lea ecx,[ebp+8] lea edx,[ebp-10] call dword ptr ds:[0BD11900]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push esi push 0 push edi push dword ptr [ebp-0C] push dword ptr [ebp-10] xor ecx,ecx call dword ptr ds:[0BD159C0]; System.Text.Json.JsonDocument.ParseUnrented(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, System.Text.Json.JsonTokenType) lea esp,[ebp-8] pop esi pop edi pop ebp ret 10 M03_L00: call dword ptr ds:[8EB5288] int 3 ; Total bytes of code 94 ``` ```assembly ; System.Text.Json.Serialization.Converters.JsonNodeConverter.Create(System.Text.Json.JsonElement, System.Nullable`1) push ebp mov ebp,esp push edi push esi push ebx sub esp,1C vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov [ebp-10],eax mov ebx,[ebp+8] mov ecx,[ebp+0C] test ecx,ecx jne short M04_L00 xor ecx,ecx jmp short M04_L02 M04_L00: mov eax,[ebp+10] cmp dword ptr [ecx+18],0 je near ptr M04_L07 mov ecx,[ecx+1C] add eax,8 test ecx,ecx je near ptr M04_L08 cmp [ecx+4],eax jb near ptr M04_L09 lea edx,[ecx+eax+8] mov ecx,[ecx+4] sub ecx,eax M04_L01: cmp ecx,4 jl near ptr M04_L10 mov ecx,[edx] shr ecx,1C movzx ecx,cl M04_L02: call dword ptr ds:[0BD1D030]; System.Text.Json.JsonReaderHelper.ToValueKind(System.Text.Json.JsonTokenType) cmp eax,1 je short M04_L03 cmp eax,2 je short M04_L04 cmp eax,7 jne short M04_L05 xor eax,eax jmp near ptr M04_L06 M04_L03: mov ecx,offset MT_System.Text.Json.Nodes.JsonObject call CORINFO_HELP_NEWSFAST mov [eax+8],bx xor ecx,ecx mov [ebp-18],ecx mov [ebp-14],ecx mov [ebp-10],ecx lea edi,[ebp-14] lea esi,[ebp+0C] movsd movsd mov byte ptr [ebp-18],1 lea edi,[eax+10] lea esi,[ebp-18] movsd call CORINFO_HELP_ASSIGN_BYREF movsd jmp short M04_L06 M04_L04: mov ecx,offset MT_System.Text.Json.Nodes.JsonArray call CORINFO_HELP_NEWSFAST mov [eax+8],bx xor ecx,ecx mov [ebp-24],ecx mov [ebp-20],ecx mov [ebp-1C],ecx lea edi,[ebp-20] lea esi,[ebp+0C] movsd movsd mov byte ptr [ebp-24],1 lea edi,[eax+10] lea esi,[ebp-24] movsd call CORINFO_HELP_ASSIGN_BYREF movsd jmp short M04_L06 M04_L05: mov ecx,offset MT_System.Text.Json.Nodes.JsonValueTrimmable`1[[System.Text.Json.JsonElement, System.Text.Json]] call CORINFO_HELP_NEWSFAST mov [ebp-28],eax call dword ptr ds:[0BF53378]; System.Text.Json.Serialization.Metadata.JsonMetadataServices.get_JsonElementConverter() mov esi,[ebp-28] mov [esi+8],bx mov [ebp-28],esi lea edi,[esi+0C] lea esi,[ebp+0C] call CORINFO_HELP_ASSIGN_BYREF movsd mov esi,[ebp-28] lea edx,[esi+18] call CORINFO_HELP_ASSIGN_REF_EAX mov eax,esi M04_L06: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 0C M04_L07: call dword ptr ds:[0BCA3AB0] int 3 M04_L08: test eax,eax jne short M04_L09 xor edx,edx xor ecx,ecx jmp near ptr M04_L01 M04_L09: call dword ptr ds:[8EB5270] int 3 M04_L10: mov ecx,29 call dword ptr ds:[8EB55B8] int 3 ; Total bytes of code 337 ``` ```assembly ; System.Text.Json.Node.Tests.Perf_ParseThenWrite.g__WalkNode|7_0(System.Text.Json.Nodes.JsonNode) M05_L00: push ebp mov ebp,esp push esi push ebx sub esp,24 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov [ebp-10],eax mov esi,ecx test esi,esi je short M05_L01 cmp dword ptr [esi],offset MT_System.Text.Json.Nodes.JsonObject je short M05_L03 M05_L01: test ecx,ecx je short M05_L02 cmp dword ptr [ecx],offset MT_System.Text.Json.Nodes.JsonArray je short M05_L07 M05_L02: lea esp,[ebp-8] pop ebx pop esi pop ebp ret M05_L03: cmp dword ptr [esi+0C],0 jne short M05_L04 mov ecx,esi call dword ptr ds:[0BF519A8]; System.Text.Json.Nodes.JsonObject.g__InitializeCore|32_0() M05_L04: mov ebx,[esi+0C] cmp [ebx],bl mov ecx,offset MT_System.Text.Json.JsonPropertyDictionary`1+d__18[[System.Text.Json.Nodes.JsonNode, System.Text.Json]] call CORINFO_HELP_NEWSFAST mov esi,eax xor edx,edx mov [esi+8],edx lea edx,[esi+4] call CORINFO_HELP_ASSIGN_REF_EBX mov [ebp-28],esi mov ecx,esi call dword ptr ds:[0BD2F8DC]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].MoveNext() test eax,eax je short M05_L06 M05_L05: lea edx,[ebp-24] mov ecx,esi call dword ptr ds:[0BD2F8E0]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.Collections.Generic.IEnumerator>.get_Current() mov ecx,[ebp-20] call dword ptr ds:[0AF7F480] mov ecx,esi call dword ptr ds:[0BD2F8DC]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].MoveNext() test eax,eax jne short M05_L05 M05_L06: mov ecx,esi call dword ptr ds:[0BD2F8D8]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.IDisposable.Dispose() jmp short M05_L11 mov ecx,[ebp-28] call dword ptr ds:[0BD2F8D8]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.IDisposable.Dispose() pop eax jmp eax M05_L07: cmp [ecx],ecx call dword ptr ds:[0BD29514]; System.Text.Json.Nodes.JsonArray.GetEnumerator() mov ebx,eax mov [ebp-2C],ebx mov ecx,ebx call dword ptr ds:[521041C] test eax,eax je short M05_L09 M05_L08: mov ecx,ebx call dword ptr ds:[5210420] mov ecx,eax call dword ptr ds:[0AF7F480] mov ecx,ebx call dword ptr ds:[521041C] test eax,eax jne short M05_L08 M05_L09: mov ecx,ebx call dword ptr ds:[5210424] jmp short M05_L11 cmp dword ptr [ebp-2C],0 je short M05_L10 mov ecx,[ebp-2C] call dword ptr ds:[5210424] M05_L10: pop eax jmp eax M05_L11: lea esp,[ebp-8] pop ebx pop esi pop ebp ret ; Total bytes of code 259 ``` #### System.Text.Json.Node.Tests.Perf_ParseThenWrite.ParseThenWrite(IsDataIndented: True, TestCase: Json4KB) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 47.48521351005634 < 48.0741084495483. IsChangePoint: Marked as a change because one of 12/21/2022 11:29:15 AM, 1/17/2023 8:36:05 PM, 2/8/2023 6:12:15 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsImprovementStdDev: Marked as improvement because 41.49453521570848 (T) = (0 -47595.37116134747) / Math.Sqrt((653346.0374703371 / (299)) + (142888.02818909162 / (27))) is greater than 1.9673127716992511 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (27) - 2, .975) and 0.07010231961404859 = (51183.44971200826 - 47595.37116134747) / 51183.44971200826 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Text.Json.Node.Tests.Perf_ParseThenWrite.ParseThenWrite() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+8] cmp dword ptr [edi+10],0 jne short M00_L00 cmp dword ptr [edi+0C],0 je near ptr M00_L05 M00_L00: mov ebx,[edi+14] test ebx,ebx je short M00_L02 mov ecx,[ebx+4] mov edx,[ebx+8] test ecx,ecx je near ptr M00_L06 mov eax,[ecx+4] cmp [ecx+4],edx jb near ptr M00_L07 add ecx,8 M00_L01: call dword ptr ds:[4F2F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) xor ecx,ecx mov [ebx+8],ecx M00_L02: mov ecx,edi call dword ptr ds:[0B29D510]; System.Text.Json.Utf8JsonWriter.ResetHelper() mov eax,[esi+4] test eax,eax je short M00_L04 lea edx,[eax+8] mov ecx,[eax+4] M00_L03: push ecx push edx sub esp,4 xor eax,eax mov [esp+1],al xor eax,eax mov [esp],al push 0 call dword ptr ds:[0B39D498]; System.Text.Json.JsonDocument.ParseValue(System.ReadOnlySpan`1, System.Text.Json.JsonDocumentOptions) cmp [eax],al push 0 push eax sub esp,4 xor eax,eax mov [esp+1],al xor eax,eax mov [esp],al call dword ptr ds:[0B39B900]; System.Text.Json.Serialization.Converters.JsonNodeConverter.Create(System.Text.Json.JsonElement, System.Nullable`1) mov edi,eax mov ecx,edi call dword ptr ds:[0A8EF480]; System.Text.Json.Node.Tests.Perf_ParseThenWrite.g__WalkNode|7_0(System.Text.Json.Nodes.JsonNode) mov edx,[esi+8] push 0 mov ecx,edi mov eax,[edi] mov eax,[eax+2C] call dword ptr [eax+8] pop ebx pop esi pop edi pop ebp ret M00_L04: xor edx,edx xor ecx,ecx jmp short M00_L03 M00_L05: call dword ptr ds:[0B2C9570] int 3 M00_L06: test edx,edx jne short M00_L07 xor ecx,ecx xor edx,edx jmp near ptr M00_L01 M00_L07: call dword ptr ds:[8895270] int 3 ; Total bytes of code 207 ``` ```assembly ; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push ebp mov ebp,esp push edi push esi push ebx M01_L00: test edx,edx je short M01_L08 xor eax,eax mov esi,edx sub esi,1 sbb eax,0 cmp esi,16 sbb eax,0 jb short M01_L09 M01_L01: cmp edx,200 jae near ptr M01_L15 xor edi,edi mov eax,ecx test al,3 jne near ptr M01_L16 M01_L02: mov eax,ecx dec eax test al,4 je short M01_L10 M01_L03: lea eax,[edx-10] sub edx,edi M01_L04: lea esi,[edi+10] xor ebx,ebx mov [ecx+edi],ebx mov [ecx+edi+4],ebx mov [ecx+edi+8],ebx mov [ecx+edi+0C],ebx mov edi,esi cmp edi,eax jbe short M01_L04 test dl,8 je short M01_L05 xor eax,eax mov [ecx+edi],eax mov [ecx+edi+4],eax add edi,8 M01_L05: test dl,4 jne short M01_L13 M01_L06: test dl,2 jne short M01_L11 M01_L07: test dl,1 jne short M01_L12 M01_L08: pop ebx pop esi pop edi pop ebp ret M01_L09: cmp esi,0B jne short M01_L14 xor edx,edx mov [ecx],edx mov [ecx+4],edx mov [ecx+8],edx jmp short M01_L08 M01_L10: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L03 M01_L11: mov word ptr [ecx+edi],0 add edi,2 jmp short M01_L07 M01_L12: mov byte ptr [ecx+edi],0 jmp short M01_L08 M01_L13: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L06 M01_L14: cmp esi,15 ja near ptr M01_L01 lea eax,ds:[0B6BE4E0] mov eax,[eax+esi*4] lea edx,[M01_L00] add eax,edx jmp eax xor eax,eax mov [ecx],eax jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 mov byte ptr [ecx+6],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov byte ptr [ecx+4],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 mov byte ptr [ecx+12],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov byte ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 mov byte ptr [ecx+0E],0 jmp near ptr M01_L08 M01_L15: call dword ptr ds:[87A1858] jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov word ptr [ecx+14],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 mov byte ptr [ecx+0A],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov byte ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov byte ptr [ecx+10],0 jmp near ptr M01_L08 mov word ptr [ecx],0 jmp near ptr M01_L08 mov word ptr [ecx],0 mov byte ptr [ecx+2],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov byte ptr [ecx+14],0 jmp near ptr M01_L08 M01_L16: mov eax,ecx test al,1 je short M01_L17 mov byte ptr [ecx],0 mov edi,1 mov eax,ecx test al,2 jne near ptr M01_L02 M01_L17: mov word ptr [ecx+edi],0 add edi,2 jmp near ptr M01_L02 mov byte ptr [ecx],0 jmp near ptr M01_L08 ; Total bytes of code 635 ``` ```assembly ; System.Text.Json.Utf8JsonWriter.ResetHelper() vzeroupper xor eax,eax mov [ecx+1C],eax lea eax,[ecx+4] xor edx,edx mov [eax],edx mov [eax+4],edx mov [ecx+24],edx mov [ecx+28],edx mov [ecx+2C],edx mov byte ptr [ecx+20],0 mov byte ptr [ecx+22],0 mov byte ptr [ecx+21],0 mov [ecx+18],edx vxorps xmm0,xmm0,xmm0 vmovq qword ptr [ecx+30],xmm0 vmovq qword ptr [ecx+38],xmm0 ret ; Total bytes of code 57 ``` ```assembly ; System.Text.Json.JsonDocument.ParseValue(System.ReadOnlySpan`1, System.Text.Json.JsonDocumentOptions) push ebp mov ebp,esp push edi push esi sub esp,8 mov esi,[ebp+14] mov edx,esi mov ecx,offset MT_System.Byte[] call CORINFO_HELP_NEWARR_1_VC mov edi,eax lea ecx,[edi+8] mov edx,[edi+4] cmp esi,edx ja short M03_L00 mov edx,[ebp+10] push esi call dword ptr ds:[87A1828]; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr) mov esi,[edi+4] lea ecx,[ebp+8] lea edx,[ebp-10] call dword ptr ds:[0B399300]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push esi push 0 push edi push dword ptr [ebp-0C] push dword ptr [ebp-10] xor ecx,ecx call dword ptr ds:[0B39D5B8]; System.Text.Json.JsonDocument.ParseUnrented(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, System.Text.Json.JsonTokenType) lea esp,[ebp-8] pop esi pop edi pop ebp ret 10 M03_L00: call dword ptr ds:[8895288] int 3 ; Total bytes of code 94 ``` ```assembly ; System.Text.Json.Serialization.Converters.JsonNodeConverter.Create(System.Text.Json.JsonElement, System.Nullable`1) push ebp mov ebp,esp push edi push esi push ebx sub esp,18 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov [ebp-10],eax mov ecx,[ebp+0C] test ecx,ecx jne short M04_L00 xor ecx,ecx jmp short M04_L02 M04_L00: mov eax,[ebp+10] cmp dword ptr [ecx+18],0 je near ptr M04_L07 mov ecx,[ecx+1C] add eax,8 test ecx,ecx je near ptr M04_L08 cmp [ecx+4],eax jb near ptr M04_L09 lea edx,[ecx+eax+8] mov ecx,[ecx+4] sub ecx,eax M04_L01: cmp ecx,4 jl near ptr M04_L10 mov ecx,[edx] shr ecx,1C movzx ecx,cl M04_L02: call dword ptr ds:[0B3D5018]; System.Text.Json.JsonReaderHelper.ToValueKind(System.Text.Json.JsonTokenType) cmp eax,1 je short M04_L03 cmp eax,2 je short M04_L04 cmp eax,7 jne short M04_L05 xor eax,eax jmp near ptr M04_L06 M04_L03: mov ecx,offset MT_System.Text.Json.Nodes.JsonObject call CORINFO_HELP_NEWSFAST movzx ecx,word ptr [ebp+8] mov [eax+8],cx xor ecx,ecx mov [ebp-18],ecx mov [ebp-14],ecx mov [ebp-10],ecx lea edi,[ebp-14] lea esi,[ebp+0C] movsd movsd mov byte ptr [ebp-18],1 lea edi,[eax+10] lea esi,[ebp-18] movsd call CORINFO_HELP_ASSIGN_BYREF movsd jmp short M04_L06 M04_L04: mov ecx,offset MT_System.Text.Json.Nodes.JsonArray call CORINFO_HELP_NEWSFAST movzx ecx,word ptr [ebp+8] mov [eax+8],cx xor ecx,ecx mov [ebp-24],ecx mov [ebp-20],ecx mov [ebp-1C],ecx lea edi,[ebp-20] lea esi,[ebp+0C] movsd movsd mov byte ptr [ebp-24],1 lea edi,[eax+10] lea esi,[ebp-24] movsd call CORINFO_HELP_ASSIGN_BYREF movsd jmp short M04_L06 M04_L05: mov ecx,offset MT_System.Text.Json.Nodes.JsonValueTrimmable`1[[System.Text.Json.JsonElement, System.Text.Json]] call CORINFO_HELP_NEWSFAST mov ebx,eax call dword ptr ds:[0B3DBB40]; System.Text.Json.Serialization.Metadata.JsonMetadataServices.get_JsonElementConverter() movzx ecx,word ptr [ebp+8] mov [ebx+8],cx lea edi,[ebx+0C] lea esi,[ebp+0C] call CORINFO_HELP_ASSIGN_BYREF movsd lea edx,[ebx+18] call CORINFO_HELP_ASSIGN_REF_EAX mov eax,ebx M04_L06: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 0C M04_L07: call dword ptr ds:[0B2C9588] int 3 M04_L08: test eax,eax jne short M04_L09 xor edx,edx xor ecx,ecx jmp near ptr M04_L01 M04_L09: call dword ptr ds:[8895270] int 3 M04_L10: mov ecx,29 call dword ptr ds:[88955B8] int 3 ; Total bytes of code 336 ``` ```assembly ; System.Text.Json.Node.Tests.Perf_ParseThenWrite.g__WalkNode|7_0(System.Text.Json.Nodes.JsonNode) M05_L00: push ebp mov ebp,esp push esi push ebx sub esp,24 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov [ebp-10],eax mov esi,ecx test esi,esi je short M05_L01 cmp dword ptr [esi],offset MT_System.Text.Json.Nodes.JsonObject je short M05_L03 M05_L01: test ecx,ecx je short M05_L02 cmp dword ptr [ecx],offset MT_System.Text.Json.Nodes.JsonArray je short M05_L07 M05_L02: lea esp,[ebp-8] pop ebx pop esi pop ebp ret M05_L03: cmp dword ptr [esi+0C],0 jne short M05_L04 mov ecx,esi call dword ptr ds:[0B3DB528]; System.Text.Json.Nodes.JsonObject.g__InitializeCore|32_0() M05_L04: mov ebx,[esi+0C] cmp [ebx],bl mov ecx,offset MT_System.Text.Json.JsonPropertyDictionary`1+d__18[[System.Text.Json.Nodes.JsonNode, System.Text.Json]] call CORINFO_HELP_NEWSFAST mov esi,eax xor edx,edx mov [esi+8],edx lea edx,[esi+4] call CORINFO_HELP_ASSIGN_REF_EBX mov [ebp-28],esi mov ecx,esi call dword ptr ds:[0B3E587C]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].MoveNext() test eax,eax je short M05_L06 M05_L05: lea edx,[ebp-24] mov ecx,esi call dword ptr ds:[0B3E5880]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.Collections.Generic.IEnumerator>.get_Current() mov ecx,[ebp-20] call dword ptr ds:[0A8EF480] mov ecx,esi call dword ptr ds:[0B3E587C]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].MoveNext() test eax,eax jne short M05_L05 M05_L06: mov ecx,esi call dword ptr ds:[0B3E5878]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.IDisposable.Dispose() jmp short M05_L11 mov ecx,[ebp-28] call dword ptr ds:[0B3E5878]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.IDisposable.Dispose() pop eax jmp eax M05_L07: cmp [ecx],ecx call dword ptr ds:[88AF460]; System.Text.Json.Nodes.JsonArray.GetEnumerator() mov ebx,eax mov [ebp-2C],ebx mov ecx,ebx call dword ptr ds:[32E02A8] test eax,eax je short M05_L09 M05_L08: mov ecx,ebx call dword ptr ds:[32E02AC] mov ecx,eax call dword ptr ds:[0A8EF480] mov ecx,ebx call dword ptr ds:[32E02A8] test eax,eax jne short M05_L08 M05_L09: mov ecx,ebx call dword ptr ds:[32E02B0] jmp short M05_L11 cmp dword ptr [ebp-2C],0 je short M05_L10 mov ecx,[ebp-2C] call dword ptr ds:[32E02B0] M05_L10: pop eax jmp eax M05_L11: lea esp,[ebp-8] pop ebx pop esi pop ebp ret ; Total bytes of code 259 ``` ### Compare Jit Disasm ```assembly ; System.Text.Json.Node.Tests.Perf_ParseThenWrite.ParseThenWrite() push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,[esi+8] cmp dword ptr [edi+10],0 jne short M00_L00 cmp dword ptr [edi+0C],0 je near ptr M00_L05 M00_L00: mov ebx,[edi+14] test ebx,ebx je short M00_L02 mov ecx,[ebx+4] mov edx,[ebx+8] test ecx,ecx je near ptr M00_L06 mov eax,[ecx+4] cmp [ecx+4],edx jb near ptr M00_L07 add ecx,8 M00_L01: call dword ptr ds:[860F390]; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) xor ecx,ecx mov [ebx+8],ecx M00_L02: mov ecx,edi call dword ptr ds:[0B78DA50]; System.Text.Json.Utf8JsonWriter.ResetHelper() mov eax,[esi+4] test eax,eax je short M00_L04 lea edx,[eax+8] mov ecx,[eax+4] M00_L03: push ecx push edx sub esp,4 xor eax,eax mov [esp+1],al xor eax,eax mov [esp],al push 0 call dword ptr ds:[0B87D498]; System.Text.Json.JsonDocument.ParseValue(System.ReadOnlySpan`1, System.Text.Json.JsonDocumentOptions) cmp [eax],al push 0 push eax sub esp,4 xor eax,eax mov [esp+1],al xor eax,eax mov [esp],al call dword ptr ds:[0B87B8D0]; System.Text.Json.Serialization.Converters.JsonNodeConverter.Create(System.Text.Json.JsonElement, System.Nullable`1) mov edi,eax mov ecx,edi call dword ptr ds:[0ADCF480]; System.Text.Json.Node.Tests.Perf_ParseThenWrite.g__WalkNode|7_0(System.Text.Json.Nodes.JsonNode) mov edx,[esi+8] push 0 mov ecx,edi mov eax,[edi] mov eax,[eax+2C] call dword ptr [eax+8] pop ebx pop esi pop edi pop ebp ret M00_L04: xor edx,edx xor ecx,ecx jmp short M00_L03 M00_L05: call dword ptr ds:[0B7A95B8] int 3 M00_L06: test edx,edx jne short M00_L07 xor ecx,ecx xor edx,edx jmp near ptr M00_L01 M00_L07: call dword ptr ds:[8D05270] int 3 ; Total bytes of code 207 ``` ```assembly ; System.SpanHelpers.ClearWithoutReferences(Byte ByRef, UIntPtr) push ebp mov ebp,esp push edi push esi push ebx M01_L00: test edx,edx je short M01_L08 xor eax,eax mov esi,edx sub esi,1 sbb eax,0 cmp esi,16 sbb eax,0 jb short M01_L09 M01_L01: cmp edx,200 jae near ptr M01_L15 xor edi,edi mov eax,ecx test al,3 jne near ptr M01_L16 M01_L02: mov eax,ecx dec eax test al,4 je short M01_L10 M01_L03: lea eax,[edx-10] sub edx,edi M01_L04: lea esi,[edi+10] xor ebx,ebx mov [ecx+edi],ebx mov [ecx+edi+4],ebx mov [ecx+edi+8],ebx mov [ecx+edi+0C],ebx mov edi,esi cmp edi,eax jbe short M01_L04 test dl,8 je short M01_L05 xor eax,eax mov [ecx+edi],eax mov [ecx+edi+4],eax add edi,8 M01_L05: test dl,4 jne short M01_L13 M01_L06: test dl,2 jne short M01_L11 M01_L07: test dl,1 jne short M01_L12 M01_L08: pop ebx pop esi pop edi pop ebp ret M01_L09: cmp esi,0B jne short M01_L14 xor edx,edx mov [ecx],edx mov [ecx+4],edx mov [ecx+8],edx jmp short M01_L08 M01_L10: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L03 M01_L11: mov word ptr [ecx+edi],0 add edi,2 jmp short M01_L07 M01_L12: mov byte ptr [ecx+edi],0 jmp short M01_L08 M01_L13: xor eax,eax mov [ecx+edi],eax add edi,4 jmp short M01_L06 M01_L14: cmp esi,15 ja near ptr M01_L01 lea eax,ds:[0BBBD5E0] mov eax,[eax+esi*4] lea edx,[M01_L00] add eax,edx jmp eax xor eax,eax mov [ecx],eax jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 mov byte ptr [ecx+6],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov word ptr [ecx+4],0 jmp short M01_L08 xor eax,eax mov [ecx],eax mov byte ptr [ecx+4],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 mov byte ptr [ecx+12],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov byte ptr [ecx+8],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 mov byte ptr [ecx+0E],0 jmp near ptr M01_L08 M01_L15: call dword ptr ds:[8C11870] jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov word ptr [ecx+14],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov word ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov word ptr [ecx+8],0 mov byte ptr [ecx+0A],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov word ptr [ecx+10],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov byte ptr [ecx+0C],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov byte ptr [ecx+10],0 jmp near ptr M01_L08 mov word ptr [ecx],0 jmp near ptr M01_L08 mov word ptr [ecx],0 mov byte ptr [ecx+2],0 jmp near ptr M01_L08 xor eax,eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+0C],eax mov [ecx+10],eax mov byte ptr [ecx+14],0 jmp near ptr M01_L08 M01_L16: mov eax,ecx test al,1 je short M01_L17 mov byte ptr [ecx],0 mov edi,1 mov eax,ecx test al,2 jne near ptr M01_L02 M01_L17: mov word ptr [ecx+edi],0 add edi,2 jmp near ptr M01_L02 mov byte ptr [ecx],0 jmp near ptr M01_L08 ; Total bytes of code 635 ``` ```assembly ; System.Text.Json.Utf8JsonWriter.ResetHelper() vzeroupper xor eax,eax mov [ecx+1C],eax lea eax,[ecx+4] xor edx,edx mov [eax],edx mov [eax+4],edx mov [ecx+24],edx mov [ecx+28],edx mov [ecx+2C],edx mov byte ptr [ecx+20],0 mov byte ptr [ecx+22],0 mov byte ptr [ecx+21],0 mov [ecx+18],edx vxorps xmm0,xmm0,xmm0 vmovq qword ptr [ecx+30],xmm0 vmovq qword ptr [ecx+38],xmm0 ret ; Total bytes of code 57 ``` ```assembly ; System.Text.Json.JsonDocument.ParseValue(System.ReadOnlySpan`1, System.Text.Json.JsonDocumentOptions) push ebp mov ebp,esp push edi push esi sub esp,8 mov esi,[ebp+14] mov edx,esi mov ecx,offset MT_System.Byte[] call CORINFO_HELP_NEWARR_1_VC mov edi,eax lea ecx,[edi+8] mov edx,[edi+4] cmp esi,edx ja short M03_L00 mov edx,[ebp+10] push esi call dword ptr ds:[8C11840]; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr) mov esi,[edi+4] lea ecx,[ebp+8] lea edx,[ebp-10] call dword ptr ds:[0B879300]; System.Text.Json.JsonDocumentOptions.GetReaderOptions() push esi push 0 push edi push dword ptr [ebp-0C] push dword ptr [ebp-10] xor ecx,ecx call dword ptr ds:[0B87D5B8]; System.Text.Json.JsonDocument.ParseUnrented(System.ReadOnlyMemory`1, System.Text.Json.JsonReaderOptions, System.Text.Json.JsonTokenType) lea esp,[ebp-8] pop esi pop edi pop ebp ret 10 M03_L00: call dword ptr ds:[8D05288] int 3 ; Total bytes of code 94 ``` ```assembly ; System.Text.Json.Serialization.Converters.JsonNodeConverter.Create(System.Text.Json.JsonElement, System.Nullable`1) push ebp mov ebp,esp push edi push esi push ebx sub esp,1C vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov [ebp-10],eax mov ebx,[ebp+8] mov ecx,[ebp+0C] test ecx,ecx jne short M04_L00 xor ecx,ecx jmp short M04_L02 M04_L00: mov eax,[ebp+10] cmp dword ptr [ecx+18],0 je near ptr M04_L07 mov ecx,[ecx+1C] add eax,8 test ecx,ecx je near ptr M04_L08 cmp [ecx+4],eax jb near ptr M04_L09 lea edx,[ecx+eax+8] mov ecx,[ecx+4] sub ecx,eax M04_L01: cmp ecx,4 jl near ptr M04_L10 mov ecx,[edx] shr ecx,1C movzx ecx,cl M04_L02: call dword ptr ds:[0B8B5030]; System.Text.Json.JsonReaderHelper.ToValueKind(System.Text.Json.JsonTokenType) cmp eax,1 je short M04_L03 cmp eax,2 je short M04_L04 cmp eax,7 jne short M04_L05 xor eax,eax jmp near ptr M04_L06 M04_L03: mov ecx,offset MT_System.Text.Json.Nodes.JsonObject call CORINFO_HELP_NEWSFAST mov [eax+8],bx xor ecx,ecx mov [ebp-18],ecx mov [ebp-14],ecx mov [ebp-10],ecx lea edi,[ebp-14] lea esi,[ebp+0C] movsd movsd mov byte ptr [ebp-18],1 lea edi,[eax+10] lea esi,[ebp-18] movsd call CORINFO_HELP_ASSIGN_BYREF movsd jmp short M04_L06 M04_L04: mov ecx,offset MT_System.Text.Json.Nodes.JsonArray call CORINFO_HELP_NEWSFAST mov [eax+8],bx xor ecx,ecx mov [ebp-24],ecx mov [ebp-20],ecx mov [ebp-1C],ecx lea edi,[ebp-20] lea esi,[ebp+0C] movsd movsd mov byte ptr [ebp-24],1 lea edi,[eax+10] lea esi,[ebp-24] movsd call CORINFO_HELP_ASSIGN_BYREF movsd jmp short M04_L06 M04_L05: mov ecx,offset MT_System.Text.Json.Nodes.JsonValueTrimmable`1[[System.Text.Json.JsonElement, System.Text.Json]] call CORINFO_HELP_NEWSFAST mov [ebp-28],eax call dword ptr ds:[0B8BB378]; System.Text.Json.Serialization.Metadata.JsonMetadataServices.get_JsonElementConverter() mov esi,[ebp-28] mov [esi+8],bx mov [ebp-28],esi lea edi,[esi+0C] lea esi,[ebp+0C] call CORINFO_HELP_ASSIGN_BYREF movsd mov esi,[ebp-28] lea edx,[esi+18] call CORINFO_HELP_ASSIGN_REF_EAX mov eax,esi M04_L06: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 0C M04_L07: call dword ptr ds:[0B7A95D0] int 3 M04_L08: test eax,eax jne short M04_L09 xor edx,edx xor ecx,ecx jmp near ptr M04_L01 M04_L09: call dword ptr ds:[8D05270] int 3 M04_L10: mov ecx,29 call dword ptr ds:[8D055B8] int 3 ; Total bytes of code 337 ``` ```assembly ; System.Text.Json.Node.Tests.Perf_ParseThenWrite.g__WalkNode|7_0(System.Text.Json.Nodes.JsonNode) M05_L00: push ebp mov ebp,esp push esi push ebx sub esp,24 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 xor eax,eax mov [ebp-14],eax mov [ebp-10],eax mov esi,ecx test esi,esi je short M05_L01 cmp dword ptr [esi],offset MT_System.Text.Json.Nodes.JsonObject je short M05_L03 M05_L01: test ecx,ecx je short M05_L02 cmp dword ptr [ecx],offset MT_System.Text.Json.Nodes.JsonArray je short M05_L07 M05_L02: lea esp,[ebp-8] pop ebx pop esi pop ebp ret M05_L03: cmp dword ptr [esi+0C],0 jne short M05_L04 mov ecx,esi call dword ptr ds:[0B8B99A8]; System.Text.Json.Nodes.JsonObject.g__InitializeCore|32_0() M05_L04: mov ebx,[esi+0C] cmp [ebx],bl mov ecx,offset MT_System.Text.Json.JsonPropertyDictionary`1+d__18[[System.Text.Json.Nodes.JsonNode, System.Text.Json]] call CORINFO_HELP_NEWSFAST mov esi,eax xor edx,edx mov [esi+8],edx lea edx,[esi+4] call CORINFO_HELP_ASSIGN_REF_EBX mov [ebp-28],esi mov ecx,esi call dword ptr ds:[0B8855E0]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].MoveNext() test eax,eax je short M05_L06 M05_L05: lea edx,[ebp-24] mov ecx,esi call dword ptr ds:[0B8855E4]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.Collections.Generic.IEnumerator>.get_Current() mov ecx,[ebp-20] call dword ptr ds:[0ADCF480] mov ecx,esi call dword ptr ds:[0B8855E0]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].MoveNext() test eax,eax jne short M05_L05 M05_L06: mov ecx,esi call dword ptr ds:[0B8855DC]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.IDisposable.Dispose() jmp short M05_L11 mov ecx,[ebp-28] call dword ptr ds:[0B8855DC]; System.Text.Json.JsonPropertyDictionary`1+d__18[[System.__Canon, System.Private.CoreLib]].System.IDisposable.Dispose() pop eax jmp eax M05_L07: cmp [ecx],ecx call dword ptr ds:[8D1F1A8]; System.Text.Json.Nodes.JsonArray.GetEnumerator() mov ebx,eax mov [ebp-2C],ebx mov ecx,ebx call dword ptr ds:[37302AC] test eax,eax je short M05_L09 M05_L08: mov ecx,ebx call dword ptr ds:[37302B0] mov ecx,eax call dword ptr ds:[0ADCF480] mov ecx,ebx call dword ptr ds:[37302AC] test eax,eax jne short M05_L08 M05_L09: mov ecx,ebx call dword ptr ds:[37302B4] jmp short M05_L11 cmp dword ptr [ebp-2C],0 je short M05_L10 mov ecx,[ebp-2C] call dword ptr ds:[37302B4] M05_L10: pop eax jmp eax M05_L11: lea esp,[ebp-8] pop ebx pop esi pop ebp ret ; Total bytes of code 259 ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)