{"id":494643,"date":"2026-09-14T18:53:10","date_gmt":"2026-09-14T18:53:10","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=494643"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=494643","title":{"rendered":"\u0410 \u0447\u0451, \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e? \u0422\u0440\u0438 \u043d\u0435\u0434\u043e\u043e\u0446\u0435\u043d\u0451\u043d\u043d\u044b\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 .NET"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0422\u0440\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0435\u043d\u044f\u044e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u041e\u0434\u0438\u043d \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u0440\u0430\u043d\u044c\u0448\u0435 Main. \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0442\u0435\u043a\u0441\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u0422\u0440\u0435\u0442\u0438\u0439 \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 stackalloc \u0432 50 \u0440\u0430\u0437.<\/p>\n<p>\u0412\u0441\u0435 \u0442\u0440\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 .NET. \u0417\u0430 \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u0438\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043d\u0430\u0439\u0442\u0438.\u00a0<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"407\" width=\"407\">\n<p align=\"left\"><strong>\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u0421\u0438\u0441\u0442\u0435\u043c\u0430<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"407\" width=\"407\">\n<p align=\"left\">Intel   Core i9-10900KF 3.70GHz, 10 \u044f\u0434\u0435\u0440<\/p>\n<\/td>\n<td>\n<p align=\"center\">Windows 10 22H2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"407\" width=\"407\">\n<p align=\"left\">AMD   Ryzen 9 5950X 3.39GHz, 16 \u044f\u0434\u0435\u0440<\/p>\n<\/td>\n<td>\n<p align=\"center\">Windows 10 1809<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"407\" width=\"407\">\n<p align=\"left\">Intel   Xeon W-2255 3.70GHz, 10 \u044f\u0434\u0435\u0440<\/p>\n<\/td>\n<td>\n<p align=\"center\">Windows Server 2022<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"407\" width=\"407\">\n<p align=\"left\">Intel   Xeon Silver 4314 2.40GHz, 2 CPU, 32 \u044f\u0434\u0440\u0430<\/p>\n<\/td>\n<td>\n<p align=\"center\">Windows Server 2022<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><em>\u0412\u0441\u0435 \u043c\u0430\u0448\u0438\u043d\u044b x64<\/em><\/p>\n<p>\u0420\u0430\u043d\u0442\u0430\u0439\u043c\u044b .NET 8, 9 \u0438 10 \u2014 \u0432\u0441\u0435 \u0442\u0440\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 <a href=\"https:\/\/benchmarkdotnet.org\/\" rel=\"noopener nofollow\">BenchmarkDotNet<\/a> 0.15.8.<\/p>\n<h3>1. \u041a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043e Main<\/h3>\n<h4>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a<\/h4>\n<p>\u041c\u0435\u0442\u043e\u0434 \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f:<\/p>\n<pre><code class=\"cs\">internal static class Startup{    [ModuleInitializer]    internal static void Init()    {        Order.Add(\"\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043c\u043e\u0434\u0443\u043b\u044f\");    }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412 Main \u0435\u0433\u043e \u043d\u0435\u0442. \u0422\u0430\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u044f \u043e\u0442\u043c\u0435\u0442\u043a\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439:<\/p>\n<pre><code class=\"cs\">private static int Main(string[] args){    Startup.Order.Add(\"\u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430\");    \/\/ ...}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u0427\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043e\u0442\u0447\u0451\u0442<\/h4>\n<pre><code class=\"cs\">\u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439:   1. \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043c\u043e\u0434\u0443\u043b\u044f  2. \u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445 \u0438 \u0442\u0440\u0451\u0445 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430\u0445.<\/p>\n<h4>\u041f\u0440\u0438\u0447\u0438\u043d\u0430<\/h4>\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0441 \u044d\u0442\u0438\u043c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u0445 \u0438\u0437 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043c\u043e\u0434\u0443\u043b\u044f. \u0414\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043d\u0438 \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u043a\u043e\u0434\u0430 \u0441\u0431\u043e\u0440\u043a\u0438 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>\u041a \u043c\u0435\u0442\u043e\u0434\u0443 \u0435\u0441\u0442\u044c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f: \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439, \u0431\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 void, \u043d\u0435 \u043e\u0431\u043e\u0431\u0449\u0451\u043d\u043d\u044b\u0439 \u0438 \u043d\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0431\u043e\u0431\u0449\u0451\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c internal \u0438\u043b\u0438 public. \u041b\u044e\u0431\u043e\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u2014 \u043e\u0448\u0438\u0431\u043a\u0430 \u0441\u0431\u043e\u0440\u043a\u0438.<\/p>\n<h4>\u0413\u0434\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f<\/h4>\n<p>\u0412 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0442\u0430\u043a\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u043e\u0434\u0438\u043d, \u0432 <a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/System.Private.CoreLib\/src\/System\/Diagnostics\/Tracing\/EventSource.cs#L3874\" rel=\"noopener nofollow\">EventSource<\/a>. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u2014 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430: \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043e Main.<\/p>\n<h4>\u0413\u0434\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f<\/h4>\n<p>\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a, \u0435\u0441\u043b\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e. \u0422\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0432\u044b\u0437\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043e\u0442 \u043f\u0440\u043e\u0433\u043e\u043d\u0430 \u043a \u043f\u0440\u043e\u0433\u043e\u043d\u0443 \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c, \u043d\u043e \u0432 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043d\u0435 \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0451\u043d.<\/p>\n<p>\u0411\u0440\u043e\u0441\u0438\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0430\u0434\u0430\u0435\u0442 \u0434\u043e \u0442\u043e\u0447\u043a\u0438 \u0432\u0445\u043e\u0434\u0430, \u0438 Main \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f:<\/p>\n<pre><code class=\"cs\">Unhandled exception. System.TypeInitializationException:  The type initializer for '&lt;Module&gt;' threw an exception. ---&gt; System.InvalidOperationException: \u0438\u0437 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 .NET 10 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e <a href=\"https:\/\/learn.microsoft.com\/dotnet\/fundamentals\/code-analysis\/quality-rules\/ca2255\" rel=\"noopener nofollow\">CA2255<\/a>: \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043c\u0435\u0448\u0430\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<h3>2. \u0422\u0435\u043a\u0441\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/h3>\n<h4>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a<\/h4>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e:<\/p>\n<pre><code class=\"cs\">static void Check(bool condition,    [CallerArgumentExpression(nameof(condition))] string? text = null){    Console.WriteLine(text + \" = \" + condition);}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u0427\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043e\u0442\u0447\u0451\u0442<\/h4>\n<pre><code class=\"cs\">\u0427\u0442\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 text \u043f\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u0430\u0445:   a + b &gt; 10                            \u043b\u043e\u0436\u044c  a * b == 6                            \u0438\u0441\u0442\u0438\u043d\u0430  empty is null                         \u0438\u0441\u0442\u0438\u043d\u0430  !string.IsNullOrEmpty(empty)          \u043b\u043e\u0436\u044c<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043d\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0430 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u043c\u0435\u0441\u0442\u0435 \u0432\u044b\u0437\u043e\u0432\u0430.<\/p>\n<h4>\u041f\u0440\u0438\u0447\u0438\u043d\u0430<\/h4>\n<p>\u041f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435: \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0431\u0435\u0440\u0451\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0435\u0433\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043e\u0439. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u0441 \u043d\u0435\u0439 \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442.<\/p>\n<p>\u0417\u0430\u043c\u0435\u0440 \u044d\u0442\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438 \u0442\u0430\u043a\u0430\u044f \u0436\u0435, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u044f\u0432\u043d\u043e, \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0432 \u0437\u0430\u043c\u0435\u0440\u0435 \u043d\u0435\u0442:\u00a0<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0421\u043f\u043e\u0441\u043e\u0431<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>i9-10900KF<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>Ryzen 9 5950X<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>Xeon W-2255<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>Xeon Silver 4314<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0438\u0437   \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/p>\n<\/td>\n<td>\n<p align=\"center\">0,3944<\/p>\n<\/td>\n<td>\n<p align=\"center\">0,2656<\/p>\n<\/td>\n<td>\n<p align=\"center\">0,7058<\/p>\n<\/td>\n<td>\n<p align=\"center\">0,6679<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0432\u0440\u0443\u0447\u043d\u0443\u044e<\/p>\n<\/td>\n<td>\n<p align=\"center\">0,3969<\/p>\n<\/td>\n<td>\n<p align=\"center\">0,2646<\/p>\n<\/td>\n<td>\n<p align=\"center\">0,6427<\/p>\n<\/td>\n<td>\n<p align=\"center\">0,7231<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><em>\u041d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b, .NET 10<\/em><\/p>\n<h4>\u0413\u0434\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f<\/h4>\n<p>\u0412 21-\u043c \u043c\u0435\u0441\u0442\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/System.Private.CoreLib\/src\/System\/ArgumentNullException.cs#L55\" rel=\"noopener nofollow\">ArgumentNullException.ThrowIfNull<\/a>:<\/p>\n<pre><code class=\"cs\">public static void ThrowIfNull([NotNull] object? argument,    [CallerArgumentExpression(nameof(argument))] string? paramName = null){    if (argument is null)    {        Throw(paramName);    }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u0437 \u043c\u0435\u0441\u0442\u0430 \u0432\u044b\u0437\u043e\u0432\u0430, \u0430 \u043d\u0435 \u0438\u043c\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 argument. \u041e\u0442\u0447\u0451\u0442 \u044d\u0442\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442:<\/p>\n<pre><code class=\"cs\">  ArgumentNullException             \u0438\u043c\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430: empty  ArgumentOutOfRangeException       \u0438\u043c\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430: a - 5<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043c\u0435\u043d\u0435\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0441\u0442\u0430\u043b\u043e \u0446\u0435\u043b\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u2014 \u0442\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u043b\u0438.<\/p>\n<h4>\u0413\u0434\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f<\/h4>\n<p>\u041f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0432\u0442\u043e\u0440\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c. \u0422\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438 \u0431\u0435\u0440\u0451\u0442 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e:<\/p>\n<pre><code class=\"cs\">Check(a + b &gt; 10);                       \/\/ \u0442\u0435\u043a\u0441\u0442: a + b &gt; 10Check(a + b &gt; 10, \"\u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e\");   \/\/ \u0442\u0435\u043a\u0441\u0442: \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0417\u0430\u0431\u044b\u0442\u044c \u043f\u0440\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0431\u043e\u0440\u043a\u0438. \u0422\u0435\u043a\u0441\u0442 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435: \u043f\u043e\u0441\u043b\u0435 \u0448\u0435\u0441\u0442\u0438 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0441\u0431\u043e\u0440\u043a\u0430 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0430\u0441\u044c \u0441 4608 \u0431\u0430\u0439\u0442 \u0434\u043e 5120.<\/p>\n<h3>3. \u041e\u0442\u043a\u0430\u0437 \u043e\u0442 \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438<\/h3>\n<h4>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a<\/h4>\n<p>\u0414\u0432\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u0430, \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439:<\/p>\n<pre><code class=\"cs\">[MethodImpl(MethodImplOptions.NoInlining)]internal static int StackWithInit(int size){    Span&lt;byte&gt; buffer = stackalloc byte[size];    buffer[0] = 1;    buffer[^1] = 2;     return buffer[0] + buffer[^1];} [SkipLocalsInit][MethodImpl(MethodImplOptions.NoInlining)]internal static int StackWithoutInit(int size){    \/\/ \u0442\u0435\u043b\u043e \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u0427\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043c\u0435\u0440<\/h4>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0411\u0443\u0444\u0435\u0440<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>i9-10900KF<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>Ryzen 9 5950X<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>Xeon W-2255<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>Xeon Silver 4314<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">64   \u0431\u0430\u0439\u0442\u0430<\/p>\n<\/td>\n<td>\n<p align=\"center\">2,452 \/ 1,765<\/p>\n<\/td>\n<td>\n<p align=\"center\">2,082 \/ 4,695<\/p>\n<\/td>\n<td>\n<p align=\"center\">2,793 \/ 2,419<\/p>\n<\/td>\n<td>\n<p align=\"center\">5,409 \/ 4,512<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">256   \u0431\u0430\u0439\u0442<\/p>\n<\/td>\n<td>\n<p align=\"center\">6,475 \/ 1,729<\/p>\n<\/td>\n<td>\n<p align=\"center\">5,741 \/ 4,691<\/p>\n<\/td>\n<td>\n<p align=\"center\">8,530 \/ 2,208<\/p>\n<\/td>\n<td>\n<p align=\"center\">13,015 \/ 4,501<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">1024   \u0431\u0430\u0439\u0442\u0430<\/p>\n<\/td>\n<td>\n<p align=\"center\">25,505 \/ 1,769<\/p>\n<\/td>\n<td>\n<p align=\"center\">17,712 \/ 4,703<\/p>\n<\/td>\n<td>\n<p align=\"center\">31,281 \/ 2,574<\/p>\n<\/td>\n<td>\n<p align=\"center\">48,282 \/ 4,566<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">4096   \u0431\u0430\u0439\u0442<\/p>\n<\/td>\n<td>\n<p align=\"center\">103,474 \/ 2,043<\/p>\n<\/td>\n<td>\n<p align=\"center\">71,811 \/ 4,939<\/p>\n<\/td>\n<td>\n<p align=\"center\">126,066 \/ 2,685<\/p>\n<\/td>\n<td>\n<p align=\"center\">189,264 \/ 4,827<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><em>\u041d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u0441 \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u0435\u043c \u0438 \u0431\u0435\u0437, .NET 10<\/em>\u00a0<\/p>\n<p>\u041d\u0430 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u043a\u0438\u043b\u043e\u0431\u0430\u0439\u0442\u0430\u0445 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043e\u0442 14,5 \u0434\u043e 50,6 \u0440\u0430\u0437\u0430. \u0421 \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u0435\u043c \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0441\u0442\u0451\u0442 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0431\u0443\u0444\u0435\u0440\u043e\u043c, \u0431\u0435\u0437 \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u044f \u2014 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<h4>\u041f\u0440\u0438\u0447\u0438\u043d\u0430<\/h4>\n<p>\u0423 \u043c\u0435\u0442\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u0444\u043b\u0430\u0433 \u043e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u0438 \u043f\u043e \u043d\u0435\u043c\u0443 \u0434\u0436\u0438\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0443\u043b\u044f\u043c\u0438 \u0432\u0441\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e\u0434 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0442\u0443, \u0447\u0442\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 stackalloc. \u0410\u0442\u0440\u0438\u0431\u0443\u0442 \u0435\u0433\u043e \u0443\u0431\u0438\u0440\u0430\u0435\u0442.<\/p>\n<p>\u041e\u0442\u0441\u044e\u0434\u0430 \u0438 \u0447\u0438\u0441\u043b\u0430 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435: \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0443\u0444\u0435\u0440, \u0442\u0435\u043c \u0434\u043e\u043b\u044c\u0448\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u0430 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u043d\u0435 \u0432\u0430\u0436\u0435\u043d.<\/p>\n<h4>\u0413\u0434\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f<\/h4>\n<p>\u0410\u0442\u0440\u0438\u0431\u0443\u0442 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d \u043d\u0435 \u0432 \u043a\u043e\u0434\u0435, \u0430 <a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/Directory.Build.targets#L220\" rel=\"noopener nofollow\">\u0432 \u043e\u0431\u0449\u0435\u043c \u0444\u0430\u0439\u043b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438<\/a>: \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e SkipLocalsInit \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0432 .NET.<\/p>\n<h4>\u0413\u0434\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f<\/h4>\n<p>\u041f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u0440\u0430\u0434\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0431\u0443\u0444\u0435\u0440\u0430. \u041d\u0430 64 \u0431\u0430\u0439\u0442\u0430\u0445 \u0432\u044b\u0438\u0433\u0440\u044b\u0448 \u0432 \u043b\u0443\u0447\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 1,39 \u0440\u0430\u0437\u0430, \u0430 \u043d\u0430 Ryzen 9 5950X \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u0435\u0437 \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435: 4,695 \u043f\u0440\u043e\u0442\u0438\u0432 2,082.<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445: \u0431\u0435\u0437 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0443\u043b\u044f\u043c\u0438 \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0431\u0443\u0444\u0435\u0440\u0430 \u0432\u0440\u0435\u043c\u044f \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 4,7 \u043d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430\u0445 \u043e\u043d\u043e \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 1,7\u20132,7.<\/p>\n<p>\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0431\u0443\u0444\u0435\u0440 \u0440\u0430\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u0447\u0442\u043e-\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438. \u0410\u0442\u0440\u0438\u0431\u0443\u0442 \u043d\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u043d\u0443\u043b\u044f\u043c\u0438 \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043e\u0442 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430 \u2014 \u0432 \u0431\u0443\u0444\u0435\u0440\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<p>\u0417\u0430\u0431\u044b\u0442\u044c \u043f\u0440\u043e \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0411\u0435\u0437 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442: \u0441\u0431\u043e\u0440\u043a\u0430 \u0443\u043f\u0430\u0434\u0451\u0442 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 <a href=\"https:\/\/learn.microsoft.com\/dotnet\/csharp\/language-reference\/compiler-messages\/unsafe-code-errors\" rel=\"noopener nofollow\">CS0227<\/a>.<\/p>\n<h3>\u0413\u0440\u0430\u043d\u0438\u0446\u044b \u0437\u0430\u043c\u0435\u0440\u043e\u0432<\/h3>\n<p>\u0412\u0441\u0435 \u0437\u0430\u043c\u0435\u0440\u044b \u0441\u043d\u044f\u0442\u044b \u043d\u0430 x64 \u043f\u043e\u0434 Windows, \u043d\u0430 .NET 8, 9 \u0438 10.<\/p>\n<p>\u0423 \u0432\u0441\u0435\u0445 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u043c\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u0435. \u0418\u043d\u0430\u0447\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0451\u0442 \u043a\u043e\u0434 \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u0437\u0430\u043c\u0435\u0440, \u0430 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0438\u043c \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0443\u043b\u044f\u043c\u0438.<\/p>\n<p>SkipLocalsInit \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445, \u0430 \u043d\u0435 \u043d\u0430 \u043a\u043b\u0430\u0441\u0441\u0435: \u043d\u0430 \u043a\u043b\u0430\u0441\u0441\u0435 \u043e\u043d \u043f\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u043d\u0430 \u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u043d\u0443\u043b\u044f\u043c\u0438.<\/p>\n<p>\u0412 \u0437\u0430\u043c\u0435\u0440\u0435 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u0435\u043f\u0443\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 null \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442. \u0422\u0430\u043a \u0432 \u0437\u0430\u043c\u0435\u0440 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u0431\u0435\u0437 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u041a\u043e\u0434 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/ComboxSoftDeveloper\/AttributeProof\" rel=\"noopener nofollow\">AttributeProof<\/a> \u2014 \u0437\u0430\u043c\u0435\u0440\u044b, \u043e\u0442\u0447\u0451\u0442\u044b \u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0441 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u043c\u0430\u0448\u0438\u043d<\/p>\n<\/li>\n<\/ul>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/dotnet\/api\/system.runtime.compilerservices.moduleinitializerattribute\" rel=\"noopener nofollow\">ModuleInitializerAttribute<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/dotnet\/fundamentals\/code-analysis\/quality-rules\/ca2255\" rel=\"noopener nofollow\">CA2255: \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043d\u0435 \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/System.Private.CoreLib\/src\/System\/Diagnostics\/Tracing\/EventSource.cs#L3874\" rel=\"noopener nofollow\">\u041a\u0430\u043a \u044d\u0442\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f EventSource<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/System.Private.CoreLib\/src\/System\/ArgumentNullException.cs#L55\" rel=\"noopener nofollow\">ArgumentNullException.ThrowIfNull<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/Directory.Build.targets#L220\" rel=\"noopener nofollow\">SkipLocalsInit \u0432\u043a\u043b\u044e\u0447\u0451\u043d \u043d\u0430 \u0432\u0441\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/dotnet\/api\/system.runtime.compilerservices.skiplocalsinitattribute\" rel=\"noopener nofollow\">SkipLocalsInitAttribute<\/a><\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0412\u0441\u0435\u043c \u0443\u0434\u0430\u0447\u0438 \u0438 \u0434\u043e \u043d\u043e\u0432\u044b\u0445 \u0432\u0441\u0442\u0440\u0435\u0447!<\/strong><\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1082206\/\">https:\/\/habr.com\/ru\/articles\/1082206\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0422\u0440\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0435\u043d\u044f\u044e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u041e\u0434\u0438\u043d \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u0440\u0430\u043d\u044c\u0448\u0435 Main. \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0442\u0435\u043a\u0441\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u0422\u0440\u0435\u0442\u0438\u0439 \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 stackalloc \u0432 50 \u0440\u0430\u0437.\u0412\u0441\u0435 \u0442\u0440\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 .NET. \u0417\u0430 \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u0438\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043d\u0430\u0439\u0442\u0438.\u00a0\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0421\u0438\u0441\u0442\u0435\u043c\u0430Intel   Core i9-10900KF 3.70GHz, 10 \u044f\u0434\u0435\u0440Windows 10 22H2AMD   Ryzen 9 5950X 3.39GHz, 16 \u044f\u0434\u0435\u0440Windows 10 1809Intel   Xeon W-2255 3.70GHz, 10 \u044f\u0434\u0435\u0440Windows Server 2022Intel   Xeon Silver 4314 2.40GHz, 2 CPU, 32 \u044f\u0434\u0440\u0430Windows Server 2022\u0412\u0441\u0435 \u043c\u0430\u0448\u0438\u043d\u044b x64\u0420\u0430\u043d\u0442\u0430\u0439\u043c\u044b .NET 8, 9 \u0438 10 \u2014 \u0432\u0441\u0435 \u0442\u0440\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 BenchmarkDotNet 0.15.8.1. \u041a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043e Main\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u041c\u0435\u0442\u043e\u0434 \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f:internal static class Startup{    [ModuleInitializer]    internal static void Init()    {        Order.Add(&#171;\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043c\u043e\u0434\u0443\u043b\u044f&#187;);    }}\u0412 Main \u0435\u0433\u043e \u043d\u0435\u0442. \u0422\u0430\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u044f \u043e\u0442\u043c\u0435\u0442\u043a\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439:private static int Main(string[] args){    Startup.Order.Add(&#171;\u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430&#187;);    \/\/ &#8230;}\u0427\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043e\u0442\u0447\u0451\u0442\u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439:   1. \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043c\u043e\u0434\u0443\u043b\u044f  2. \u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430\u041e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445 \u0438 \u0442\u0440\u0451\u0445 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430\u0445.\u041f\u0440\u0438\u0447\u0438\u043d\u0430\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0441 \u044d\u0442\u0438\u043c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u0445 \u0438\u0437 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043c\u043e\u0434\u0443\u043b\u044f. \u0414\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043d\u0438 \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u043a\u043e\u0434\u0430 \u0441\u0431\u043e\u0440\u043a\u0438 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f.\u041a \u043c\u0435\u0442\u043e\u0434\u0443 \u0435\u0441\u0442\u044c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f: \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439, \u0431\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 void, \u043d\u0435 \u043e\u0431\u043e\u0431\u0449\u0451\u043d\u043d\u044b\u0439 \u0438 \u043d\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0431\u043e\u0431\u0449\u0451\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c internal \u0438\u043b\u0438 public. \u041b\u044e\u0431\u043e\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u2014 \u043e\u0448\u0438\u0431\u043a\u0430 \u0441\u0431\u043e\u0440\u043a\u0438.\u0413\u0434\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f\u0412 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0442\u0430\u043a\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u043e\u0434\u0438\u043d, \u0432 EventSource. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u2014 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430: \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043e Main.\u0413\u0434\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a, \u0435\u0441\u043b\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e. \u0422\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0432\u044b\u0437\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043e\u0442 \u043f\u0440\u043e\u0433\u043e\u043d\u0430 \u043a \u043f\u0440\u043e\u0433\u043e\u043d\u0443 \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c, \u043d\u043e \u0432 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043d\u0435 \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0451\u043d.\u0411\u0440\u043e\u0441\u0438\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0430\u0434\u0430\u0435\u0442 \u0434\u043e \u0442\u043e\u0447\u043a\u0438 \u0432\u0445\u043e\u0434\u0430, \u0438 Main \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f:Unhandled exception. System.TypeInitializationException:  The type initializer for &#8216;&lt;Module&gt;&#8217; threw an exception. &#8212;&gt; System.InvalidOperationException: \u0438\u0437 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 .NET 10 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e CA2255: \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043c\u0435\u0448\u0430\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438.2. \u0422\u0435\u043a\u0441\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e:static void Check(bool condition,    [CallerArgumentExpression(nameof(condition))] string? text = null){    Console.WriteLine(text + &#187; = &#187; + condition);}\u0427\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043e\u0442\u0447\u0451\u0442\u0427\u0442\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 text \u043f\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u0430\u0445:   a + b &gt; 10                            \u043b\u043e\u0436\u044c  a * b == 6                            \u0438\u0441\u0442\u0438\u043d\u0430  empty is null                         \u0438\u0441\u0442\u0438\u043d\u0430  !string.IsNullOrEmpty(empty)          \u043b\u043e\u0436\u044c\u0412 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043d\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0430 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u043c\u0435\u0441\u0442\u0435 \u0432\u044b\u0437\u043e\u0432\u0430.\u041f\u0440\u0438\u0447\u0438\u043d\u0430\u041f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435: \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0431\u0435\u0440\u0451\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0435\u0433\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043e\u0439. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u0441 \u043d\u0435\u0439 \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442.\u0417\u0430\u043c\u0435\u0440 \u044d\u0442\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438 \u0442\u0430\u043a\u0430\u044f \u0436\u0435, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u044f\u0432\u043d\u043e, \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0432 \u0437\u0430\u043c\u0435\u0440\u0435 \u043d\u0435\u0442:\u00a0\u0421\u043f\u043e\u0441\u043e\u0431i9-10900KFRyzen 9 5950XXeon W-2255Xeon Silver 4314\u0438\u0437   \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u04380,39440,26560,70580,6679\u0432\u0440\u0443\u0447\u043d\u0443\u044e0,39690,26460,64270,7231\u041d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b, .NET 10\u0413\u0434\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f\u0412 21-\u043c \u043c\u0435\u0441\u0442\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, ArgumentNullException.ThrowIfNull:public static void ThrowIfNull([NotNull] object? argument,    [CallerArgumentExpression(nameof(argument))] string? paramName = null){    if (argument is null)    {        Throw(paramName);    }}\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u0437 \u043c\u0435\u0441\u0442\u0430 \u0432\u044b\u0437\u043e\u0432\u0430, \u0430 \u043d\u0435 \u0438\u043c\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 argument. \u041e\u0442\u0447\u0451\u0442 \u044d\u0442\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442:  ArgumentNullException             \u0438\u043c\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430: empty  ArgumentOutOfRangeException       \u0438\u043c\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430: a &#8212; 5\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043c\u0435\u043d\u0435\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0441\u0442\u0430\u043b\u043e \u0446\u0435\u043b\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u2014 \u0442\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u043b\u0438.\u0413\u0434\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f\u041f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0432\u0442\u043e\u0440\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c. \u0422\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438 \u0431\u0435\u0440\u0451\u0442 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e:Check(a + b &gt; 10);                       \/\/ \u0442\u0435\u043a\u0441\u0442: a + b &gt; 10Check(a + b &gt; 10, &#171;\u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e&#187;);   \/\/ \u0442\u0435\u043a\u0441\u0442: \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e\u0417\u0430\u0431\u044b\u0442\u044c \u043f\u0440\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0431\u043e\u0440\u043a\u0438. \u0422\u0435\u043a\u0441\u0442 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435: \u043f\u043e\u0441\u043b\u0435 \u0448\u0435\u0441\u0442\u0438 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0441\u0431\u043e\u0440\u043a\u0430 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0430\u0441\u044c \u0441 4608 \u0431\u0430\u0439\u0442 \u0434\u043e 5120.3. \u041e\u0442\u043a\u0430\u0437 \u043e\u0442 \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0414\u0432\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u0430, \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439:[MethodImpl(MethodImplOptions.NoInlining)]internal static int StackWithInit(int size){    Span&lt;byte&gt; buffer = stackalloc byte[size];    buffer[0] = 1;    buffer[^1] = 2;     return buffer[0] + buffer[^1];} [SkipLocalsInit][MethodImpl(MethodImplOptions.NoInlining)]internal static int StackWithoutInit(int size){    \/\/ \u0442\u0435\u043b\u043e \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435}\u0427\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043c\u0435\u0440\u0411\u0443\u0444\u0435\u0440i9-10900KFRyzen 9 5950XXeon W-2255Xeon Silver 431464   \u0431\u0430\u0439\u0442\u04302,452 \/ 1,7652,082 \/ 4,6952,793 \/ 2,4195,409 \/ 4,512256   \u0431\u0430\u0439\u04426,475 \/ 1,7295,741 \/ 4,6918,530 \/ 2,20813,015 \/ 4,5011024   \u0431\u0430\u0439\u0442\u043025,505 \/ 1,76917,712 \/ 4,70331,281 \/ 2,57448,282 \/ 4,5664096   \u0431\u0430\u0439\u0442103,474 \/ 2,04371,811 \/ 4,939126,066 \/ 2,685189,264 \/ 4,827\u041d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u0441 \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u0435\u043c \u0438 \u0431\u0435\u0437, .NET 10\u00a0\u041d\u0430 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u043a\u0438\u043b\u043e\u0431\u0430\u0439\u0442\u0430\u0445 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043e\u0442 14,5 \u0434\u043e 50,6 \u0440\u0430\u0437\u0430. \u0421 \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u0435\u043c \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0441\u0442\u0451\u0442 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0431\u0443\u0444\u0435\u0440\u043e\u043c, \u0431\u0435\u0437 \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u044f \u2014 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f.\u041f\u0440\u0438\u0447\u0438\u043d\u0430\u0423 \u043c\u0435\u0442\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u0444\u043b\u0430\u0433 \u043e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u0438 \u043f\u043e \u043d\u0435\u043c\u0443 \u0434\u0436\u0438\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0443\u043b\u044f\u043c\u0438 \u0432\u0441\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e\u0434 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0442\u0443, \u0447\u0442\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 stackalloc. \u0410\u0442\u0440\u0438\u0431\u0443\u0442 \u0435\u0433\u043e \u0443\u0431\u0438\u0440\u0430\u0435\u0442.\u041e\u0442\u0441\u044e\u0434\u0430 \u0438 \u0447\u0438\u0441\u043b\u0430 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435: \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0443\u0444\u0435\u0440, \u0442\u0435\u043c \u0434\u043e\u043b\u044c\u0448\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u0430 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u043d\u0435 \u0432\u0430\u0436\u0435\u043d.\u0413\u0434\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f\u0410\u0442\u0440\u0438\u0431\u0443\u0442 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d \u043d\u0435 \u0432 \u043a\u043e\u0434\u0435, \u0430 \u0432 \u043e\u0431\u0449\u0435\u043c \u0444\u0430\u0439\u043b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438: \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e SkipLocalsInit \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0432 .NET.\u0413\u0434\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f\u041f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u0440\u0430\u0434\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0431\u0443\u0444\u0435\u0440\u0430. \u041d\u0430 64 \u0431\u0430\u0439\u0442\u0430\u0445 \u0432\u044b\u0438\u0433\u0440\u044b\u0448 \u0432 \u043b\u0443\u0447\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 1,39 \u0440\u0430\u0437\u0430, \u0430 \u043d\u0430 Ryzen 9 5950X \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u0435\u0437 \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435: 4,695 \u043f\u0440\u043e\u0442\u0438\u0432 2,082.\u041d\u0430 \u044d\u0442\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445: \u0431\u0435\u0437 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0443\u043b\u044f\u043c\u0438 \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0431\u0443\u0444\u0435\u0440\u0430 \u0432\u0440\u0435\u043c\u044f \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 4,7 \u043d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430\u0445 \u043e\u043d\u043e \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 1,7\u20132,7.\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0431\u0443\u0444\u0435\u0440 \u0440\u0430\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u0447\u0442\u043e-\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438. \u0410\u0442\u0440\u0438\u0431\u0443\u0442 \u043d\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u043d\u0443\u043b\u044f\u043c\u0438 \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043e\u0442 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430 \u2014 \u0432 \u0431\u0443\u0444\u0435\u0440\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.\u0417\u0430\u0431\u044b\u0442\u044c \u043f\u0440\u043e \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0411\u0435\u0437 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442: \u0441\u0431\u043e\u0440\u043a\u0430 \u0443\u043f\u0430\u0434\u0451\u0442 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 CS0227.\u0413\u0440\u0430\u043d\u0438\u0446\u044b \u0437\u0430\u043c\u0435\u0440\u043e\u0432\u0412\u0441\u0435 \u0437\u0430\u043c\u0435\u0440\u044b \u0441\u043d\u044f\u0442\u044b \u043d\u0430 x64 \u043f\u043e\u0434 Windows, \u043d\u0430 .NET 8, 9 \u0438 10.\u0423 \u0432\u0441\u0435\u0445 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u043c\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u0435. \u0418\u043d\u0430\u0447\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0451\u0442 \u043a\u043e\u0434 \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u0437\u0430\u043c\u0435\u0440, \u0430 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0438\u043c \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0443\u043b\u044f\u043c\u0438.SkipLocalsInit \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445, \u0430 \u043d\u0435 \u043d\u0430 \u043a\u043b\u0430\u0441\u0441\u0435: \u043d\u0430 \u043a\u043b\u0430\u0441\u0441\u0435 \u043e\u043d \u043f\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u043d\u0430 \u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u043d\u0443\u043b\u044f\u043c\u0438.\u0412 \u0437\u0430\u043c\u0435\u0440\u0435 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u0435\u043f\u0443\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 null \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442. \u0422\u0430\u043a \u0432 \u0437\u0430\u043c\u0435\u0440 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u0431\u0435\u0437 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.\u041a\u043e\u0434 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438AttributeProof \u2014 \u0437\u0430\u043c\u0435\u0440\u044b, \u043e\u0442\u0447\u0451\u0442\u044b \u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0441 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u043c\u0430\u0448\u0438\u043d\u0421\u0441\u044b\u043b\u043a\u0438ModuleInitializerAttributeCA2255: \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043d\u0435 \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u041a\u0430\u043a \u044d\u0442\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f EventSourceArgumentNullException.ThrowIfNullSkipLocalsInit \u0432\u043a\u043b\u044e\u0447\u0451\u043d \u043d\u0430 \u0432\u0441\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043a\u043b\u0430\u0441\u0441\u043e\u0432SkipLocalsInitAttribute\u0412\u0441\u0435\u043c \u0443\u0434\u0430\u0447\u0438 \u0438 \u0434\u043e \u043d\u043e\u0432\u044b\u0445 \u0432\u0441\u0442\u0440\u0435\u0447!\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 https:\/\/habr.com\/ru\/articles\/1082206\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-494643","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/494643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=494643"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/494643\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=494643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=494643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=494643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}