{"id":494782,"date":"2026-09-15T17:30:36","date_gmt":"2026-09-15T17:30:36","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=494782"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=494782","title":{"rendered":"\u0410 \u0447\u0451, \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e? \u0422\u0440\u0438 \u043c\u0435\u0441\u0442\u0430 \u0432 .NET, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0440\u0430\u0437\u0432\u0438\u0434\u0435\u0442\u044c"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0443\u0441\u0442\u043e\u0439 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a Random \u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430. \u041c\u0430\u0441\u0441\u0438\u0432 \u0441\u0442\u0440\u043e\u043a \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0438\u043f\u0430 object[] \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0447\u0438\u0441\u043b\u0430. \u0410 Matrix4x4 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0438 \u043f\u043e\u043b\u044f\u0445 float \u0432\u043c\u0435\u0441\u0442\u043e \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432.\u00a0<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"414\" width=\"414\">\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=\"414\" width=\"414\">\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=\"414\" width=\"414\">\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=\"414\" width=\"414\">\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=\"414\" width=\"414\">\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>\u00a0<\/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. \u041f\u0443\u0441\u0442\u043e\u0439 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a \u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e<\/h3>\n<h4>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a<\/h4>\n<p>\u041f\u0443\u0441\u0442\u043e\u0439 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a:<\/p>\n<pre><code class=\"cs\">internal sealed class EmptyRandom : Random{} internal sealed class SeededRandom : Random{    internal SeededRandom(int seed) : base(seed)    {    }}<\/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>\u041d\u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043d\u0438 \u043f\u043e\u043b\u0435\u0439. \u0418 \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 <a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/System.Private.CoreLib\/src\/System\/Random.cs#L33\" rel=\"noopener nofollow\">\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440<\/a> Random \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442 \u0435\u043c\u0443 \u0434\u0440\u0443\u0433\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e:<\/p>\n<pre><code class=\"cs\">public Random(){    \/\/ Note: if this is a derived type, the CompatDerivedImpl is used    _impl = GetType() == typeof(Random)        ? new XoshiroImpl()        : new CompatDerivedImpl(this);}<\/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 EmptyRandom()               Net5CompatDerivedImpl  new Random(42)                  Net5CompatSeedImpl  new SeededRandom(42)            Net5CompatDerivedImpl \u041f\u0435\u0440\u0432\u044b\u0435 5 \u0447\u0438\u0441\u0435\u043b \u0441 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c 42:   Random               668   140   125   522   168  SeededRandom         668   140   125   522   168<\/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>\u0427\u0438\u0441\u043b\u0430 \u0442\u0435 \u0436\u0435. \u041e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u044c \u0432\u044b\u0437\u043e\u0432\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 data-colwidth=\"152\" width=\"152\">\n<p align=\"left\"><strong>\u041c\u0435\u0442\u043e\u0434<\/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 data-colwidth=\"152\" width=\"152\">\n<p align=\"left\">Next<\/p>\n<\/td>\n<td>\n<p align=\"center\">1,816 \/ 2,608<\/p>\n<\/td>\n<td>\n<p align=\"center\">2,333 \/ 3,190<\/p>\n<\/td>\n<td>\n<p align=\"center\">2,318 \/ 3,138<\/p>\n<\/td>\n<td>\n<p align=\"center\">3,196 \/ 4,104<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"152\" width=\"152\">\n<p align=\"left\">NextDouble<\/p>\n<\/td>\n<td>\n<p align=\"center\">2,618 \/ 3,937<\/p>\n<\/td>\n<td>\n<p align=\"center\">3,104 \/ 4,434<\/p>\n<\/td>\n<td>\n<p align=\"center\">2,020 \/ 4,940<\/p>\n<\/td>\n<td>\n<p align=\"center\">3,316 \/ 6,034<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"152\" width=\"152\">\n<p align=\"left\">NextBytes, 256 \u0431\u0430\u0439\u0442<\/p>\n<\/td>\n<td>\n<p align=\"center\">37,025 \/ 537,487<\/p>\n<\/td>\n<td>\n<p align=\"center\">35,885 \/ 572,608<\/p>\n<\/td>\n<td>\n<p align=\"center\">50,093 \/ 648,626<\/p>\n<\/td>\n<td>\n<p align=\"center\">51,063 \/ 889,873<\/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\u0430\u0437\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u0438 \u043f\u0443\u0441\u0442\u043e\u0439 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a, .NET 10<\/em>\u00a0<\/p>\n<p>\u041d\u0430 Next \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a \u043e\u0442\u0441\u0442\u0430\u0451\u0442 \u0432 1,28\u20131,44 \u0440\u0430\u0437\u0430. \u041d\u0430 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0431\u0443\u0444\u0435\u0440\u0430 \u2014 \u0432 12,95\u201317,43 \u0440\u0430\u0437\u0430.<\/p>\n<h4>\u041f\u0440\u0438\u0447\u0438\u043d\u0430<\/h4>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043d\u0443\u0436\u043d\u0430 \u0440\u0430\u0434\u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u0421\u043a\u0430\u0436\u0435\u043c, \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b Sample. \u0422\u043e\u0433\u0434\u0430 NextBytes \u043e\u0431\u044f\u0437\u0430\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0433\u043e, \u0430 \u043d\u0435 \u0441\u0432\u043e\u044e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u2014 \u0438\u043d\u0430\u0447\u0435 \u0432 \u0441\u0442\u0430\u0440\u043e\u043c \u043a\u043e\u0434\u0435 \u0447\u0438\u0441\u043b\u0430 \u043f\u043e\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f.<\/p>\n<p>\u041e\u0442\u043b\u0438\u0447\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0441\u043b\u0443\u0447\u0430\u0439 \u043e\u0442 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e: \u043f\u0443\u0441\u0442\u043e\u0439 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a \u0438 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a \u0441 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435 \u043f\u043e\u0442\u043e\u043c\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 <a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/System.Private.CoreLib\/src\/System\/Random.CompatImpl.cs#L196\" rel=\"noopener nofollow\">Net5CompatDerivedImpl<\/a>.<\/p>\n<p>\u041d\u0430 \u0431\u0443\u0444\u0435\u0440\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0441\u0430\u043c\u0430\u044f \u0431\u043e\u043b\u044c\u0448\u0430\u044f: Net5CompatDerivedImpl \u043f\u0438\u0448\u0435\u0442 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0431\u0430\u0439\u0442\u0443 \u0437\u0430 \u0440\u0430\u0437, \u0430 <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 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e \u0432\u043e\u0441\u0435\u043c\u044c.<\/p>\n<h4>\u0413\u0434\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f<\/h4>\n<p>\u0423\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u043c\u0435\u0442\u043e\u0434. \u041a\u043b\u0430\u0441\u0441 \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c NextGuid \u043f\u043e\u043b\u0443\u0447\u0438\u0442 Net5CompatDerivedImpl \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432. \u0422\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439, <a href=\"https:\/\/habr.com\/ru\/articles\/1082498\/\" rel=\"noopener nofollow\">\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0436\u0438\u0432\u0451\u0442 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0435 20 \u043b\u0435\u0442<\/a>.<\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0443\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043c\u0435\u0442\u043e\u0434 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u0441 \u043f\u043e\u043b\u0435\u043c \u0442\u0438\u043f\u0430 Random \u0432\u043d\u0443\u0442\u0440\u0438.<\/p>\n<h3>2. string[] \u0438 object[] \u2014 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442<\/h3>\n<h4>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a<\/h4>\n<p>\u041c\u0430\u0441\u0441\u0438\u0432 \u0441\u0442\u0440\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0438\u043f\u0430 object[], \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0435 \u0432\u044b\u0434\u0430\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n<pre><code class=\"cs\">string[] strings = new string[4];object[] objects = strings; objects[0] = \"\u0441\u0442\u0440\u043e\u043a\u0430\";   \/\/ \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442objects[0] = 42;         \/\/ System.ArrayTypeMismatchException<\/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\">  objects.GetType()              String[]  ReferenceEquals(strings, objects)  True   objects[0] = \"\u0441\u0442\u0440\u043e\u043a\u0430\"           \u043f\u0440\u043e\u0448\u043b\u043e  objects[0] = 42                 ArrayTypeMismatchException  new Span&lt;object&gt;(objects)       ArrayTypeMismatchException  new Span&lt;string&gt;(strings)       \u043f\u0440\u043e\u0448\u043b\u043e<\/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 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442: ReferenceEquals \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 true, \u0430 \u0442\u0438\u043f \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f String[].<\/p>\n<h4>\u041f\u0440\u0438\u0447\u0438\u043d\u0430<\/h4>\n<p>\u041c\u0430\u0441\u0441\u0438\u0432\u044b \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0432 .NET \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u044b: string[] \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u043e\u043c object[]. \u0422\u0430\u043a \u0440\u0435\u0448\u0438\u043b\u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: \u043e\u0431\u043e\u0431\u0449\u0451\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0442\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e, \u0438 \u0431\u0435\u0437 \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c \u043b\u044e\u0431\u043e\u0433\u043e \u0442\u0438\u043f\u0430.<\/p>\n<p>\u0426\u0435\u043d\u0430 \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. \u0420\u0430\u043d\u0442\u0430\u0439\u043c \u0441\u0432\u0435\u0440\u044f\u0435\u0442 \u0442\u0438\u043f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u043c \u0442\u0438\u043f\u043e\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438 \u043f\u0440\u0438 \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0431\u0440\u043e\u0441\u0430\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e <a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/System.Private.CoreLib\/src\/System\/Span.cs#L48\" rel=\"noopener nofollow\">Span<\/a> \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u0447\u0442\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d:<\/p>\n<pre><code class=\"cs\">public Span(T[]? array){    if (array == null)    {        this = default;        return;    }     if (!typeof(T).IsValueType &amp;&amp; array.GetType() != typeof(T[]))    {        ThrowHelper.ThrowArrayTypeMismatchException();    }     \/\/ ...}<\/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\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0443\u0436\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432: int[] \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0442\u0438\u043f\u0430.<\/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 \u044d\u0442\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u0440\u043e\u0433\u043e \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u0441\u044f. \u0417\u0430\u043c\u0435\u0440 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b: 0,3966 \u043d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0443 string[] \u043f\u0440\u043e\u0442\u0438\u0432 0,4034 \u0443 int[] \u043d\u0430 i9-10900KF, \u0438 \u0442\u0430\u043a \u0436\u0435 \u043d\u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0440\u0451\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445. \u0422\u0438\u043f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0432 \u0442\u043e\u0447\u043a\u0435 \u0432\u044b\u0437\u043e\u0432\u0430, \u0430 \u043f\u043e\u0442\u043e\u043c \u0434\u0436\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0443\u0431\u0438\u0440\u0430\u0435\u0442.<\/p>\n<p>\u0417\u0430\u0442\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0441\u0430\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044e\u0442 \u0432 <code>Span<\/code> \u0438 \u0443\u0436\u0435 \u0441 \u043d\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043d\u0451\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0435\u0442.<\/p>\n<h3>3. \u0412 Matrix4x4 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u044c float \u0432\u043c\u0435\u0441\u0442\u043e \u0447\u0435\u0442\u044b\u0440\u0451\u0445 Vector4<\/h3>\n<h4>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a<\/h4>\n<p>\u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a <a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/System.Private.CoreLib\/src\/System\/Numerics\/Matrix4x4.cs#L19\" rel=\"noopener nofollow\">Matrix4x4<\/a>:<\/p>\n<pre><code class=\"cs\">\/\/ In an ideal world, we'd have 4x Vector4 fields. However, Matrix4x4 was\/\/ shipped with 16x public float fields and as such we cannot change the\/\/ size or layout of the type without it being a breaking change.<\/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\">  \u0442\u0438\u043f            \u0440\u0430\u0437\u043c\u0435\u0440   \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u043e\u043b\u0435\u0439   \u0432\u0441\u0435 \u043f\u043e\u043b\u044f float   Matrix4x4        64 \u0431\u0430\u0439\u0442              16              \u0434\u0430  Matrix3x2        24 \u0431\u0430\u0439\u0442               6              \u0434\u0430  Vector4          16 \u0431\u0430\u0439\u0442               4              \u0434\u0430 \u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043d\u0435\u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0443 Matrix4x4:   Impl<\/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>\u041f\u0440\u0438\u0447\u0438\u043d\u0430<\/h4>\n<p>\u0427\u0435\u0442\u044b\u0440\u0435 Vector4 \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0434 \u043c\u0430\u0442\u0440\u0438\u0446\u0435\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438. \u0428\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 float \u0442\u0430\u043a \u043d\u0435 \u0443\u043c\u0435\u044e\u0442.<\/p>\n<p>\u041f\u043e\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435, \u043a \u043d\u0438\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u0438 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432\u0445\u043e\u0434\u044f\u0442 \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c. \u0418\u0445 \u0437\u0430\u043c\u0435\u043d\u0430 \u043d\u0430\u0440\u0443\u0448\u0430\u0435\u0442 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u043c \u0444\u0430\u0439\u043b\u0435 \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/System.Private.CoreLib\/src\/System\/Numerics\/Matrix4x4.Impl.cs#L29\" rel=\"noopener nofollow\">Impl<\/a> \u0442\u043e\u0433\u043e \u0436\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u043d\u043e \u0441 \u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438, \u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0442\u0438\u043f \u043a \u043d\u0435\u0439 \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0447\u0435\u0440\u0435\u0437 Unsafe.As. \u0412 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442: \u0442\u0438\u043f\u044b \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u0438 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0435, \u0434\u0436\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0442\u0435\u043c \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c.<\/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 data-colwidth=\"172\" width=\"172\">\n<p align=\"left\"><strong>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435<\/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 data-colwidth=\"172\" width=\"172\">\n<p align=\"left\">\u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 4\u00d74<\/p>\n<\/td>\n<td>\n<p align=\"center\">6,306<\/p>\n<\/td>\n<td>\n<p align=\"center\">6,405<\/p>\n<\/td>\n<td>\n<p align=\"center\">7,081<\/p>\n<\/td>\n<td>\n<p align=\"center\">11,601<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"172\" width=\"172\">\n<p align=\"left\">\u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 4\u00d74<\/p>\n<\/td>\n<td>\n<p align=\"center\">2,353<\/p>\n<\/td>\n<td>\n<p align=\"center\">4,464<\/p>\n<\/td>\n<td>\n<p align=\"center\">3,044<\/p>\n<\/td>\n<td>\n<p align=\"center\">10,795<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"172\" width=\"172\">\n<p align=\"left\">\u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 3\u00d72<\/p>\n<\/td>\n<td>\n<p align=\"center\">4,921<\/p>\n<\/td>\n<td>\n<p align=\"center\">6,184<\/p>\n<\/td>\n<td>\n<p align=\"center\">3,912<\/p>\n<\/td>\n<td>\n<p align=\"center\">6,101<\/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>\u00a0<\/p>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Matrix4x4 \u0432 .NET \u043d\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0447\u0438\u0441\u043b\u0430 \u043d\u0435 \u0441 \u0447\u0435\u043c. \u0427\u0435\u0442\u044b\u0440\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u043f\u043e \u0436\u0435\u043b\u0435\u0437\u0443: \u043d\u0430 Xeon Silver 4314 \u0442\u0435 \u0436\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0434\u0443\u0442 \u043f\u043e\u0447\u0442\u0438 \u0432\u0434\u0432\u043e\u0435 \u0434\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043d\u0430 i9-10900KF.<\/p>\n<h4>\u0413\u0434\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f<\/h4>\n<p>\u041e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438. \u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0436\u0435 \u0440\u0435\u043b\u0438\u0437\u0430 \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u043b\u0435\u0439 \u0438 \u0438\u0445 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438, \u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0445 \u0443\u0436\u0435 \u043d\u0435\u043b\u044c\u0437\u044f.<\/p>\n<p>\u0421\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435\u0442: \u0432\u043d\u0443\u0442\u0440\u0438 \u0443 \u043d\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u044b, \u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u043b\u044e\u0431\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/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. \u041d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u043f\u0443\u0441\u0442\u044b\u043c, \u0438 \u0441\u0432\u0435\u0440\u043a\u0430 \u044d\u0442\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442: \u0443 \u043d\u0435\u0433\u043e \u043d\u0435\u0442 \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0432 Span \u0432 \u0437\u0430\u043c\u0435\u0440\u0435 \u043d\u0435 \u043f\u0440\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c. \u041e\u043d\u0430 \u0432 \u043a\u043e\u0434\u0435 \u0435\u0441\u0442\u044c, \u043d\u043e \u0434\u0436\u0438\u0442 \u0435\u0451 \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u0442\u0438\u043f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0432 \u0442\u043e\u0447\u043a\u0435 \u0432\u044b\u0437\u043e\u0432\u0430.<\/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\/LegacyProof\" rel=\"noopener nofollow\">LegacyProof<\/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:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/System.Private.CoreLib\/src\/System\/Random.cs#L33\" rel=\"noopener nofollow\">Random: \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/60629d14374c56f1cb51819049ad1fa529307f8d\/src\/libraries\/System.Private.CoreLib\/src\/System\/Span.cs#L48\" rel=\"noopener nofollow\">Span: \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\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\/Numerics\/Matrix4x4.cs#L19\" rel=\"noopener nofollow\">Matrix4x4: \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u043b\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\/Numerics\/Matrix3x2.cs#L19\" rel=\"noopener nofollow\">Matrix3x2: \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/dotnet\/api\/system.arraytypemismatchexception\" rel=\"noopener nofollow\">ArrayTypeMismatchException<\/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\/1082672\/\">https:\/\/habr.com\/ru\/articles\/1082672\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0443\u0441\u0442\u043e\u0439 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a Random \u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430. \u041c\u0430\u0441\u0441\u0438\u0432 \u0441\u0442\u0440\u043e\u043a \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0438\u043f\u0430 object[] \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0447\u0438\u0441\u043b\u0430. \u0410 Matrix4x4 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0438 \u043f\u043e\u043b\u044f\u0445 float \u0432\u043c\u0435\u0441\u0442\u043e \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432.\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\u00a0\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. \u041f\u0443\u0441\u0442\u043e\u0439 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a \u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u041f\u0443\u0441\u0442\u043e\u0439 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a:internal sealed class EmptyRandom : Random{} internal sealed class SeededRandom : Random{    internal SeededRandom(int seed) : base(seed)    {    }}\u041d\u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043d\u0438 \u043f\u043e\u043b\u0435\u0439. \u0418 \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 Random \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442 \u0435\u043c\u0443 \u0434\u0440\u0443\u0433\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e:public Random(){    \/\/ Note: if this is a derived type, the CompatDerivedImpl is used    _impl = GetType() == typeof(Random)        ? new XoshiroImpl()        : new CompatDerivedImpl(this);}\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 EmptyRandom()               Net5CompatDerivedImpl  new Random(42)                  Net5CompatSeedImpl  new SeededRandom(42)            Net5CompatDerivedImpl \u041f\u0435\u0440\u0432\u044b\u0435 5 \u0447\u0438\u0441\u0435\u043b \u0441 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c 42:   Random               668   140   125   522   168  SeededRandom         668   140   125   522   168\u0427\u0438\u0441\u043b\u0430 \u0442\u0435 \u0436\u0435. \u041e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u0430.\u0427\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043c\u0435\u0440\u041c\u0435\u0442\u043e\u0434i9-10900KFRyzen 9 5950XXeon W-2255Xeon Silver 4314Next1,816 \/ 2,6082,333 \/ 3,1902,318 \/ 3,1383,196 \/ 4,104NextDouble2,618 \/ 3,9373,104 \/ 4,4342,020 \/ 4,9403,316 \/ 6,034NextBytes, 256 \u0431\u0430\u0439\u044237,025 \/ 537,48735,885 \/ 572,60850,093 \/ 648,62651,063 \/ 889,873\u041d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u0438 \u043f\u0443\u0441\u0442\u043e\u0439 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a, .NET 10\u00a0\u041d\u0430 Next \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a \u043e\u0442\u0441\u0442\u0430\u0451\u0442 \u0432 1,28\u20131,44 \u0440\u0430\u0437\u0430. \u041d\u0430 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0431\u0443\u0444\u0435\u0440\u0430 \u2014 \u0432 12,95\u201317,43 \u0440\u0430\u0437\u0430.\u041f\u0440\u0438\u0447\u0438\u043d\u0430\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043d\u0443\u0436\u043d\u0430 \u0440\u0430\u0434\u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u0421\u043a\u0430\u0436\u0435\u043c, \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b Sample. \u0422\u043e\u0433\u0434\u0430 NextBytes \u043e\u0431\u044f\u0437\u0430\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0433\u043e, \u0430 \u043d\u0435 \u0441\u0432\u043e\u044e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u2014 \u0438\u043d\u0430\u0447\u0435 \u0432 \u0441\u0442\u0430\u0440\u043e\u043c \u043a\u043e\u0434\u0435 \u0447\u0438\u0441\u043b\u0430 \u043f\u043e\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f.\u041e\u0442\u043b\u0438\u0447\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0441\u043b\u0443\u0447\u0430\u0439 \u043e\u0442 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e: \u043f\u0443\u0441\u0442\u043e\u0439 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a \u0438 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a \u0441 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435 \u043f\u043e\u0442\u043e\u043c\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 Net5CompatDerivedImpl.\u041d\u0430 \u0431\u0443\u0444\u0435\u0440\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0441\u0430\u043c\u0430\u044f \u0431\u043e\u043b\u044c\u0448\u0430\u044f: Net5CompatDerivedImpl \u043f\u0438\u0448\u0435\u0442 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0431\u0430\u0439\u0442\u0443 \u0437\u0430 \u0440\u0430\u0437, \u0430 XoshiroImpl \u2014 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e \u0432\u043e\u0441\u0435\u043c\u044c.\u0413\u0434\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f\u0423\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u043c\u0435\u0442\u043e\u0434. \u041a\u043b\u0430\u0441\u0441 \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c NextGuid \u043f\u043e\u043b\u0443\u0447\u0438\u0442 Net5CompatDerivedImpl \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432. \u0422\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0436\u0438\u0432\u0451\u0442 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0435 20 \u043b\u0435\u0442.\u0412\u043c\u0435\u0441\u0442\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0443\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043c\u0435\u0442\u043e\u0434 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u0441 \u043f\u043e\u043b\u0435\u043c \u0442\u0438\u043f\u0430 Random \u0432\u043d\u0443\u0442\u0440\u0438.2. string[] \u0438 object[] \u2014 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u041c\u0430\u0441\u0441\u0438\u0432 \u0441\u0442\u0440\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0438\u043f\u0430 object[], \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0435 \u0432\u044b\u0434\u0430\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0443:string[] strings = new string[4];object[] objects = strings; objects[0] = &#171;\u0441\u0442\u0440\u043e\u043a\u0430&#187;;   \/\/ \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442objects[0] = 42;         \/\/ System.ArrayTypeMismatchException\u0427\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043e\u0442\u0447\u0451\u0442  objects.GetType()              String[]  ReferenceEquals(strings, objects)  True   objects[0] = &#171;\u0441\u0442\u0440\u043e\u043a\u0430&#187;           \u043f\u0440\u043e\u0448\u043b\u043e  objects[0] = 42                 ArrayTypeMismatchException  new Span&lt;object&gt;(objects)       ArrayTypeMismatchException  new Span&lt;string&gt;(strings)       \u043f\u0440\u043e\u0448\u043b\u043e\u042d\u0442\u043e \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442: ReferenceEquals \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 true, \u0430 \u0442\u0438\u043f \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f String[].\u041f\u0440\u0438\u0447\u0438\u043d\u0430\u041c\u0430\u0441\u0441\u0438\u0432\u044b \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0432 .NET \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u044b: string[] \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u043e\u043c object[]. \u0422\u0430\u043a \u0440\u0435\u0448\u0438\u043b\u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: \u043e\u0431\u043e\u0431\u0449\u0451\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0442\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e, \u0438 \u0431\u0435\u0437 \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c \u043b\u044e\u0431\u043e\u0433\u043e \u0442\u0438\u043f\u0430.\u0426\u0435\u043d\u0430 \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. \u0420\u0430\u043d\u0442\u0430\u0439\u043c \u0441\u0432\u0435\u0440\u044f\u0435\u0442 \u0442\u0438\u043f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u043c \u0442\u0438\u043f\u043e\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438 \u043f\u0440\u0438 \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0431\u0440\u043e\u0441\u0430\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.\u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e Span \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u0447\u0442\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d:public Span(T[]? array){    if (array == null)    {        this = default;        return;    }     if (!typeof(T).IsValueType &amp;&amp; array.GetType() != typeof(T[]))    {        ThrowHelper.ThrowArrayTypeMismatchException();    }     \/\/ &#8230;}\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0443\u0436\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432: int[] \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0442\u0438\u043f\u0430.\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 \u044d\u0442\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u0440\u043e\u0433\u043e \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u0441\u044f. \u0417\u0430\u043c\u0435\u0440 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b: 0,3966 \u043d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0443 string[] \u043f\u0440\u043e\u0442\u0438\u0432 0,4034 \u0443 int[] \u043d\u0430 i9-10900KF, \u0438 \u0442\u0430\u043a \u0436\u0435 \u043d\u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0440\u0451\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445. \u0422\u0438\u043f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0432 \u0442\u043e\u0447\u043a\u0435 \u0432\u044b\u0437\u043e\u0432\u0430, \u0430 \u043f\u043e\u0442\u043e\u043c \u0434\u0436\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0443\u0431\u0438\u0440\u0430\u0435\u0442.\u0417\u0430\u0442\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0441\u0430\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044e\u0442 \u0432 Span \u0438 \u0443\u0436\u0435 \u0441 \u043d\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043d\u0451\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0435\u0442.3. \u0412 Matrix4x4 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u044c float \u0432\u043c\u0435\u0441\u0442\u043e \u0447\u0435\u0442\u044b\u0440\u0451\u0445 Vector4\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a Matrix4x4:\/\/ In an ideal world, we&#8217;d have 4x Vector4 fields. However, Matrix4x4 was\/\/ shipped with 16x public float fields and as such we cannot change the\/\/ size or layout of the type without it being a breaking change.\u0427\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043e\u0442\u0447\u0451\u0442  \u0442\u0438\u043f            \u0440\u0430\u0437\u043c\u0435\u0440   \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u043e\u043b\u0435\u0439   \u0432\u0441\u0435 \u043f\u043e\u043b\u044f float   Matrix4x4        64 \u0431\u0430\u0439\u0442              16              \u0434\u0430  Matrix3x2        24 \u0431\u0430\u0439\u0442               6              \u0434\u0430  Vector4          16 \u0431\u0430\u0439\u0442               4              \u0434\u0430 \u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043d\u0435\u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0443 Matrix4x4:   Impl\u041f\u0440\u0438\u0447\u0438\u043d\u0430\u0427\u0435\u0442\u044b\u0440\u0435 Vector4 \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0434 \u043c\u0430\u0442\u0440\u0438\u0446\u0435\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438. \u0428\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 float \u0442\u0430\u043a \u043d\u0435 \u0443\u043c\u0435\u044e\u0442.\u041f\u043e\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435, \u043a \u043d\u0438\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u0438 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432\u0445\u043e\u0434\u044f\u0442 \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c. \u0418\u0445 \u0437\u0430\u043c\u0435\u043d\u0430 \u043d\u0430\u0440\u0443\u0448\u0430\u0435\u0442 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c.\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u043c \u0444\u0430\u0439\u043b\u0435 \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 Impl \u0442\u043e\u0433\u043e \u0436\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u043d\u043e \u0441 \u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438, \u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0442\u0438\u043f \u043a \u043d\u0435\u0439 \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0447\u0435\u0440\u0435\u0437 Unsafe.As. \u0412 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442: \u0442\u0438\u043f\u044b \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u0438 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0435, \u0434\u0436\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0442\u0435\u043c \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c.\u0427\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043c\u0435\u0440\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435i9-10900KFRyzen 9 5950XXeon W-2255Xeon Silver 4314\u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 4\u00d746,3066,4057,08111,601\u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 4\u00d742,3534,4643,04410,795\u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 3\u00d724,9216,1843,9126,101\u041d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b, .NET 10\u00a0\u0412\u0442\u043e\u0440\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Matrix4x4 \u0432 .NET \u043d\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0447\u0438\u0441\u043b\u0430 \u043d\u0435 \u0441 \u0447\u0435\u043c. \u0427\u0435\u0442\u044b\u0440\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u043f\u043e \u0436\u0435\u043b\u0435\u0437\u0443: \u043d\u0430 Xeon Silver 4314 \u0442\u0435 \u0436\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0434\u0443\u0442 \u043f\u043e\u0447\u0442\u0438 \u0432\u0434\u0432\u043e\u0435 \u0434\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043d\u0430 i9-10900KF.\u0413\u0434\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f\u041e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438. \u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0436\u0435 \u0440\u0435\u043b\u0438\u0437\u0430 \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u043b\u0435\u0439 \u0438 \u0438\u0445 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438, \u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0445 \u0443\u0436\u0435 \u043d\u0435\u043b\u044c\u0437\u044f.\u0421\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435\u0442: \u0432\u043d\u0443\u0442\u0440\u0438 \u0443 \u043d\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u044b, \u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u043b\u044e\u0431\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.\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. \u041d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u043f\u0443\u0441\u0442\u044b\u043c, \u0438 \u0441\u0432\u0435\u0440\u043a\u0430 \u044d\u0442\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442: \u0443 \u043d\u0435\u0433\u043e \u043d\u0435\u0442 \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430.\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0432 Span \u0432 \u0437\u0430\u043c\u0435\u0440\u0435 \u043d\u0435 \u043f\u0440\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c. \u041e\u043d\u0430 \u0432 \u043a\u043e\u0434\u0435 \u0435\u0441\u0442\u044c, \u043d\u043e \u0434\u0436\u0438\u0442 \u0435\u0451 \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u0442\u0438\u043f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0432 \u0442\u043e\u0447\u043a\u0435 \u0432\u044b\u0437\u043e\u0432\u0430.\u041a\u043e\u0434 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438LegacyProof \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\u0438Random: \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435Span: \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438Matrix4x4: \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u044fMatrix3x2: \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435ArrayTypeMismatchExceptionSystem.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\/1082672\/<\/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-494782","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/494782","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=494782"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/494782\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=494782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=494782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=494782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}