{"id":494736,"date":"2026-09-15T11:37:59","date_gmt":"2026-09-15T11:37:59","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=494736"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=494736","title":{"rendered":"\u0410 \u0447\u0451, \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e? \u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 .NET, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u0435 20 \u043b\u0435\u0442"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 System.Random \u043a\u0442\u043e-\u0442\u043e \u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044c \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043b 21 \u0432\u043c\u0435\u0441\u0442\u043e 31. \u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043a\u0430\u043a \u0435\u0441\u0442\u044c \u2014 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u0438 new Random(42) \u043d\u0430\u0447\u043d\u0451\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0447\u0438\u0441\u043b\u0430.<\/p>\n<p>\u0410 \u0435\u0449\u0451 <code>new Random()<\/code> \u0438 <code>new Random(42)<\/code> \u2014 \u0432\u043e\u043e\u0431\u0449\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b. \u041d\u0430 <code>NextInt64<\/code> \u043e\u0434\u0438\u043d \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0432 10 \u0440\u0430\u0437.\u00a0<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"405\" width=\"405\">\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=\"405\" width=\"405\">\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=\"405\" width=\"405\">\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=\"405\" width=\"405\">\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. \u0414\u0432\u0435 \u0446\u0438\u0444\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u043b\u0438<\/h3>\n<h4>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a<\/h4>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432\u0437\u044f\u0442 \u0443 \u041a\u043d\u0443\u0442\u0430: \u0442\u0430\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0431\u0435\u0440\u0451\u0442 \u0434\u0432\u0430 \u0447\u0438\u0441\u043b\u0430 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u2014 24-\u0435 \u0438 55-\u0435 \u0441 \u043a\u043e\u043d\u0446\u0430 \u2014 \u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u0435\u0442 \u043e\u0434\u043d\u043e \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e. \u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432 \u0448\u0430\u0433\u043e\u043c 31. \u0412 <a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/System.Private.CoreLib\/src\/System\/Random.CompatImpl.cs#L287\" rel=\"noopener nofollow\">\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 .NET<\/a> \u0448\u0430\u0433 21:<\/p>\n<pre><code class=\"cs\">int ii = 0;for (int i = 1; i &lt; 55; i++){    \/\/ The range [1..55] is special (Knuth)    if ((ii += 21) &gt;= 55)     \/\/ \u0437\u0434\u0435\u0441\u044c \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c 31    {        ii -= 55;    }     seedArray[ii] = mk;}<\/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>\u0420\u044f\u0434\u043e\u043c, \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0432\u044b\u0448\u0435, \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430:<\/p>\n<pre><code class=\"cs\">int mj = 161803398 - subtraction;   \/\/ magic number based on Phi<\/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>\u042d\u0442\u043e \u0437\u043e\u043b\u043e\u0442\u043e\u0435 \u0441\u0435\u0447\u0435\u043d\u0438\u0435, \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 100 \u043c\u043b\u043d.<\/p>\n<h4>\u041f\u0440\u0438\u0447\u0438\u043d\u0430<\/h4>\n<p>\u041a\u043e\u0434 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043b\u0438 \u043d\u0435 \u0438\u0437 \u043a\u043d\u0438\u0433\u0438 \u041a\u043d\u0443\u0442\u0430, \u0430 \u0438\u0437 <a href=\"https:\/\/numerical.recipes\/\" rel=\"noopener nofollow\">\u00ab\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0446\u0435\u043f\u0442\u043e\u0432\u00bb<\/a>: \u0432 <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/23198\" rel=\"noopener nofollow\">issue<\/a> \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 283 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043e, \u0447\u0442\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442 \u0434\u0430\u0436\u0435 \u0438\u043c\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0412 .NET Framework \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u043c \u043f\u0440\u044f\u043c\u043e \u043d\u0430\u0434 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c. \u0412 \u043a\u043d\u0438\u0433\u0435 31, \u0432 .NET \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c 21. \u041e\u0442\u0442\u0443\u0434\u0430 \u0436\u0435 \u0432\u0437\u044f\u0442\u043e \u0438 161803398 \u2014 \u0432 \u043a\u043d\u0438\u0433\u0435 \u044d\u0442\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0430 MSEED.<\/p>\n<p>\u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u0443 \u041a\u043d\u0443\u0442\u0430, \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0435\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043d\u0430 \u0442\u0430\u043a\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f. \u041e\u0448\u0438\u0431\u043a\u0443 \u043d\u0430\u0448\u0451\u043b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c, \u0438 \u043e\u0442\u043a\u0440\u044b\u043b <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/23198\" rel=\"noopener nofollow\">issue<\/a>. \u0412 Microsoft \u043e\u0442\u0432\u0435\u0442\u0438\u043b\u0438: \u0447\u0438\u043d\u0438\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u0438\u043d\u0430\u0447\u0435 \u0443 \u0432\u0441\u0435\u0445, \u043a\u0442\u043e \u0437\u0430\u0434\u0430\u0451\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u043e\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u0430.<\/p>\n<p>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u044d\u0442\u043e\u0442 issue \u0435\u0441\u0442\u044c \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445, \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443.<\/p>\n<h4>\u0413\u0434\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f<\/h4>\n<p>\u0420\u0435\u0448\u0438\u0442\u044c, \u0447\u0442\u043e \u0438\u0437-\u0437\u0430 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u0447\u0438\u0441\u043b\u0430 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0438 \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u043c\u0438. \u041e\u0442\u0447\u0451\u0442 \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u0435\u043b\u0438\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043d\u0430 \u0434\u0435\u0441\u044f\u0442\u044c \u0440\u0430\u0432\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0438\u0441\u0435\u043b \u043f\u043e\u043f\u0430\u043b\u043e \u0432 \u043a\u0430\u0436\u0434\u0443\u044e, \u043f\u043b\u044e\u0441 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u043d\u0435\u0442:<\/p>\n<pre><code class=\"cs\">  \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440            \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043e\u0442 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e   \u0441\u0432\u044f\u0437\u044c \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445   new Random()                       0.118 %         -0.000359  new Random(42)                     0.219 %          0.000427  Random.Shared                      0.254 %          0.000391<\/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\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u043b\u0438\u043d\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0430, \u0430 \u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u0432\u0440\u043e\u0434\u0435 TestU01.<\/p>\n<h3>2. \u0414\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043f\u043e\u0434 \u043e\u0434\u043d\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c<\/h3>\n<h4>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a<\/h4>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043d\u0435 Random, \u0430 \u043e\u0434\u043d\u0430 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e. \u0412\u044b\u0431\u043e\u0440 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0438\u0434\u0435\u0442 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0437\u0430\u0434\u0430\u043d\u043e \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043d\u0435\u0442.<\/p>\n<pre><code class=\"cs\">public Random(){    _impl = new XoshiroImpl();}public Random(int seed){    _impl = new Net5CompatSeedImpl(seed);}<\/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\">  \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u043d                     \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f   new Random()                    XoshiroImpl  new Random(42)                  Net5CompatSeedImpl  new Random(0)                   Net5CompatSeedImpl  new Random(int.MaxValue)        Net5CompatSeedImpl  Random.Shared                   \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435 \u0437\u0430\u0434\u0430\u043d\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>\u0411\u0435\u0437 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/System.Private.CoreLib\/src\/System\/Random.Xoshiro256StarStarImpl.cs\" rel=\"noopener nofollow\">XoshiroImpl<\/a> \u2014 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 .NET 6. \u0421 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u2014 <a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/System.Private.CoreLib\/src\/System\/Random.CompatImpl.cs#L287\" rel=\"noopener nofollow\">Net5CompatSeedImpl<\/a>, \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439, \u0441 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u043e\u0439. Random.Shared \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u043d\u0430\u0447\u0435: \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0434\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 XoshiroImpl \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430.<\/p>\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>\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>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\">new Random()<\/p>\n<\/td>\n<td>\n<p align=\"center\">1,590<\/p>\n<\/td>\n<td>\n<p align=\"center\">2,091<\/p>\n<\/td>\n<td>\n<p align=\"center\">3,240<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">new Random(42)<\/p>\n<\/td>\n<td>\n<p align=\"center\">1,810<\/p>\n<\/td>\n<td>\n<p align=\"center\">2,470<\/p>\n<\/td>\n<td>\n<p align=\"center\">3,308<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Random.Shared<\/p>\n<\/td>\n<td>\n<p align=\"center\">2,532<\/p>\n<\/td>\n<td>\n<p align=\"center\">3,387<\/p>\n<\/td>\n<td>\n<p align=\"center\">3,993<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439<\/p>\n<\/td>\n<td>\n<p align=\"center\">63,589<\/p>\n<\/td>\n<td>\n<p align=\"center\">72,779<\/p>\n<\/td>\n<td>\n<p align=\"center\">70,485<\/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 \u043d\u0430 \u0432\u044b\u0437\u043e\u0432 Next, .NET 10<\/em><\/p>\n<p>\u041d\u0430 \u043e\u0431\u044b\u0447\u043d\u043e\u043c Next \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043d\u0435\u0432\u0435\u043b\u0438\u043a\u0430: 1,14 \u0440\u0430\u0437\u0430. Random.Shared \u043e\u0442\u0441\u0442\u0430\u0451\u0442 \u043e\u0442 \u043e\u0431\u043e\u0438\u0445, \u0445\u043e\u0442\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0443 \u043d\u0435\u0433\u043e \u0442\u043e\u0442 \u0436\u0435: \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u043e\u043d \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0443 \u043f\u043e\u0442\u043e\u043a\u0430 \u0437\u0430 \u0441\u0432\u043e\u0438\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u043c. \u041a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u0432 22\u201340 \u0440\u0430\u0437.<\/p>\n<h4>\u041f\u0440\u0438\u0447\u0438\u043d\u0430<\/h4>\n<p>XoshiroImpl \u0432\u044b\u0434\u0430\u0451\u0442 64 \u0431\u0438\u0442\u0430 \u0437\u0430 \u043e\u0434\u0438\u043d \u0448\u0430\u0433. Net5CompatSeedImpl \u0443\u043c\u0435\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e 31 \u0431\u0438\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u043e\u0434\u043d\u043e 64-\u0431\u0438\u0442\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0443\u0445\u043e\u0434\u0438\u0442 \u0442\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0430 \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0434\u043d\u043e\u0433\u043e. \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043d\u0435 \u0432 \u0442\u0440\u0438 \u0440\u0430\u0437\u0430, \u0430 \u0432 \u0434\u0435\u0441\u044f\u0442\u044c: \u043e\u0434\u0438\u043d \u0432\u044b\u0437\u043e\u0432 Net5CompatSeedImpl \u0443\u0436\u0435 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435, \u0430 \u043a \u0442\u0440\u0451\u043c \u0432\u044b\u0437\u043e\u0432\u0430\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0434\u0432\u0438\u0433\u0438 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<\/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\u043c\u0435\u0440\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e Next \u0438 \u0440\u0435\u0448\u0438\u0442\u044c, \u0447\u0442\u043e \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043d\u0435\u0442. \u041d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u043e\u043d\u0430 \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u0430\u044f:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>\u041c\u0435\u0442\u043e\u0434<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>i9-10900KF<\/strong><br \/>   \u0431\u0435\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \/ \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c<\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>Xeon W-2255<\/strong><br \/>   \u0431\u0435\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \/ \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c<\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>Xeon Silver 4314<\/strong><br \/>   \u0431\u0435\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \/ \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Next(0, 1000)<\/p>\n<\/td>\n<td>\n<p align=\"center\">0,6318 \/ 2,4742<\/p>\n<\/td>\n<td>\n<p align=\"center\">1,477 \/ 3,693<\/p>\n<\/td>\n<td>\n<p align=\"center\">1,997 \/ 3,635<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">NextDouble()<\/p>\n<\/td>\n<td>\n<p align=\"center\">1,9883 \/ 2,0042<\/p>\n<\/td>\n<td>\n<p align=\"center\">1,977 \/ 2,444<\/p>\n<\/td>\n<td>\n<p align=\"center\">3,010 \/ 3,637<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">NextInt64()<\/p>\n<\/td>\n<td>\n<p align=\"center\">1,6958 \/ 17,4191<\/p>\n<\/td>\n<td>\n<p align=\"center\">2,491 \/ 21,439<\/p>\n<\/td>\n<td>\n<p align=\"center\">3,206 \/ 33,496<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">NextBytes(), 1 \u041a\u0411<\/p>\n<\/td>\n<td>\n<p align=\"center\">118,9883 \/ 2 078,8403<\/p>\n<\/td>\n<td>\n<p align=\"center\">189,867 \/ 2 462,811<\/p>\n<\/td>\n<td>\n<p align=\"center\">203,598 \/ 3 110,217<\/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, \u0431\u0435\u0437 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u0441 \u043d\u0438\u043c, .NET 10<\/em>\u00a0<\/p>\n<p>\u041d\u0430 NextInt64 \u0440\u0430\u0437\u0440\u044b\u0432 8,6\u201310,4 \u0440\u0430\u0437\u0430, \u043d\u0430 NextBytes \u0441 \u0431\u0443\u0444\u0435\u0440\u043e\u043c \u0432 \u043a\u0438\u043b\u043e\u0431\u0430\u0439\u0442 \u2014 13,0\u201317,5 \u0440\u0430\u0437\u0430.<\/p>\n<p>\u0423 <code>NextDouble<\/code> \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0430\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u0431\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043e\u0434\u043d\u0438\u043c \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435\u043c. \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0432 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0438\u0442 \u0437\u0430 \u0448\u0430\u0433, \u0430 \u0434\u043b\u044f <code>NextDouble<\/code> \u043e\u0431\u043e\u0438\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0434\u043d\u043e\u0433\u043e \u0448\u0430\u0433\u0430.<\/p>\n<h3>3. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/h3>\n<h4>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a<\/h4>\n<pre><code class=\"cs\">\/\/ \u0441 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c: \u0446\u0438\u043a\u043b \u043d\u0430 56 \u0447\u0438\u0441\u0435\u043bpublic Net5CompatSeedImpl(int seed){    _prng = new CompatPrng(seed);} \/\/ \u0431\u0435\u0437 \u043d\u0435\u0433\u043e: \u0447\u0435\u0442\u044b\u0440\u0435 \u0447\u0438\u0441\u043b\u0430 \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044bpublic unsafe XoshiroImpl(){    ulong* ptr = stackalloc ulong[4];    do    {        Interop.GetRandomBytes((byte*)ptr, 4 * sizeof(ulong));        _s0 = ptr[0];        _s1 = ptr[1];        _s2 = ptr[2];        _s3 = ptr[3];    }    while ((_s0 | _s1 | _s2 | _s3) == 0);}<\/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>new Random(42) \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0435\u0442 \u0446\u0438\u043a\u043b \u043d\u0430 56 \u0447\u0438\u0441\u0435\u043b \u2014 \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439, \u0441 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u043e\u0439. new Random() \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0447\u0435\u0442\u044b\u0440\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430. \u0426\u0438\u043a\u043b \u043d\u0443\u0436\u0435\u043d \u043d\u0430 \u0440\u0435\u0434\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439: \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0447\u0435\u0442\u044b\u0440\u0435 \u0447\u0438\u0441\u043b\u0430 \u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u043d\u0443\u043b\u044f\u043c\u0438, XoshiroImpl \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u043b\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f.<\/p>\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>\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>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\">new Random()<\/p>\n<\/td>\n<td>\n<p align=\"center\">97,56<\/p>\n<\/td>\n<td>\n<p align=\"center\">118,6<\/p>\n<\/td>\n<td>\n<p align=\"center\">126,8<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">new Random(42)<\/p>\n<\/td>\n<td>\n<p align=\"center\">240,64<\/p>\n<\/td>\n<td>\n<p align=\"center\">381,3<\/p>\n<\/td>\n<td>\n<p align=\"center\">438,3<\/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. \u041f\u0430\u043c\u044f\u0442\u0438 72 \u0431\u0430\u0439\u0442\u0430 \u043f\u0440\u043e\u0442\u0438\u0432 304<\/em>\u00a0<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 240,64 \u043d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043f\u0440\u043e\u0442\u0438\u0432 97,56 \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 304 \u0431\u0430\u0439\u0442\u0430 \u043f\u0440\u043e\u0442\u0438\u0432 72. \u041d\u0430 \u0442\u0440\u0451\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445 \u043a\u0430\u0440\u0442\u0438\u043d\u0430 \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435.<\/p>\n<h4>\u0413\u0434\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c new Random(42) \u0432\u043d\u0443\u0442\u0440\u0438 \u0446\u0438\u043a\u043b\u0430. \u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u044d\u0442\u043e 304 \u0431\u0430\u0439\u0442\u0430 \u0432 \u043a\u0443\u0447\u0435 \u0438 56 \u0447\u0438\u0441\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0441 \u043d\u0443\u043b\u044f.<\/p>\n<h3>4. \u0427\u0438\u0441\u043b\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0437\u0430 24 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b<\/h3>\n<h4>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a<\/h4>\n<p>Net5CompatSeedImpl \u0445\u0440\u0430\u043d\u0438\u0442 55 \u0447\u0438\u0441\u0435\u043b. \u0418\u0445 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u043e\u043c:<\/p>\n<pre><code class=\"cs\">for (int seed = 0; seed &lt; 100_000; seed++){    Random guess = new(seed);    if (guess.Next() != seen[0])    {        continue;    }     \/\/ \u0441\u0432\u0435\u0440\u044f\u0435\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\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 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043e\u0442\u0447\u0451\u0442<\/h4>\n<pre><code class=\"cs\">  \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u043e: 12345, \u0437\u0430 24 \u043c\u0441   \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u044b\u0434\u0430\u0441\u0442:  1153550655, 1527729513, 144439007  \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043e:       1153550655, 1527729513, 144439007  \u0441\u043e\u0432\u043f\u0430\u043b\u043e: True <\/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>\u0422\u0440\u0451\u0445 \u0447\u0438\u0441\u0435\u043b \u0443\u0436\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e: \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u043b \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u043f\u043e\u0434\u043e\u0448\u0451\u043b \u043e\u0434\u0438\u043d.<\/p>\n<h4>\u041f\u0440\u0438\u0447\u0438\u043d\u0430<\/h4>\n<p>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0438\u0434\u0451\u0442 \u0434\u043e 100 000, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0437\u044f\u0442\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435. \u0412 \u0445\u0443\u0434\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0433\u043e int \u2014 4 294 967 296 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u2014 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, \u043d\u0430 \u0432\u0435\u0441\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0443\u0439\u0434\u0451\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442. \u0410 \u0435\u0441\u043b\u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0437\u044f\u043b\u0438 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0441\u0447\u0451\u0442 \u0438\u0434\u0451\u0442 \u043d\u0430 \u0442\u044b\u0441\u044f\u0447\u0438.<\/p>\n<h4>\u0413\u0434\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f<\/h4>\n<p>\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 Random \u0442\u043e\u043a\u0435\u043d \u0441\u0431\u0440\u043e\u0441\u0430 \u043f\u0430\u0440\u043e\u043b\u044f, \u043a\u043e\u0434 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043d\u043e\u043c\u0435\u0440 \u0437\u0430\u043a\u0430\u0437\u0430. \u041f\u0435\u0440\u0435\u0431\u043e\u0440 \u0437\u0430\u0439\u043c\u0451\u0442 \u043e\u0442 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0438\u043d\u0443\u0442 \u2014 \u0441\u043c\u043e\u0442\u0440\u044f \u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u0442\u043e \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439 \u0432 .NET \u0435\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e <a href=\"https:\/\/learn.microsoft.com\/dotnet\/fundamentals\/code-analysis\/quality-rules\/ca5394\" rel=\"noopener nofollow\">CA5394<\/a>: System.Random \u043d\u0435 \u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u0430\u043c, \u0433\u0434\u0435 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c. \u041d\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u0438 \u0432 .NET 10, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0432 .editorconfig:<\/p>\n<pre><code class=\"cs\">dotnet_diagnostic.CA5394.severity = warning<\/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<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>\u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c: \u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u043c\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. \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.<\/p>\n<p>\u0412 \u0441\u0432\u0435\u0440\u043a\u0435 \u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 ==, \u0438 \u044d\u0442\u043e \u043d\u0435 \u043e\u0448\u0438\u0431\u043a\u0430: \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439, \u0430 \u043d\u0435 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041e\u0431\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442.<\/p>\n<p>\u041e\u0442\u0447\u0451\u0442 \u0441 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0438 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0435\u0439 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0447\u0438\u0441\u0435\u043b \u043f\u0435\u0440\u0438\u043e\u0434 \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442. \u041e\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u043e\u0432\u043d\u043e \u043e\u0434\u043d\u043e: \u043d\u0430 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u0445 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043d\u0435\u0442.<\/p>\n<p>\u041f\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Random \u043d\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d \u043d\u0430 \u0432\u044b\u0437\u043e\u0432\u044b \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432. \u041f\u0440\u0438 \u0442\u0435\u0441\u0442\u0430\u0445 \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e: 8 \u0438 32 \u043f\u043e\u0442\u043e\u043a\u0430 \u043f\u043e \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0443 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0434\u0430\u043b\u0438 \u0442\u0443 \u0436\u0435 \u0441\u0443\u043c\u043c\u0443, \u0447\u0442\u043e \u0438 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a. \u041d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u0440\u043e\u0433\u043e\u043d\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442.<\/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\/RandomProof\" rel=\"noopener nofollow\">RandomProof<\/a> \u2014 \u0437\u0430\u043c\u0435\u0440\u044b, \u043e\u0442\u0447\u0451\u0442\u044b \u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0441 \u0442\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:\/\/github.com\/dotnet\/runtime\/issues\/23198\" rel=\"noopener nofollow\">\u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u0432 dotnet\/runtime<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/System.Private.CoreLib\/src\/System\/Random.CompatImpl.cs#L287\" rel=\"noopener nofollow\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0434\u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/System.Private.CoreLib\/src\/System\/Random.CompatImpl.cs#L280\" rel=\"noopener nofollow\">\u0427\u0438\u0441\u043b\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0437\u043e\u043b\u043e\u0442\u043e\u0433\u043e \u0441\u0435\u0447\u0435\u043d\u0438\u044f<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/System.Private.CoreLib\/src\/System\/Random.Xoshiro256StarStarImpl.cs\" rel=\"noopener nofollow\">\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/dotnet\/fundamentals\/code-analysis\/quality-rules\/ca5394\" rel=\"noopener nofollow\">CA5394: \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c Random \u0442\u0430\u043c, \u0433\u0434\u0435 \u0432\u0430\u0436\u043d\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/dotnet\/api\/system.random\" rel=\"noopener nofollow\">System.Random<\/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\/1082498\/\">https:\/\/habr.com\/ru\/articles\/1082498\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 System.Random \u043a\u0442\u043e-\u0442\u043e \u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044c \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043b 21 \u0432\u043c\u0435\u0441\u0442\u043e 31. \u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043a\u0430\u043a \u0435\u0441\u0442\u044c \u2014 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u0438 new Random(42) \u043d\u0430\u0447\u043d\u0451\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0447\u0438\u0441\u043b\u0430.\u0410 \u0435\u0449\u0451 new Random() \u0438 new Random(42) \u2014 \u0432\u043e\u043e\u0431\u0449\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b. \u041d\u0430 NextInt64 \u043e\u0434\u0438\u043d \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0432 10 \u0440\u0430\u0437.\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 22H2Intel   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. \u0414\u0432\u0435 \u0446\u0438\u0444\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u043b\u0438\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432\u0437\u044f\u0442 \u0443 \u041a\u043d\u0443\u0442\u0430: \u0442\u0430\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0431\u0435\u0440\u0451\u0442 \u0434\u0432\u0430 \u0447\u0438\u0441\u043b\u0430 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u2014 24-\u0435 \u0438 55-\u0435 \u0441 \u043a\u043e\u043d\u0446\u0430 \u2014 \u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u0435\u0442 \u043e\u0434\u043d\u043e \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e. \u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432 \u0448\u0430\u0433\u043e\u043c 31. \u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 .NET \u0448\u0430\u0433 21:int ii = 0;for (int i = 1; i &lt; 55; i++){    \/\/ The range [1..55] is special (Knuth)    if ((ii += 21) &gt;= 55)     \/\/ \u0437\u0434\u0435\u0441\u044c \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c 31    {        ii -= 55;    }     seedArray[ii] = mk;}\u0420\u044f\u0434\u043e\u043c, \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0432\u044b\u0448\u0435, \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430:int mj = 161803398 &#8212; subtraction;   \/\/ magic number based on Phi\u042d\u0442\u043e \u0437\u043e\u043b\u043e\u0442\u043e\u0435 \u0441\u0435\u0447\u0435\u043d\u0438\u0435, \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 100 \u043c\u043b\u043d.\u041f\u0440\u0438\u0447\u0438\u043d\u0430\u041a\u043e\u0434 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043b\u0438 \u043d\u0435 \u0438\u0437 \u043a\u043d\u0438\u0433\u0438 \u041a\u043d\u0443\u0442\u0430, \u0430 \u0438\u0437 \u00ab\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0446\u0435\u043f\u0442\u043e\u0432\u00bb: \u0432 issue \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 283 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043e, \u0447\u0442\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442 \u0434\u0430\u0436\u0435 \u0438\u043c\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0412 .NET Framework \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u043c \u043f\u0440\u044f\u043c\u043e \u043d\u0430\u0434 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c. \u0412 \u043a\u043d\u0438\u0433\u0435 31, \u0432 .NET \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c 21. \u041e\u0442\u0442\u0443\u0434\u0430 \u0436\u0435 \u0432\u0437\u044f\u0442\u043e \u0438 161803398 \u2014 \u0432 \u043a\u043d\u0438\u0433\u0435 \u044d\u0442\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0430 MSEED.\u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u0443 \u041a\u043d\u0443\u0442\u0430, \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0435\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043d\u0430 \u0442\u0430\u043a\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f. \u041e\u0448\u0438\u0431\u043a\u0443 \u043d\u0430\u0448\u0451\u043b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c, \u0438 \u043e\u0442\u043a\u0440\u044b\u043b issue. \u0412 Microsoft \u043e\u0442\u0432\u0435\u0442\u0438\u043b\u0438: \u0447\u0438\u043d\u0438\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u0438\u043d\u0430\u0447\u0435 \u0443 \u0432\u0441\u0435\u0445, \u043a\u0442\u043e \u0437\u0430\u0434\u0430\u0451\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u043e\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u0430.\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u044d\u0442\u043e\u0442 issue \u0435\u0441\u0442\u044c \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445, \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443.\u0413\u0434\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f\u0420\u0435\u0448\u0438\u0442\u044c, \u0447\u0442\u043e \u0438\u0437-\u0437\u0430 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u0447\u0438\u0441\u043b\u0430 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0438 \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u043c\u0438. \u041e\u0442\u0447\u0451\u0442 \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u0435\u043b\u0438\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043d\u0430 \u0434\u0435\u0441\u044f\u0442\u044c \u0440\u0430\u0432\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0438\u0441\u0435\u043b \u043f\u043e\u043f\u0430\u043b\u043e \u0432 \u043a\u0430\u0436\u0434\u0443\u044e, \u043f\u043b\u044e\u0441 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u043d\u0435\u0442:  \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440            \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043e\u0442 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e   \u0441\u0432\u044f\u0437\u044c \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445   new Random()                       0.118 %         -0.000359  new Random(42)                     0.219 %          0.000427  Random.Shared                      0.254 %          0.000391\u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u043b\u0438\u043d\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0430, \u0430 \u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u0432\u0440\u043e\u0434\u0435 TestU01.2. \u0414\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043f\u043e\u0434 \u043e\u0434\u043d\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043d\u0435 Random, \u0430 \u043e\u0434\u043d\u0430 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e. \u0412\u044b\u0431\u043e\u0440 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0438\u0434\u0435\u0442 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0437\u0430\u0434\u0430\u043d\u043e \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043d\u0435\u0442.public Random(){    _impl = new XoshiroImpl();}public Random(int seed){    _impl = new Net5CompatSeedImpl(seed);}\u0427\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043e\u0442\u0447\u0451\u0442  \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u043d                     \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f   new Random()                    XoshiroImpl  new Random(42)                  Net5CompatSeedImpl  new Random(0)                   Net5CompatSeedImpl  new Random(int.MaxValue)        Net5CompatSeedImpl  Random.Shared                   \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435 \u0437\u0430\u0434\u0430\u043d\u0430\u0411\u0435\u0437 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f XoshiroImpl \u2014 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 .NET 6. \u0421 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u2014 Net5CompatSeedImpl, \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439, \u0441 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u043e\u0439. Random.Shared \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u043d\u0430\u0447\u0435: \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0434\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 XoshiroImpl \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430.\u0427\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043c\u0435\u0440\u0421\u043f\u043e\u0441\u043e\u0431i9-10900KFXeon W-2255Xeon Silver 4314new Random()1,5902,0913,240new Random(42)1,8102,4703,308Random.Shared2,5323,3873,993\u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043963,58972,77970,485\u041d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043d\u0430 \u0432\u044b\u0437\u043e\u0432 Next, .NET 10\u041d\u0430 \u043e\u0431\u044b\u0447\u043d\u043e\u043c Next \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043d\u0435\u0432\u0435\u043b\u0438\u043a\u0430: 1,14 \u0440\u0430\u0437\u0430. Random.Shared \u043e\u0442\u0441\u0442\u0430\u0451\u0442 \u043e\u0442 \u043e\u0431\u043e\u0438\u0445, \u0445\u043e\u0442\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0443 \u043d\u0435\u0433\u043e \u0442\u043e\u0442 \u0436\u0435: \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u043e\u043d \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0443 \u043f\u043e\u0442\u043e\u043a\u0430 \u0437\u0430 \u0441\u0432\u043e\u0438\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u043c. \u041a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u0432 22\u201340 \u0440\u0430\u0437.\u041f\u0440\u0438\u0447\u0438\u043d\u0430XoshiroImpl \u0432\u044b\u0434\u0430\u0451\u0442 64 \u0431\u0438\u0442\u0430 \u0437\u0430 \u043e\u0434\u0438\u043d \u0448\u0430\u0433. Net5CompatSeedImpl \u0443\u043c\u0435\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e 31 \u0431\u0438\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u043e\u0434\u043d\u043e 64-\u0431\u0438\u0442\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0443\u0445\u043e\u0434\u0438\u0442 \u0442\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0430 \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0434\u043d\u043e\u0433\u043e. \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043d\u0435 \u0432 \u0442\u0440\u0438 \u0440\u0430\u0437\u0430, \u0430 \u0432 \u0434\u0435\u0441\u044f\u0442\u044c: \u043e\u0434\u0438\u043d \u0432\u044b\u0437\u043e\u0432 Net5CompatSeedImpl \u0443\u0436\u0435 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435, \u0430 \u043a \u0442\u0440\u0451\u043c \u0432\u044b\u0437\u043e\u0432\u0430\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0434\u0432\u0438\u0433\u0438 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.\u0413\u0434\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f\u041f\u043e\u043c\u0435\u0440\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e Next \u0438 \u0440\u0435\u0448\u0438\u0442\u044c, \u0447\u0442\u043e \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043d\u0435\u0442. \u041d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u043e\u043d\u0430 \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u0430\u044f:\u041c\u0435\u0442\u043e\u0434i9-10900KF   \u0431\u0435\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \/ \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043cXeon W-2255   \u0431\u0435\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \/ \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043cXeon Silver 4314   \u0431\u0435\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \/ \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043cNext(0, 1000)0,6318 \/ 2,47421,477 \/ 3,6931,997 \/ 3,635NextDouble()1,9883 \/ 2,00421,977 \/ 2,4443,010 \/ 3,637NextInt64()1,6958 \/ 17,41912,491 \/ 21,4393,206 \/ 33,496NextBytes(), 1 \u041a\u0411118,9883 \/ 2 078,8403189,867 \/ 2 462,811203,598 \/ 3 110,217\u041d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u0431\u0435\u0437 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u0441 \u043d\u0438\u043c, .NET 10\u00a0\u041d\u0430 NextInt64 \u0440\u0430\u0437\u0440\u044b\u0432 8,6\u201310,4 \u0440\u0430\u0437\u0430, \u043d\u0430 NextBytes \u0441 \u0431\u0443\u0444\u0435\u0440\u043e\u043c \u0432 \u043a\u0438\u043b\u043e\u0431\u0430\u0439\u0442 \u2014 13,0\u201317,5 \u0440\u0430\u0437\u0430.\u0423 NextDouble \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0430\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u0431\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043e\u0434\u043d\u0438\u043c \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435\u043c. \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0432 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0438\u0442 \u0437\u0430 \u0448\u0430\u0433, \u0430 \u0434\u043b\u044f NextDouble \u043e\u0431\u043e\u0438\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0434\u043d\u043e\u0433\u043e \u0448\u0430\u0433\u0430.3. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\/\/ \u0441 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c: \u0446\u0438\u043a\u043b \u043d\u0430 56 \u0447\u0438\u0441\u0435\u043bpublic Net5CompatSeedImpl(int seed){    _prng = new CompatPrng(seed);} \/\/ \u0431\u0435\u0437 \u043d\u0435\u0433\u043e: \u0447\u0435\u0442\u044b\u0440\u0435 \u0447\u0438\u0441\u043b\u0430 \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044bpublic unsafe XoshiroImpl(){    ulong* ptr = stackalloc ulong[4];    do    {        Interop.GetRandomBytes((byte*)ptr, 4 * sizeof(ulong));        _s0 = ptr[0];        _s1 = ptr[1];        _s2 = ptr[2];        _s3 = ptr[3];    }    while ((_s0 | _s1 | _s2 | _s3) == 0);}new Random(42) \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0435\u0442 \u0446\u0438\u043a\u043b \u043d\u0430 56 \u0447\u0438\u0441\u0435\u043b \u2014 \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439, \u0441 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u043e\u0439. new Random() \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0447\u0435\u0442\u044b\u0440\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430. \u0426\u0438\u043a\u043b \u043d\u0443\u0436\u0435\u043d \u043d\u0430 \u0440\u0435\u0434\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439: \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0447\u0435\u0442\u044b\u0440\u0435 \u0447\u0438\u0441\u043b\u0430 \u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u043d\u0443\u043b\u044f\u043c\u0438, XoshiroImpl \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u043b\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f.\u0427\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043c\u0435\u0440\u0421\u043f\u043e\u0441\u043e\u0431i9-10900KFXeon W-2255Xeon Silver 4314new Random()97,56118,6126,8new Random(42)240,64381,3438,3\u041d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b, .NET 10. \u041f\u0430\u043c\u044f\u0442\u0438 72 \u0431\u0430\u0439\u0442\u0430 \u043f\u0440\u043e\u0442\u0438\u0432 304\u00a0\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 240,64 \u043d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043f\u0440\u043e\u0442\u0438\u0432 97,56 \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 304 \u0431\u0430\u0439\u0442\u0430 \u043f\u0440\u043e\u0442\u0438\u0432 72. \u041d\u0430 \u0442\u0440\u0451\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445 \u043a\u0430\u0440\u0442\u0438\u043d\u0430 \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435.\u0413\u0434\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c new Random(42) \u0432\u043d\u0443\u0442\u0440\u0438 \u0446\u0438\u043a\u043b\u0430. \u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u044d\u0442\u043e 304 \u0431\u0430\u0439\u0442\u0430 \u0432 \u043a\u0443\u0447\u0435 \u0438 56 \u0447\u0438\u0441\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0441 \u043d\u0443\u043b\u044f.4. \u0427\u0438\u0441\u043b\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0437\u0430 24 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043aNet5CompatSeedImpl \u0445\u0440\u0430\u043d\u0438\u0442 55 \u0447\u0438\u0441\u0435\u043b. \u0418\u0445 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u043e\u043c:for (int seed = 0; seed &lt; 100_000; seed++){    Random guess = new(seed);    if (guess.Next() != seen[0])    {        continue;    }     \/\/ \u0441\u0432\u0435\u0440\u044f\u0435\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435}\u0427\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043e\u0442\u0447\u0451\u0442  \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u043e: 12345, \u0437\u0430 24 \u043c\u0441   \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u044b\u0434\u0430\u0441\u0442:  1153550655, 1527729513, 144439007  \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043e:       1153550655, 1527729513, 144439007  \u0441\u043e\u0432\u043f\u0430\u043b\u043e: True \u0422\u0440\u0451\u0445 \u0447\u0438\u0441\u0435\u043b \u0443\u0436\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e: \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u043b \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u043f\u043e\u0434\u043e\u0448\u0451\u043b \u043e\u0434\u0438\u043d.\u041f\u0440\u0438\u0447\u0438\u043d\u0430\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0438\u0434\u0451\u0442 \u0434\u043e 100 000, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0437\u044f\u0442\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435. \u0412 \u0445\u0443\u0434\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0433\u043e int \u2014 4 294 967 296 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u2014 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, \u043d\u0430 \u0432\u0435\u0441\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0443\u0439\u0434\u0451\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442. \u0410 \u0435\u0441\u043b\u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0437\u044f\u043b\u0438 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0441\u0447\u0451\u0442 \u0438\u0434\u0451\u0442 \u043d\u0430 \u0442\u044b\u0441\u044f\u0447\u0438.\u0413\u0434\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 Random \u0442\u043e\u043a\u0435\u043d \u0441\u0431\u0440\u043e\u0441\u0430 \u043f\u0430\u0440\u043e\u043b\u044f, \u043a\u043e\u0434 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043d\u043e\u043c\u0435\u0440 \u0437\u0430\u043a\u0430\u0437\u0430. \u041f\u0435\u0440\u0435\u0431\u043e\u0440 \u0437\u0430\u0439\u043c\u0451\u0442 \u043e\u0442 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0438\u043d\u0443\u0442 \u2014 \u0441\u043c\u043e\u0442\u0440\u044f \u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u0442\u043e \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.\u041d\u0430 \u044d\u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439 \u0432 .NET \u0435\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e CA5394: System.Random \u043d\u0435 \u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u0430\u043c, \u0433\u0434\u0435 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c. \u041d\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u0438 \u0432 .NET 10, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0432 .editorconfig:dotnet_diagnostic.CA5394.severity = warning\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.\u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c: \u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u043c\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. \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.\u0412 \u0441\u0432\u0435\u0440\u043a\u0435 \u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 ==, \u0438 \u044d\u0442\u043e \u043d\u0435 \u043e\u0448\u0438\u0431\u043a\u0430: \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439, \u0430 \u043d\u0435 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041e\u0431\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442.\u041e\u0442\u0447\u0451\u0442 \u0441 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0438 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0435\u0439 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0447\u0438\u0441\u0435\u043b \u043f\u0435\u0440\u0438\u043e\u0434 \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442. \u041e\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u043e\u0432\u043d\u043e \u043e\u0434\u043d\u043e: \u043d\u0430 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u0445 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043d\u0435\u0442.\u041f\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Random \u043d\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d \u043d\u0430 \u0432\u044b\u0437\u043e\u0432\u044b \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432. \u041f\u0440\u0438 \u0442\u0435\u0441\u0442\u0430\u0445 \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e: 8 \u0438 32 \u043f\u043e\u0442\u043e\u043a\u0430 \u043f\u043e \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0443 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0434\u0430\u043b\u0438 \u0442\u0443 \u0436\u0435 \u0441\u0443\u043c\u043c\u0443, \u0447\u0442\u043e \u0438 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a. \u041d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u0440\u043e\u0433\u043e\u043d\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442.\u041a\u043e\u0434 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438RandomProof \u2014 \u0437\u0430\u043c\u0435\u0440\u044b, \u043e\u0442\u0447\u0451\u0442\u044b \u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0441 \u0442\u0440\u0451\u0445 \u043c\u0430\u0448\u0438\u043d\u0421\u0441\u044b\u043b\u043a\u0438\u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u0432 dotnet\/runtime\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0434\u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438\u0427\u0438\u0441\u043b\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0437\u043e\u043b\u043e\u0442\u043e\u0433\u043e \u0441\u0435\u0447\u0435\u043d\u0438\u044f\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043cCA5394: \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c Random \u0442\u0430\u043c, \u0433\u0434\u0435 \u0432\u0430\u0436\u043d\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044cSystem.Random\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\/1082498\/<\/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-494736","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/494736","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=494736"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/494736\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=494736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=494736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=494736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}