{"id":304959,"date":"2020-06-07T15:00:20","date_gmt":"2020-06-07T15:00:20","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=304959"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=304959","title":{"rendered":"\u041a\u0430\u043a \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0438\u0433\u0440\u0443 \u00ab\u0416\u0438\u0437\u043d\u044c\u00bb \u0432 \u0441\u0442\u043e \u0440\u0430\u0437"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/505606\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rc\/t8\/ne\/rct8nelcj0musme6d0tqcx1zoa8.gif\" alt=\"image\"><br \/>  \u0421\u043b\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0433\u043e \u0441 \u0438\u0433\u0440\u043e\u0439 &quot;<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%98%D0%B3%D1%80%D0%B0_%C2%AB%D0%96%D0%B8%D0%B7%D0%BD%D1%8C%C2%BB\" rel=\"nofollow\">\u0416\u0438\u0437\u043d\u044c<\/a>&quot;, \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d\u043d\u043e\u0439 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u043c \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u043e\u043c \u0414\u0436\u043e\u043d\u043e\u043c \u041a\u043e\u043d\u0432\u0435\u0435\u043c \u0435\u0449\u0435 \u0432 1970 \u0433\u043e\u0434\u0443, \u0438 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435 \u0442\u0435\u0440\u044f\u044e\u0449\u0435\u0439 \u0441\u0432\u043e\u0435\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u0438. \u041c\u043d\u043e\u0433\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u044d\u0442\u043e\u0439 \u0438\u0433\u0440\u044b, \u0438 \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0432\u0440\u044f\u0434 \u043b\u0438 \u043a\u043e\u0433\u043e-\u0442\u043e \u0443\u0434\u0438\u0432\u0438\u0442. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u0430 \u0438\u0433\u0440\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u0434\u0430\u0436\u0435 \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0449\u0430\u044f \u0430\u0441\u0438\u043c\u0442\u043e\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. \u041c\u044b \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 c# \u0438 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0443\u0441\u043a\u043e\u0440\u044f\u044f \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<br \/>  \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0443\u043b\u0443\u0447\u0448\u0438\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430 Javascript, \u0443\u0441\u043a\u043e\u0440\u0438\u0432 \u0435\u0433\u043e \u0432 10 \u0440\u0430\u0437 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043d\u0430\u0438\u0432\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439.<br \/>  \u0412 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0434\u0430\u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043a\u043e\u0434, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430 online-\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0433\u0440\u044b \u0441 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c \u043d\u0430 JavaScript, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u043c \u0434\u043e \u0434\u0432\u0443\u0445\u0441\u043e\u0442 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043d\u0430 \u043f\u043e\u043b\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 1920&#215;1080 (Full HD), \u0433\u0434\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 <s>\u0443\u0431\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f<\/s> \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c \u0432 \u044d\u0442\u0443 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u0433\u0440\u0443.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u0433\u0440\u044b<\/h3>\n<p>  \u0418\u0433\u0440\u0430 \u00ab\u0416\u0438\u0437\u043d\u044c\u00bb \u0438\u0434\u0435\u0442 \u043d\u0430 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u0438\u0437 \u043a\u043b\u0435\u0442\u043e\u043a, \u043a\u0430\u0436\u0434\u0430\u044f \u043a\u043b\u0435\u0442\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 8 \u0441\u043e\u0441\u0435\u0434\u0435\u0439. \u041a\u043b\u0435\u0442\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u00ab\u0436\u0438\u0432\u044b\u0435\u00bb \u0438\u043b\u0438 \u00ab\u043c\u0435\u0440\u0442\u0432\u044b\u0435\u00bb. \u0412 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 (\u0435\u0449\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u00ab\u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0435\u043c\u00bb) \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u043e\u043b\u044f \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0436\u0438\u0432\u044b\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439: \u0435\u0441\u043b\u0438 \u0440\u044f\u0434\u043e\u043c \u0441 \u0436\u0438\u0432\u043e\u0439 \u043a\u043b\u0435\u0442\u043a\u043e\u0439 \u0434\u0432\u0430 \u0438\u043b\u0438 \u0442\u0440\u0438 \u0436\u0438\u0432\u044b\u0445 \u0441\u043e\u0441\u0435\u0434\u0430, \u043a\u043b\u0435\u0442\u043a\u0430 \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u0442 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0438. \u0415\u0441\u043b\u0438 \u0440\u044f\u0434\u043e\u043c \u0441 \u043c\u0435\u0440\u0442\u0432\u043e\u0439 \u043a\u043b\u0435\u0442\u043a\u043e\u0439 \u0440\u043e\u0432\u043d\u043e \u0442\u0440\u0438 \u0436\u0438\u0432\u044b\u0445 \u0441\u043e\u0441\u0435\u0434\u0430, \u0442\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0438 \u043a\u043b\u0435\u0442\u043a\u0430 \u00ab\u0440\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f\u00bb. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/j_\/p-\/em\/j_p-emqkdds7cnlisshju9k2dos.png\" align=\"left\"> \u2014 \u043a\u043b\u0435\u0442\u043a\u0430 <b>A<\/b> \u0438\u043c\u0435\u0435\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0436\u0438\u0432\u043e\u0433\u043e \u0441\u043e\u0441\u0435\u0434\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0430 \u0443\u043c\u0438\u0440\u0430\u0435\u0442;<br \/>   \u2014 \u043a\u043b\u0435\u0442\u043a\u0430 <b>B<\/b> \u0438\u043c\u0435\u0435\u0442 \u0442\u0440\u0435\u0445 \u0436\u0438\u0432\u044b\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0430 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0436\u0438\u0442\u044c;<br \/>   \u2014 \u043a\u043b\u0435\u0442\u043a\u0430 <b>C<\/b> \u0438\u043c\u0435\u0435\u0442 \u0442\u0440\u0435\u0445 \u0436\u0438\u0432\u044b\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0430 \u0440\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f;<br \/>   \u2014 \u043a\u043b\u0435\u0442\u043a\u0430 <b>D<\/b> \u0438\u043c\u0435\u0435\u0442 \u043f\u044f\u0442\u044c \u0436\u0438\u0432\u044b\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0430 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0440\u0442\u0432\u043e\u0439.<\/p>\n<p>  \u041a\u043e\u0434 \u043d\u0430 c# \u0442\u0440\u0435\u0431\u0443\u0435\u0442 .NET Core 3.1. \u0417\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0433\u043e System.Runtime.Intrinsics.X86), \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c .NET Framework \u0438 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 .NET Core. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0432\u0435\u043b\u0430\u0441\u044c \u0432 Visual Studio Community Edition 2019.<\/p>\n<p>  \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 javascript \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u0445\u043e\u0442\u044f \u0438\u0433\u0440\u0443 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 Chrome, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 Microsoft Edge \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0440\u0430\u0439\u043d\u0435 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0432\u0435\u043b\u0430\u0441\u044c \u0432 Visual Studio Code.<\/p>\n<h3>\u041a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u043a\u043e\u0434 \u043d\u0430 c#<\/h3>\n<p>  \u0420\u0430\u0437\u043c\u0435\u0440 \u0438\u0433\u0440\u043e\u0432\u0433\u043e \u043f\u043e\u043b\u044f \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d \u043a\u0430\u043a 1920&#215;1080 (Full HD), \u043f\u0440\u0438\u0447\u0435\u043c \u043a\u0440\u0430\u0439\u043d\u0438\u0435 \u043a\u043b\u0435\u0442\u043a\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u0435\u0440\u0442\u0432\u044b\u0435. \u042d\u0442\u043e \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b, \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u044f \u043e\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043d\u0430 \u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f. \u0412\u0441\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044e\u0442\u0441\u044f \u043e\u0442 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"https:\/\/github.com\/lightln2\/LifeOhLife\/blob\/master\/csharp\/LifeOhLife\/LifeJourney.cs\" rel=\"nofollow\">LifeJourney<\/a>, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043d\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435:  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">LifeJourney.cs<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public abstract class LifeJourney  {     public const int WIDTH = 1920;     public const int HEIGHT = 1080;     public string Name =&gt; GetType().Name;     public abstract void Set(int i, int j, bool value);     public abstract bool Get(int i, int j);     public abstract void Step(); \/\/ makes one iteration. Performance-critical!     public void Clear()      {         for (int i = 1; i &lt; WIDTH - 1; i++)             for (int j = 1; j &lt; HEIGHT - 1; j++)                 Set(i, j, false);     }     public void GenerateRandomField(int seedForRandom, double threshold) { ... }     ... \/\/ other methods } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u042e\u043d\u0438\u0442-\u0442\u0435\u0441\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043d\u0430\u0431\u043e\u0440 \u0442\u0435\u0441\u0442\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430:  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">LifeTesting.cs<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class LifeTesting  {        public static void PerformAllTests(LifeJourney life)         {             TestGetSet(life);             TestSetSimpleFigure(life);             TestSimpleFigureAtStart(life);             TestSimpleFigureAtSecondPos(life);             TestSimpleFigure(life);             TestGenerate(life);             TestRandomField(life);         }         ...         private static void TestRandomField(LifeJourney life)          {             life.GenerateRandomField(12345, 0.5);             life.Step();             Assert.AreEqual(565797, life.GetLiveCellsCount());             Assert.AreEqual(-717568334, life.GetFingerprint());         }     }     [TestClass]     public class TestDifferentLives      {         [TestMethod]         public void Test_1_SimpleLife() =&gt;              LifeTesting.PerformAllTests(new SimpleLife());         ...     } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u043e\u043b\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0437\u0430\u043b\u0438\u0432\u043a\u043e\u0439 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c seed-\u043e\u043c (\u0442\u0430\u043a \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u043e\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435). \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0446\u0438\u043a\u043b \u0438\u0437 \u0442\u044b\u0441\u044f\u0447\u0438 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439, \u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0437\u0430\u043c\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u044f (\u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u043e\u043b\u044f (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0445 \u043a\u043b\u0435\u0442\u043e\u043a \u0438 \u0445\u0435\u0448-\u043a\u043e\u0434) \u0434\u043b\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430:  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">RunPerformanceTest<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public abstract class LifeJourney  {     public void GenerateRandomField(int seed, double threshold)     {         Random rand = new Random(seed);         for (int i = 1; i &lt; WIDTH - 1; i++)             for (int j = 1; j &lt; HEIGHT - 1; j++)             {                 Set(i, j, rand.NextDouble() &lt; threshold);             }     }      public void RunPerformanceTest(int steps)      {         GenerateRandomField(12345, 0.5);         Stopwatch timer = new Stopwatch();         timer.Start();         Run(steps);         double elapsedSeconds = timer.Elapsed.TotalSeconds;         Console.WriteLine($&quot;{Name} Performance: {(steps \/ elapsedSeconds):0.000} steps\/sec&quot;);     }     ... \/\/ other methods }  class Program {     static void Main(string[] args)     {         int steps = 1000;         new SimpleLife().RunPerformanceTest(steps);         ...     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<h3>1. \u041d\u0430\u0438\u0432\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u0430\u043c\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438: \u043f\u043e\u043b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c boolean, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0436\u0438\u0432\u044b\u0445 \u043a\u043b\u0435\u0442\u043a\u0430\u0445; \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0434\u0432\u0430 \u043f\u0440\u043e\u0445\u043e\u0434\u0430:<br \/>  1) \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043b\u0435\u0442\u043a\u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0435\u0435 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0431\u0443\u0434\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0435\u0435 \u043a\u043b\u0435\u0442\u043a\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 temp;<br \/>  2) \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 temp \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432.<br \/>  \u0414\u0432\u0430 \u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u043d\u0443\u0436\u043d\u044b \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043b\u0435\u0442\u043a\u0438 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0448\u0430\u0433\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0435\u0435 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0448\u0430\u0433\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043b\u0435\u0442\u043e\u043a, \u043f\u043e\u043a\u0430 \u043c\u044b \u043d\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043b\u0438 \u0432\u0435\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433.  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">SimpleLife<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class SimpleLife : LifeJourney {     bool[,] field = new bool[WIDTH, HEIGHT];     bool[,] temp = new bool[WIDTH, HEIGHT];      public override bool Get(int i, int j) =&gt; field[i, j];      public override void Set(int i, int j, bool value) =&gt; field[i, j] = value;      public override void Step()     {         for (int i = 1; i &lt; WIDTH - 1; i++)         {             for (int j = 1; j &lt; HEIGHT - 1; j++)             {  \/\/ \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u043e\u0445\u043e\u0434: \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0431\u0443\u0434\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0435\u0435                 bool isAlive = field[i, j];                 int numNeigbours = 0;                 if (field[i - 1, j - 1]) numNeigbours++;                 if (field[i - 1, j]) numNeigbours++;                 if (field[i - 1, j + 1]) numNeigbours++;                 if (field[i, j - 1]) numNeigbours++;                 if (field[i, j + 1]) numNeigbours++;                 if (field[i + 1, j - 1]) numNeigbours++;                 if (field[i + 1, j]) numNeigbours++;                 if (field[i + 1, j + 1]) numNeigbours++;                 bool keepAlive = isAlive &amp;&amp; (numNeigbours == 2 || numNeigbours == 3);                 bool makeNewLive = !isAlive &amp;&amp; numNeigbours == 3;                 temp[i, j] = keepAlive | makeNewLive;             }         }          for (int i = 1; i &lt; WIDTH - 1; i++)             for (int j = 1; j &lt; HEIGHT - 1; j++)                 \/\/ \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0445\u043e\u0434: \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0435                 field[i, j] = temp[i, j];             }         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b:  <\/p>\n<pre><code class=\"plaintext\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c: SimpleLife \u0412\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b: 40 \u0441\u0435\u043a\u0443\u043d\u0434 \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b: 25 \u0448\u0430\u0433\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 <\/code><\/pre>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434: <a href=\"https:\/\/github.com\/lightln2\/LifeOhLife\/blob\/master\/csharp\/LifeOhLife\/1_SimpleLife.cs\" rel=\"nofollow\">SimpleLife.cs<\/a><\/p>\n<h3>2. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0431\u0430\u0439\u0442\u044b<\/h3>\n<p>  \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043b\u0435\u0442\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f 8 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0438\u0445 \u0447\u0438\u0441\u043b\u043e:<br \/>   \u2014 \u0412\u043c\u0435\u0441\u0442\u043e \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 boolean \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0431\u0430\u0439\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0436\u0438\u0432\u0430\u044f \u043a\u043b\u0435\u0442\u043a\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c 1, \u0430 \u043c\u0435\u0440\u0442\u0432\u0430\u044f \u2014 0.<br \/>   \u2014 \u0412\u043c\u0435\u0441\u0442\u043e \u0432\u043e\u0441\u044c\u043c\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0431\u0443\u0434\u0435\u043c \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0430\u0439\u0442\u044b \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043a\u043b\u0435\u0442\u043a\u0438, \u0442\u043e\u0433\u0434\u0430 \u0438\u0445 \u0441\u0443\u043c\u043c\u0430 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u0430 \u0447\u0438\u0441\u043b\u0443 \u0436\u0438\u0432\u044b\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439.<br \/>   \u2014 \u0412\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0443\u043c\u043c\u0443 \u043a\u043b\u0435\u0442\u043e\u043a, \u043e\u0442\u043b\u043e\u0436\u0438\u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0445\u043e\u0434:  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">LifeBytes<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class LifeBytes : LifeJourney {     byte[] field = new byte[WIDTH * HEIGHT];     byte[] temp = new byte[WIDTH * HEIGHT];     public override bool Get(int i, int j) =&gt; field[j * WIDTH + i] == 1;     public override void Set(int i, int j, bool value) =&gt; field[j * WIDTH + i] = (byte)(value ? 1 : 0);      public override void Step()     {         for (int i = 1; i &lt; WIDTH - 1; i++)             for (int j = 1; j &lt; HEIGHT - 1; j++)             {  \/\/ \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0447\u0438\u0441\u043b\u043e \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043a\u043b\u0435\u0442\u043a\u0438 \u0438 \u043a\u043b\u0430\u0434\u0435\u043c \u0432 temp[pos]                 int pos = j * WIDTH + i;                 temp[pos] = (byte)(                     field[pos - WIDTH - 1] + field[pos - WIDTH] + field[pos - WIDTH + 1] +                     field[pos - 1] + field[pos + 1] +                     field[pos + WIDTH - 1] + field[pos + WIDTH] + field[pos + WIDTH + 1]);             }          for (int i = 1; i &lt; WIDTH; i++)             for (int j = 1; j &lt; HEIGHT; j++)             {  \/\/ \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435                 \/\/ \u043f\u043e \u0447\u0438\u0441\u043b\u0443 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0438 \u043f\u0440\u043e\u0448\u043b\u043e\u043c\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u043a\u043b\u0435\u0442\u043a\u0438                 int pos = j * WIDTH + i;                 bool keepAlive = field[pos] == 1 &amp;&amp; (temp[pos] == 2 || temp[pos] == 3);                 bool makeNewLife = field[pos] == 0 &amp;&amp; temp[pos] == 3;                 field[pos] = (byte)(makeNewLife | keepAlive ? 1 : 0);             }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:  <\/p>\n<pre><code class=\"plaintext\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c: LifeBytes \u0412\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b: 25 \u0441\u0435\u043a\u0443\u043d\u0434 \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b: 40 \u0448\u0430\u0433\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: 1.6 \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: 1.6 <\/code><\/pre>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434: <a href=\"https:\/\/github.com\/lightln2\/LifeOhLife\/blob\/master\/csharp\/LifeOhLife\/2_LifeBytes.cs\" rel=\"nofollow\">LifeBytes.cs<\/a><\/p>\n<h3>3. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u043e\u0441\u044c\u043c\u0438\u0431\u0430\u0439\u0442\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430<\/h3>\n<p>  \u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0440\u043e\u0445\u043e\u0434\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0431\u0430\u0439\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0432\u043e\u0441\u0435\u043c\u044c \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0447\u0442\u043e <br \/>  \u043d\u0430\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u043c\u044b\u0441\u043b\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0431\u0430\u0439\u0442\u0430 \u0441\u0440\u0430\u0437\u0443 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c 8 \u0431\u0430\u0439\u0442\u043e\u0432, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u0441 \u0431\u0430\u0439\u0442\u043e\u043c, \u043d\u0430 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430\u0445 \u0435\u0441\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u0441 \u0434\u0432\u0443\u0445-, \u0447\u0435\u0442\u044b\u0440\u0435\u0445- \u0438 \u0432\u043e\u0441\u044c\u043c\u0438\u0431\u0430\u0439\u0442\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u043e\u0441\u044c\u043c\u0438\u0431\u0430\u0439\u0438\u0442\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0434\u0430\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0447\u0442\u043e \u0438 \u0432\u043e\u0441\u0435\u043c\u044c \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0431\u0430\u0439\u0442 \u043f\u043e\u0434\u0440\u044f\u0434:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/w7\/c-\/m4\/w7c-m4ipkivlnopcynmegdrmbvw.png\" alt=\"image\"><br \/>  \u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u0435\u0440\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u043f\u0440\u0438 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445 \u0441 \u0431\u0430\u0439\u0442\u0430\u043c\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u0442\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u0434\u043b\u0438\u043d\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430\u043c \u043f\u043e\u0432\u0435\u0437\u043b\u043e, \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u0438 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0432 \u0431\u0430\u0439\u0442\u0435, \u0440\u0430\u0432\u043d\u043e \u0432\u043e\u0441\u044c\u043c\u0438, \u0438 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0443 \u043d\u0430\u0441 \u0441\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u043c\u043e\u0436\u0435\u0442.<br \/>  \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0434 \u0431\u0430\u0439\u0442\u0430\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u043d\u0430\u0434 \u0432\u043e\u0441\u044c\u043c\u0438\u0431\u0430\u0439\u0442\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u0432 c# <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/csharp\/language-reference\/operators\/pointer-related-operators\" rel=\"nofollow\">\u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439<\/a>:<br \/>   \u2014 \u043f\u043e\u043c\u0435\u0442\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u043a\u0430\u043a unsafe;<br \/>   \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043d\u0430 \u043e\u0431\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430;<br \/>   \u2014 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0431\u0430\u0439\u0442 \u0432 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 ulong  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0432\u043e\u0442 \u0442\u0430\u043a<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">fixed (byte* fieldPtr = field, tempPtr = temp) {     for (int i = WIDTH + 1; i &lt; WIDTH * HEIGHT - WIDTH - 1; i += 8)     {         ulong* ptr = (ulong*)(tempPtr + i);         *ptr += *(ulong*)(fieldPtr + i - WIDTH - 1);         *ptr += *(ulong*)(fieldPtr + i - WIDTH);         *ptr += *(ulong*)(fieldPtr + i - WIDTH + 1);         *ptr += *(ulong*)(fieldPtr + i - 1);         *ptr += *(ulong*)(fieldPtr + i + 1);         *ptr += *(ulong*)(fieldPtr + i + WIDTH - 1);         *ptr += *(ulong*)(fieldPtr + i + WIDTH);         *ptr += *(ulong*)(fieldPtr + i + WIDTH + 1);     }     ... } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041c\u0435\u0440\u044f\u0435\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0438\u2026  <\/p>\n<pre><code class=\"plaintext\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c: LongLife \u0412\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b: 10 \u0441\u0435\u043a\u0443\u043d\u0434 \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b: 100 \u0448\u0430\u0433\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: 2.5 \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: 4 <\/code><\/pre>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434: <a href=\"https:\/\/github.com\/lightln2\/LifeOhLife\/blob\/master\/csharp\/LifeOhLife\/3_LongLife.cs\" rel=\"nofollow\">LongLife.cs<\/a><\/p>\n<h3>4. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u0438\u0441\u043a \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435<\/h3>\n<p>  \u041c\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u043e\u0445\u043e\u0434, \u043e\u0434\u043d\u0430\u043a\u043e \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0445\u043e\u0434\u0435 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0431\u0430\u0439\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a, \u043e\u0442 \u0447\u0435\u0433\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u2014 lookup table, \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438 \u043a\u043b\u0430\u0434\u0435\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443. \u041d\u0430\u0448\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u2014 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043b\u0435\u0442\u043a\u0438 (\u043e\u0434\u0438\u043d \u0431\u0430\u0439\u0442 \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0435) \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0441\u0435\u0434\u0435\u0439 (\u043e\u0434\u0438\u043d \u0431\u0430\u0439\u0442 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0435). \u041c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u044d\u0442\u0438\u0445 \u0431\u0430\u0439\u0442, \u0447\u0442\u043e \u043d\u0430\u043c \u0434\u0430\u0441\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u0442\u0430\u0431\u043b\u0438\u0446\u044b 16 \u043a\u0438\u043b\u043e\u0431\u0430\u0439\u0442, \u043e\u0434\u043d\u0430\u043a\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0437\u0430\u043e\u0434\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0432 \u043a\u043e\u0434. \u0418\u0434\u0435\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u043e\u0442 0 \u0434\u043e 8 \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0446\u0435\u043b\u044b\u0439 \u0431\u0430\u0439\u0442, \u0430 \u0443\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u043b\u0430\u0434\u0448\u0438\u0435 \u0442\u0440\u0438 \u0431\u0438\u0442\u0430 (\u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0432 \u0447\u0435\u0442\u044b\u0440\u0435, \u043d\u043e 8 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0438 0 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0434\u0430\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044b\u0439 \u0431\u0438\u0442 \u0432 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043e\u0441\u0435\u0434\u0435\u0439). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043a\u043b\u0435\u0442\u043a\u0438 \u0432 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u043c \u0431\u0438\u0442\u0435 \u044d\u0442\u043e\u0433\u043e \u0436\u0435 \u0431\u0430\u0439\u0442\u0430, \u0438 \u043d\u0430\u0448\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0431\u0443\u0434\u0435\u0442 \u0434\u043b\u0438\u043d\u043e\u0439 16 \u0431\u0430\u0439\u0442, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0440\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0432\u043d\u044b \u0435\u0434\u0438\u043d\u0438\u0446\u0435. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0440\u0430\u0432\u043d\u044b\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u0435, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c, \u043a\u043e\u0434\u0438\u0440\u0443\u044e\u0449\u0438\u043c \u043c\u0435\u0440\u0442\u0432\u0443\u044e \u043a\u043b\u0435\u0442\u043a\u0443 \u0441 \u0442\u0440\u0435\u043c\u044f \u0441\u043e\u0441\u0435\u0434\u0430\u043c\u0438 \u0438\u043b\u0438 \u0436\u0438\u0432\u0443\u044e \u043a\u043b\u0435\u0442\u043a\u0443 \u0441 \u0434\u0432\u0443\u043c\u044f \u0438\u043b\u0438 \u0442\u0440\u0435\u043c\u044f \u0441\u043e\u0441\u0435\u0434\u044f\u043c\u0438:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/up\/-d\/bc\/up-dbcwszsgbtsm4ua4xcj8jbta.png\" alt=\"image\"><\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u0430\u043c \u043a\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public unsafe class LifeIsLookingUp : LifeJourney {     static byte[] alivePerNeighbours = new byte[256];     byte[] field = new byte[WIDTH * HEIGHT];     byte[] temp = new byte[WIDTH * HEIGHT];      public LifeIsLookingUp()     {         alivePerNeighbours[3] = 1;         alivePerNeighbours[8 + 2] = 1;         alivePerNeighbours[8 + 3] = 1;     }     ...     public override void Step()     {         fixed (byte* fieldPtr = field, tempPtr = temp)         {             ...              \/\/ \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0433\u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0443!             for (int i = WIDTH; i &lt; WIDTH * HEIGHT - WIDTH; i++)             {                 byte neighbours = (byte)((tempPtr[i] &amp; 7) | (fieldPtr[i] &lt;&lt; 3));                 fieldPtr[i] = alivePerNeighbours[neighbours];             }             ...     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043f\u043e\u0447\u0442\u0438 \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430:  <\/p>\n<pre><code class=\"plaintext\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c: LifeIsLookingUp \u0412\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b: 5.5 \u0441\u0435\u043a\u0443\u043d\u0434 \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b: 180 \u0448\u0430\u0433\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: 1.8 \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: 7.2 <\/code><\/pre>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434: <a href=\"https:\/\/github.com\/lightln2\/LifeOhLife\/blob\/master\/csharp\/LifeOhLife\/4_LifeIsLookingUp.cs\" rel=\"nofollow\">LifeIsLookingUp.cs<\/a><\/p>\n<h3>5. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0431\u0438\u0442\u043e\u0432\u0443\u044e \u043c\u0430\u0433\u0438\u044e<\/h3>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0437\u0430\u0431\u0443\u0434\u0435\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u0437\u0430\u043d\u043e\u0432\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0439 \u0448\u0430\u0433, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043d\u043e, \u043a\u0430\u043a \u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0448\u0430\u0433\u0435, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u043f\u043e \u0432\u043e\u0441\u0435\u043c\u044c \u043a\u043b\u0435\u0442\u043e\u043a \u0437\u0430 \u0440\u0430\u0437. \u041d\u0430\u043c \u043d\u0430\u0434\u043e, \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0431\u0438\u0442\u043e\u0432\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0442\u0435 \u0436\u0435 \u0441\u0430\u043c\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u0447\u0442\u043e \u0438 lookup table \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0448\u0430\u0433\u0430. \u0422\u0435, \u043a\u0442\u043e \u0438\u0437\u0443\u0447\u0430\u043b \u0431\u0443\u043b\u0435\u0432\u0443\u044e \u0430\u043b\u0433\u0435\u0431\u0440\u0443, \u0437\u043d\u0430\u044e\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0441\u0442\u0438 (\u0430 \u043d\u0430\u0448\u0430 lookup table \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0439 \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f) \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0431\u0443\u043b\u0435\u0432\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0445\u043e\u0442\u044f \u043e\u043d\u0430 \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9A%D0%B0%D1%80%D1%82%D0%B0_%D0%9A%D0%B0%D1%80%D0%BD%D0%BE\" rel=\"nofollow\">\u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u041a\u0430\u0440\u043d\u043e<\/a>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0431\u0443\u043b\u0435\u0432\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0438 \u043a \u043d\u0430\u0448\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435; \u043e\u0434\u043d\u0430\u043a\u043e, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u0432 \u043d\u0435\u0439 \u0432\u0441\u0435\u0433\u043e 16 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u043f\u0440\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c <s>\u0432\u0435\u0437\u0435\u043d\u0438\u0438<\/s> \u043e\u043f\u044b\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u043e\u043c. \u041e\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u0432\u044b\u043a\u043b\u0430\u0434\u043a\u0438 \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043c  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u043a\u043e\u0434<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">for (int i = WIDTH; i &lt; WIDTH * HEIGHT - WIDTH; i ++) {     byte neighbours = tempPtr[i];     byte alive = fieldPtr[i];     neighbours &amp;= (byte)0b00000111;     byte aliveAndNeighbours = ((neighbours &amp; ~(byte)0b00000001) &gt;&gt; 1) | (alive &lt;&lt; 2);     aliveAndNeighbours ^= (byte)~0b00000101;     aliveAndNeighbours &amp;= (aliveAndNeighbours &gt;&gt; 2);     aliveAndNeighbours &amp;= (aliveAndNeighbours &gt;&gt; 1);     aliveAndNeighbours &amp;= (byte)0b00000001;      ulong makeNewLife = neighbours | (alive &lt;&lt; 3);     makeNewLife ^= (byte)~0b00000011;     makeNewLife &amp;= (makeNewLife &gt;&gt; 2);     makeNewLife &amp;= (makeNewLife &gt;&gt; 1);     makeNewLife &amp;= (byte)0b00000001;           fieldPtr[i] = aliveAndNeighbours | makeNewLife; } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0430 \u0431\u0430\u0439\u0442. \u041e\u0434\u043d\u0430\u043a\u043e \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043e\u0442 \u043f\u043e\u0431\u0430\u0439\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 8 \u0431\u0430\u0439\u0442\u043e\u0432 \u0437\u0430 \u0440\u0430\u0437:  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f ulong \u0432\u043c\u0435\u0441\u0442\u043e \u0431\u0430\u0439\u0442<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">for (int i = WIDTH; i &lt; WIDTH * HEIGHT - WIDTH; i += 8) {     ulong neighbours = *(ulong*)(tempPtr + i);     ulong alive = *(ulong*)(fieldPtr + i);     neighbours &amp;= 0b00000111_00000111_00000111_00000111_00000111_00000111_00000111_00000111ul;      ulong aliveAndNeighbours = ((neighbours &amp; ~0b00000001_00000001_00000001_00000001_00000001_00000001_00000001_00000001ul) &gt;&gt; 1) | (alive &lt;&lt; 2);     aliveAndNeighbours ^= ~0b00000101_00000101_00000101_00000101_00000101_00000101_00000101_00000101ul;     aliveAndNeighbours &amp;= (aliveAndNeighbours &gt;&gt; 2);     aliveAndNeighbours &amp;= (aliveAndNeighbours &gt;&gt; 1);     aliveAndNeighbours &amp;= 0b00000001_00000001_00000001_00000001_00000001_00000001_00000001_00000001ul;      ulong makeNewLife = neighbours | (alive &lt;&lt; 3);     makeNewLife ^= ~0b00000011_00000011_00000011_00000011_00000011_00000011_00000011_00000011ul;     makeNewLife &amp;= (makeNewLife &gt;&gt; 2);     makeNewLife &amp;= (makeNewLife &gt;&gt; 1);     makeNewLife &amp;= 0b00000001_00000001_00000001_00000001_00000001_00000001_00000001_00000001ul;      *(ulong*)(fieldPtr + i) = aliveAndNeighbours | makeNewLife; } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041a\u043e\u0434 \u0441\u0442\u0430\u043b \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c, \u043e\u0434\u043d\u0430\u043a\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438:  <\/p>\n<pre><code class=\"plaintext\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c: LifeInBits \u0412\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b: 3.3 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b: 300 \u0448\u0430\u0433\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: 1.7 \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: 12 <\/code><\/pre>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434: <a href=\"https:\/\/github.com\/lightln2\/LifeOhLife\/blob\/master\/csharp\/LifeOhLife\/5_LifeInBits.cs\" rel=\"nofollow\">LifeInBits.cs<\/a><\/p>\n<h3>6. \u0425\u0440\u0430\u043d\u0438\u043c \u043f\u043e \u0434\u0432\u0435 \u043a\u043b\u0435\u0442\u043a\u0438 \u043d\u0430 \u0431\u0430\u0439\u0442<\/h3>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0432\u044b\u0442\u0435\u043a\u0430\u0435\u0442 \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445: \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u043a\u043b\u0435\u0442\u043a\u0435 \u043d\u0430 \u0431\u0430\u0439\u0442, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044f \u043f\u043e \u0432\u043e\u0441\u0435\u043c\u044c \u0431\u0430\u0439\u0442\u043e\u0432 \u0437\u0430 \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043d\u043e \u0432\u043e \u0432\u0441\u0435\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u0445 \u043c\u044b \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f \u043c\u043b\u0430\u0434\u0448\u0438\u043c\u0438 \u0431\u0438\u0442\u0430\u043c\u0438 \u0432 \u0431\u0430\u0439\u0442\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0442\u0430\u0440\u0448\u0438\u0435 \u0447\u0435\u0442\u044b\u0440\u0435 \u0431\u0438\u0442\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b\u0438 \u043d\u0443\u043b\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u043e \u0434\u0432\u0435 \u043a\u043b\u0435\u0442\u043a\u0438 \u043d\u0430 \u043e\u0434\u0438\u043d \u0431\u0430\u0439\u0442: \u043e\u0434\u043d\u0443 \u0432 \u043c\u043b\u0430\u0434\u0448\u0438\u0445 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0431\u0438\u0442\u0430\u0445, \u0434\u0440\u0443\u0433\u0443\u044e \u2014 \u0432 \u0441\u0442\u0430\u0440\u0448\u0438\u0445. \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0439 \u0447\u0438\u0441\u043b\u043e \u0441\u043e\u0441\u0435\u0434\u0435\u0439, \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u0432 \u043c\u043b\u0430\u0434\u0448\u0438\u0445 \u0438 \u0432 \u0441\u0442\u0430\u0440\u0448\u0438\u0445 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0431\u0438\u0442\u0430\u0445. \u0412\u044b\u0433\u043e\u0434\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e \u0432\u043e\u0441\u0435\u043c\u044c \u0431\u0430\u0439\u0442 \u0437\u0430 \u0440\u0430\u0437, \u043d\u043e \u0432 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0432 \u043d\u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0432\u043e\u0441\u0435\u043c\u044c, \u0430 \u0443\u0436\u0435 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u044c \u043a\u043b\u0435\u0442\u043e\u043a! \u041f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0434\u0432\u0443\u043a\u0440\u0430\u0442\u043d\u043e\u043c\u0443 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044e, \u0442\u0430\u043a \u043a\u0430\u043a, \u043a\u0440\u043e\u043c\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u043c \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043b\u0443\u0447\u0448\u0435 \u0443\u0442\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0435\u0448 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430.<br \/>  \u0412 \u0441\u0430\u043c\u043e\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u043f\u0440\u0438 \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0433\u043e\u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0438\u0442\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0440\u043e\u0433\u043e\u043d\u0435 \u0438\u0437-\u0437\u0430 \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u043f\u043e \u0434\u0432\u0435 \u043a\u043b\u0435\u0442\u043a\u0438 \u0432 \u0431\u0430\u0439\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0434\u0432\u0438\u0433\u0438 \u043d\u0430 4 \u0438 60 \u0431\u0430\u0439\u0442\u043e\u0432 \u0432\u043b\u0435\u0432\u043e \u0438 \u0432\u043f\u0440\u0430\u0432\u043e, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u043e\u0434 \u0431\u043e\u043b\u0435\u0435 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u043c:  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0414\u0432\u0435 \u043a\u043b\u0435\u0442\u043a\u0438 \u0432 \u0431\u0430\u0439\u0442\u0435<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public override void Step() {       fixed (byte* fieldPtr = field, tempPtr = temp)     {  \/\/ \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432         for (int i = 0; i &lt; temp.Length; i += 8)  *(ulong*)(tempPtr + i) = 0;         \/\/ \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0434\u0432\u0438\u0433\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0434\u0432\u0438\u0433\u0438         for (int i = WIDTH; i &lt; WIDTH * HEIGHT \/ 2; i += 8)         {             ulong* ptr = (ulong*)(tempPtr + i);              ulong src1 = *(ulong*)(fieldPtr + i - WIDTH \/ 2);             ulong src2 = *(ulong*)(fieldPtr + i);             ulong src3 = *(ulong*)(fieldPtr + i + WIDTH \/ 2);              ulong src4 = *(ulong*)(fieldPtr + i - WIDTH \/ 2 - 8);             ulong src5 = *(ulong*)(fieldPtr + i - 8);             ulong src6 = *(ulong*)(fieldPtr + i + WIDTH \/ 2 - 8);              ulong src7 = *(ulong*)(fieldPtr + i - WIDTH \/ 2 + 8);             ulong src8 = *(ulong*)(fieldPtr + i + 8);             ulong src9 = *(ulong*)(fieldPtr + i + WIDTH \/ 2 + 8);              *ptr += (src1 &lt;&lt; 4) + src1 + (src1 &gt;&gt; 4);             *ptr += (src2 &lt;&lt; 4) + (src2 &gt;&gt; 4);             *ptr += (src3 &lt;&lt; 4) + src3 + (src3 &gt;&gt; 4);              *ptr += (src4 &gt;&gt; 60) + (src5 &gt;&gt; 60) + (src6 &gt;&gt; 60);             *ptr += (src7 &lt;&lt; 60) + (src8 &lt;&lt; 60) + (src9 &lt;&lt; 60);         }         \/\/ \u0437\u0434\u0435\u0441\u044c \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b         for (int i = WIDTH; i &lt; WIDTH * HEIGHT \/ 2; i += 8)         {             ulong neighbours = *(ulong*)(tempPtr + i);             ulong alive = *(ulong*)(fieldPtr + i);             neighbours &amp;= 0b0111_0111_0111_0111_0111_0111_0111_0111_0111_0111_0111_0111_0111_0111_0111_0111ul;              ulong keepAlive = ((neighbours &amp; ~0b0001_0001_0001_0001_0001_0001_0001_0001_0001_0001_0001_0001_0001_0001_0001_0001ul) &gt;&gt; 1) | (alive &lt;&lt; 2);             keepAlive ^= ~0b0101_0101_0101_0101_0101_0101_0101_0101_0101_0101_0101_0101_0101_0101_0101_0101ul;             keepAlive &amp;= (keepAlive &gt;&gt; 2);             keepAlive &amp;= (keepAlive &gt;&gt; 1);             keepAlive &amp;= 0b0001_0001_0001_0001_0001_0001_0001_0001_0001_0001_0001_0001_0001_0001_0001_0001ul;              ulong makeNewLife = neighbours | (alive &lt;&lt; 3);             makeNewLife ^= ~0b0011_0011_0011_0011_0011_0011_0011_0011_0011_0011_0011_0011_0011_0011_0011_0011ul;             makeNewLife &amp;= (makeNewLife &gt;&gt; 2);             makeNewLife &amp;= (makeNewLife &gt;&gt; 1);             makeNewLife &amp;= 0b0001_0001_0001_0001_0001_0001_0001_0001_0001_0001_0001_0001_0001_0001_0001_0001ul;              *(ulong*)(fieldPtr + i) = keepAlive | makeNewLife;         }      }     \/\/ \u0412 \u043a\u043e\u043d\u0446\u0435 &quot;\u0443\u0431\u0438\u0432\u0430\u0435\u043c&quot; \u043a\u043b\u0435\u0442\u043a\u0438 \u043d\u0430 \u043b\u0435\u0432\u043e\u0439 \u0438 \u043f\u0440\u0430\u0432\u043e\u0439 \u0433\u0440\u0430\u043d\u0438\u0446\u0435, \u0442\u0430\u043a \u043a\u0430\u043a     \/\/ \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u043c\u043e\u0433\u043b\u0438 \u0438\u0445 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c     for (int j = 0; j &lt; HEIGHT; j++)     {         Set(0, j, false);         Set(WIDTH - 1, j, false);     }  } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0410 \u0432\u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 get \u0438 set \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442\u0441\u044f. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u044d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u0441\u044f \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0432\u043e\u0434\u0443. \u0422\u0430\u043a\u0436\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u0440\u044e\u043a: \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u043f\u0443\u0441\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0438 \u0432 \u043a\u043e\u043d\u0435\u0446 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u0430.  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">get \u0438 set<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public unsafe class LifeIsABitMagic : LifeJourney {     byte[] field = new byte[WIDTH + WIDTH * HEIGHT \/ 2];     byte[] temp = new byte[WIDTH + WIDTH * HEIGHT \/ 2];      public override bool Get(int i, int j)     {         int pos = WIDTH \/ 2 + j * (WIDTH \/ 2) + (i \/ 2);         if (i % 2 == 1) return (field[pos] &amp; 0x10) == 0x10;         else return (field[pos] &amp; 1) == 1;     }      public override void Set(int i, int j, bool val)     {         int pos = WIDTH \/ 2 + j * (WIDTH \/ 2) + (i \/ 2);         if (i % 2 == 1)         {             if (val) field[pos] |= 0x10;             else field[pos] &amp;= (0xFF &amp; ~0x10);         }         else         {             if (val) field[pos] |= 0x1;             else field[pos] &amp;= (0xFF &amp; ~0x1);         }     }     ... } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0412\u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:  <\/p>\n<pre><code class=\"plaintext\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c: LifeIsABitMagic \u0412\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b: 1.3 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b: 770 \u0448\u0430\u0433\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: 2.6 \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: 31 <\/code><\/pre>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434: <a href=\"https:\/\/github.com\/lightln2\/LifeOhLife\/blob\/master\/csharp\/LifeOhLife\/6_LifeIsABitMagic.cs\" rel=\"nofollow\">LifeIsABitMagic.cs<\/a><\/p>\n<h3>7. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c SIMD-\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430<\/h3>\n<p>  \u041a\u0430\u0436\u0434\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043c \u0432\u0441\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0442\u0440\u0443\u0434\u043e\u043c, \u0442\u0430\u043a \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043c\u044b \u043f\u043e\u0439\u0434\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0435\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441\u0430\u043c\u044b\u0439 \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438: <a href=\"https:\/\/ru.wikipedia.org\/wiki\/SIMD\" rel=\"nofollow\">SIMD-\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438<\/a>, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435, \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Advanced_Vector_Extensions#Advanced_Vector_Extensions_2\" rel=\"nofollow\">AVX2<\/a>, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 Intel \u0438 AMD, \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0434 32 \u0431\u0430\u0439\u0442\u0430\u043c\u0438 \u0437\u0430 \u0440\u0430\u0437! \u042d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c, \u043e\u0434\u043d\u0430\u043a\u043e \u043d\u0430\u0448 \u0441\u043b\u0443\u0447\u0430\u0439 (\u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0431\u0430\u0439\u0442\u0430\u043c\u0438 \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u0439) \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u043d\u0430 \u0438\u0434\u0435\u043e\u043b\u043e\u0433\u0438\u044e SIMD, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0436\u0438\u0434\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0415\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u044f\u0437\u044b\u043a\u0430\u0445 \u043d\u0438\u0437\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f. \u041d\u0430\u0441 \u0431\u044b \u044d\u0442\u043e \u043d\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u043e: \u0440\u0430\u0434\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u044b \u0431\u044b \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043d\u0430 C++ \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0438\u0437 C# \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/standard\/native-interop\/pinvoke\" rel=\"nofollow\">P\/Invoke<\/a>. \u041e\u0434\u043d\u0430\u043a\u043e \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0433\u043e\u0434 \u043d\u0430\u0437\u0430\u0434 \u0432 .NET Core \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u043e\u0431 \u044d\u0442\u043e\u043c \u0431\u044b\u043b\u0430 \u0434\u0430\u0436\u0435 <a href=\"https:\/\/habr.com\/ru\/post\/435840\/\">\u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/a>. \u0422\u0430\u043a \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u00ab\u0442\u044f\u0436\u0435\u043b\u0443\u044e \u0430\u0440\u0442\u0438\u043b\u043b\u0435\u0440\u0438\u044e\u00bb \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 C#! \u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043f\u0440\u0435\u0434\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 LifeInBits, \u0445\u0440\u0430\u043d\u044f\u0449\u0443\u044e \u043e\u0434\u043d\u0443 \u043a\u043b\u0435\u0442\u043a\u0443 \u043d\u0430 \u0431\u0430\u0439\u0442 (\u043f\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c, \u0432\u044b\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438), \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u0440\u0443\u0447\u043d\u0443\u044e \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u044e \u0431\u0430\u0439\u0442\u0430\u043c\u0438, \u0431\u0438\u0442\u0430\u043c\u0438 \u0438 \u0432\u043e\u0441\u044c\u043c\u0438\u0431\u0430\u0439\u0442\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 AVX2-\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043a\u0430\u043a \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u043a\u043e\u0434 \u0434\u0430\u0436\u0435 \u0441\u0442\u0430\u043b \u043f\u0440\u043e\u0449\u0435 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0439!  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u043a\u043e\u0434<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public AdvancedLifeExtensions() {  \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043d\u0430 Pentium III     if (!Avx2.IsSupported) throw new NotImplementedException(&quot;Not in this life!!!&quot;); }  public override void Step() {     fixed (byte* fieldPtr = field, tempPtr = temp)     {         Vector256&lt;byte&gt; zero = Vector256&lt;byte&gt;.Zero; \/\/ \u0442\u0443\u0442 32 \u043d\u0443\u043b\u044f         for (int i = 0; i &lt; WIDTH * HEIGHT; i += 32)         {             Avx.Store(tempPtr + i, zero);         }          for (int i = WIDTH; i &lt; WIDTH * HEIGHT - WIDTH; i += 32)         {             Vector256&lt;byte&gt; src1 = Avx.LoadVector256(fieldPtr + i - WIDTH - 1);             Vector256&lt;byte&gt; src2 = Avx.LoadVector256(fieldPtr + i - WIDTH);             Vector256&lt;byte&gt; sum1 = Avx2.Add(src1, src2);             Vector256&lt;byte&gt; src3 = Avx.LoadVector256(fieldPtr + i - WIDTH + 1);             Vector256&lt;byte&gt; src4 = Avx.LoadVector256(fieldPtr + i - 1);             Vector256&lt;byte&gt; sum2 = Avx2.Add(src3, src4);             Vector256&lt;byte&gt; src5 = Avx.LoadVector256(fieldPtr + i + 1);             Vector256&lt;byte&gt; src6 = Avx.LoadVector256(fieldPtr + i + WIDTH - 1);             Vector256&lt;byte&gt; sum3 = Avx2.Add(src5, src6);             Vector256&lt;byte&gt; src7 = Avx.LoadVector256(fieldPtr + i + WIDTH);             Vector256&lt;byte&gt; src8 = Avx.LoadVector256(fieldPtr + i + WIDTH + 1);             Vector256&lt;byte&gt; sum4 = Avx2.Add(src7, src8);              Vector256&lt;byte&gt; sum5 = Avx2.Add(sum1, sum2);             Vector256&lt;byte&gt; sum6 = Avx2.Add(sum3, sum4);             Vector256&lt;byte&gt; sum = Avx2.Add(sum5, sum6);              Avx.Store(tempPtr + i, sum);         }          for (int i = WIDTH; i &lt; WIDTH * HEIGHT - WIDTH; i += 32)         {             Vector256&lt;byte&gt; neighbours = Avx.LoadVector256(tempPtr + i);             Vector256&lt;byte&gt; alive = Avx.LoadVector256(fieldPtr + i);              \/\/ \u0432 v_1 \u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044c \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430 \u0435\u0434\u0438\u043d\u0438\u0447\u0435\u043a             Vector256&lt;byte&gt; isAlive = Avx2.CompareEqual(alive, v_1);             \/\/ \u0432 v_2 \u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044c \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430 \u0434\u0432\u043e\u0435\u043a             Vector256&lt;byte&gt; isTwoNeighbours = Avx2.CompareEqual(neighbours, v_2);             \/\/ \u0432 v_3 \u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044c \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430 \u0442\u0440\u043e\u0435\u043a             Vector256&lt;byte&gt; isThreeNeighbours = Avx2.CompareEqual(neighbours, v_3);              Vector256&lt;byte&gt; isTwoOrThreeNeighbours = Avx2.Or(isTwoNeighbours, isThreeNeighbours);             Vector256&lt;byte&gt; aliveAndNeighbours = Avx2.And(isAlive, isTwoOrThreeNeighbours);              Vector256&lt;byte&gt; shouldBeAlive = Avx2.Or(aliveAndNeighbours, isThreeNeighbours);             shouldBeAlive = Avx2.And(shouldBeAlive, v_1);              Avx2.Store(fieldPtr + i, shouldBeAlive);         }      }      for (int j = 1; j &lt; HEIGHT - 1; j++)     {         field[j * WIDTH] = 0;         field[j * WIDTH + WIDTH - 1] = 0;     }  } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u0441\u0430\u043c\u0443\u044e \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e (\u0432 \u0441\u0442\u043e \u0440\u0430\u0437 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u043f\u0440\u0430\u0432\u0434\u0430)!  <\/p>\n<pre><code class=\"plaintext\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c: AdvancedLifeExtensions \u0412\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b: 0.4 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b: 2500 \u0448\u0430\u0433\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: 3.2 \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: 100 <\/code><\/pre>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434: <a href=\"https:\/\/github.com\/lightln2\/LifeOhLife\/blob\/master\/csharp\/LifeOhLife\/7_AdvancedLifeExtensions.cs\" rel=\"nofollow\">AdvancedLifeExtensions.cs<\/a><\/p>\n<h3>\u042d\u0442\u043e \u0432\u0441\u0435?<\/h3>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u043a\u0430\u0440\u0442\u0438\u043d\u044b \u043d\u0430\u0434\u043e \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u0435\u0449\u0435 \u0434\u0432\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u043d\u0435 \u043a\u043e\u0441\u043d\u0443\u043b\u0438\u0441\u044c:<br \/>  1) \u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0443 \u2014 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0445\u043e\u0440\u043e\u0448\u043e \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u043d\u0430 \u043b\u043e\u0433\u0438\u043a\u0443 SIMD, \u043c\u043e\u0436\u043d\u043e \u043e\u0436\u0438\u0434\u0430\u0442\u044c \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0435\u0449\u0435 \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a. \u0418\u043c\u0435\u043d\u043d\u043e <a href=\"https:\/\/www.conwaylife.com\/wiki\/Apgsearch\" rel=\"nofollow\">\u043d\u0430 \u043d\u0435\u043c <\/a>\u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0438\u0433\u0440\u044b \u00ab\u0416\u0438\u0437\u043d\u044c\u00bb (\u0434\u0430, \u0435\u0441\u0442\u044c \u0438 \u0442\u0430\u043a\u0438\u0435!) \u0438\u0449\u0443\u0442 \u043d\u043e\u0432\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043a\u043e\u0434 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0435 \u043f\u043e\u043a\u0430 \u0435\u0449\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 .NET.<br \/>  2) \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0435\u0445 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u043b\u0438\u043d\u0435\u0439\u043d\u0430 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043f\u043b\u043e\u0449\u0430\u0434\u0438 \u043f\u043e\u043b\u044f. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Hashlife\" rel=\"nofollow\">Hashlife<\/a>, \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445 \u0438\u043c\u0435\u044e\u0449\u0438\u0439 <b>\u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0447\u0435\u0441\u043a\u0443\u044e<\/b> \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043f\u043b\u043e\u0449\u0430\u0434\u0438! \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0438 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043d\u0430 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u0438 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u044b \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043b\u043e\u0445\u0438\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0431\u0443\u0434\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435.<\/p>\n<h3>\u042f\u0432\u0430\u0441\u043a\u0440\u0438\u043f\u0442<\/h3>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u043c\u044b \u0434\u043e\u0448\u043b\u0438 \u0434\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e: \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u044d\u0442\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432 \u044f\u0432\u0430\u0441\u043a\u0440\u0438\u043f\u0442?<br \/>  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, SIMD-\u0432\u0435\u0440\u0441\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 AVX2 \u0442\u0443\u0434\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u0432\u0435\u0437\u043b\u0438. \u041e\u0434\u043d\u0430\u043a\u043e, \u043a\u0430\u043a \u043d\u0438 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u0440\u0435\u0434\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0441 \u0431\u0438\u0442\u043e\u0432\u043e\u0439 \u043c\u0430\u0433\u0438\u0435\u0439 \u0438 \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u043e\u0439 \u043f\u043e \u0434\u0432\u0435 \u043a\u043b\u0435\u0442\u043a\u0438 \u0432 \u043e\u0434\u0438\u043d \u0431\u0430\u0439\u0442 \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043f\u0440\u0430\u0432\u0434\u0430 \u043d\u0435 \u0432\u043e\u0441\u044c\u043c\u0438\u0431\u0430\u0439\u0442\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0442\u044b\u0440\u0435\u0445\u0431\u0430\u0439\u0442\u043d\u044b\u0439.<br \/>  \u0422\u0440\u044e\u043a \u0437\u0434\u0435\u0441\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u044f\u0432\u0430\u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c \u0431\u0430\u0439\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0438 \u043a\u0430\u043a \u0441 \u0431\u0430\u0439\u0442\u0430\u043c\u0438, \u0438 \u043a\u0430\u043a \u0441 \u0447\u0438\u0441\u043b\u0430\u043c\u0438: <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Uint8Array\" rel=\"nofollow\">UInt8Array<\/a> \u0438 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Uint32Array\" rel=\"nofollow\">UInt32Array<\/a>. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043a\u043e\u0434 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0441\u043b\u043e\u0432\u043d\u043e (\u0441 \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0431\u0430\u0439\u0442 \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u043e\u0441\u044c\u043c\u0438) \u0438 \u043d\u0430\u0434\u0435\u044f\u0442\u044c\u0441\u044f, \u0447\u0442\u043e JIT-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u044f\u0432\u0430\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430 \u0441\u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u0431\u0438\u0442\u043e\u0432\u0443\u044e \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0443 \u0431\u0435\u0437 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0432 \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439.  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043e\u0434 \u043d\u0430 Javascript<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">class LifeField {     constructor() {         this.field = new ArrayBuffer(LifeField.WIDTH + LifeField.WIDTH * LifeField.HEIGHT \/ 2);         this.temp = new ArrayBuffer(LifeField.WIDTH + LifeField.WIDTH * LifeField.HEIGHT \/ 2);         this.fieldBytes = new Uint8Array(this.field);         this.tempBytes = new Uint8Array(this.temp);         this.fieldInts = new Uint32Array(this.field);         this.tempInts = new Uint32Array(this.temp);     }      get(x, y) {          const pos = LifeField.WIDTH \/ 2 + y * (LifeField.WIDTH \/ 2) + (x &gt;&gt; 1);         if ((x &amp; 1) == 1) return (this.fieldBytes[pos] &amp; 0x10) == 0x10;         else return (this.fieldBytes[pos] &amp; 1) == 1;     }      set(x, y, val) { ... } \/\/\u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e          step() {         for(var i = 0; i &lt; this.tempInts.length; i++) this.tempInts[i] = 0;          for (var j = LifeField.WIDTH; j &lt; LifeField.WIDTH * LifeField.HEIGHT \/ 2; j += 4)         {             const i = j \/ 4;              const src1 = this.fieldInts[i - LifeField.WIDTH \/ 8];             const src2 = this.fieldInts[i];             const src3 = this.fieldInts[i + LifeField.WIDTH \/ 8];              const src4 = this.fieldInts[i - LifeField.WIDTH \/ 8 - 1];             const src5 = this.fieldInts[i - 1];             const src6 = this.fieldInts[i + LifeField.WIDTH \/ 8 - 1];              const src7 = this.fieldInts[i - LifeField.WIDTH \/ 8 + 1];             const src8 = this.fieldInts[i + 1];             const src9 = this.fieldInts[i + LifeField.WIDTH \/ 8 + 1];              this.tempInts[i] += (src1 &lt;&lt; 4) + src1 + (src1 &gt;&gt; 4);             this.tempInts[i] += (src2 &lt;&lt; 4) + (src2 &gt;&gt; 4);             this.tempInts[i] += (src3 &lt;&lt; 4) + src3 + (src3 &gt;&gt; 4);              this.tempInts[i] += (src4 &gt;&gt; 28) + (src5 &gt;&gt; 28) + (src6 &gt;&gt; 28);             this.tempInts[i] += (src7 &lt;&lt; 28) + (src8 &lt;&lt; 28) + (src9 &lt;&lt; 28);         }          for (var j = LifeField.WIDTH; j &lt; LifeField.WIDTH * LifeField.HEIGHT \/ 2; j += 4) {             const i = j \/ 4;             const neighbours = this.tempInts[i] &amp; 0x77777777;             const alive = this.fieldInts[i];              var keepAlive = ((neighbours &amp; ~0x11111111) &gt;&gt; 1) | (alive &lt;&lt; 2);             keepAlive ^= ~0x55555555;             keepAlive &amp;= (keepAlive &gt;&gt; 2);             keepAlive &amp;= (keepAlive &gt;&gt; 1);             keepAlive &amp;= 0x11111111;              var makeNewLife = neighbours | (alive &lt;&lt; 3);             makeNewLife ^= ~0x33333333;             makeNewLife &amp;= (makeNewLife &gt;&gt; 2);             makeNewLife &amp;= (makeNewLife &gt;&gt; 1);             makeNewLife &amp;= 0x11111111;              this.fieldInts[i] = keepAlive | makeNewLife;         }          for(var y = 1; y &lt; LifeField.WIDTH - 1; y++) {             this.set(0, y, false);             this.set(LifeField.WIDTH - 1, y, false);         }     }     ... } LifeField.WIDTH = 1920; LifeField.HEIGHT = 1080; <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0412\u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:  <\/p>\n<pre><code class=\"plaintext\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c: LifeIsABitMagic (javascript 32 bit), \u0432\u043d\u0435 \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u0430 \u0412\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b: 5 \u0441\u0435\u043a\u0443\u043d\u0434 \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b: 200 \u0448\u0430\u0433\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: - \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: 8 <\/code><\/pre>\n<p>  \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u0444\u0430\u0439\u043b\u0435 <a href=\"https:\/\/github.com\/lightln2\/LifeOhLife\/blob\/master\/html\/lifefield.js\" rel=\"nofollow\">lifefield.js<\/a><\/p>\n<p>  \u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0434\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c\u0438:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/is\/a5\/mn\/isa5mnxkihtws6kk947lh2icv4q.png\" alt=\"image\"><\/p>\n<h3> \u041e\u043d\u043b\u0430\u0439\u043d-\u0438\u0433\u0440\u0430 <\/h3>\n<p>  \u041d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435: \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043e\u043d\u043b\u0430\u0439\u043d-\u0438\u0433\u0440\u0430, \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0430\u044f \u043d\u0430 \u043f\u043e\u043b\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 1920&#215;1080 (Full HD) \u043f\u0440\u0438 \u043b\u044e\u0431\u043e\u0439 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:<\/p>\n<p>  <a href=\"https:\/\/lightln2.github.io\/LifeOhLife\/\" rel=\"nofollow\">\u0438\u0433\u0440\u0430\u0442\u044c \u0432 \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u044e \u0438\u0433\u0440\u044b \u00ab\u0416\u0438\u0437\u043d\u044c\u00bb <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ft\/il\/-r\/ftil-rsosyywivbc-fk4h-t2s7k.gif\" alt=\"image\" align=\"left\"><\/a><\/p>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0434\u044b <a href=\"https:\/\/github.com\/lightln2\/LifeOhLife\" rel=\"nofollow\">\u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431\u0435<\/a>.<\/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\/post\/505606\/\"> https:\/\/habr.com\/ru\/post\/505606\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/505606\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rc\/t8\/ne\/rct8nelcj0musme6d0tqcx1zoa8.gif\" alt=\"image\"><br \/>  \u0421\u043b\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0433\u043e \u0441 \u0438\u0433\u0440\u043e\u0439 &quot;<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%98%D0%B3%D1%80%D0%B0_%C2%AB%D0%96%D0%B8%D0%B7%D0%BD%D1%8C%C2%BB\" rel=\"nofollow\">\u0416\u0438\u0437\u043d\u044c<\/a>&quot;, \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d\u043d\u043e\u0439 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u043c \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u043e\u043c \u0414\u0436\u043e\u043d\u043e\u043c \u041a\u043e\u043d\u0432\u0435\u0435\u043c \u0435\u0449\u0435 \u0432 1970 \u0433\u043e\u0434\u0443, \u0438 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435 \u0442\u0435\u0440\u044f\u044e\u0449\u0435\u0439 \u0441\u0432\u043e\u0435\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u0438. \u041c\u043d\u043e\u0433\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u044d\u0442\u043e\u0439 \u0438\u0433\u0440\u044b, \u0438 \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0432\u0440\u044f\u0434 \u043b\u0438 \u043a\u043e\u0433\u043e-\u0442\u043e \u0443\u0434\u0438\u0432\u0438\u0442. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u0430 \u0438\u0433\u0440\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u0434\u0430\u0436\u0435 \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0449\u0430\u044f \u0430\u0441\u0438\u043c\u0442\u043e\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. \u041c\u044b \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 c# \u0438 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0443\u0441\u043a\u043e\u0440\u044f\u044f \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<br \/>  \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0443\u043b\u0443\u0447\u0448\u0438\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430 Javascript, \u0443\u0441\u043a\u043e\u0440\u0438\u0432 \u0435\u0433\u043e \u0432 10 \u0440\u0430\u0437 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043d\u0430\u0438\u0432\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439.<br \/>  \u0412 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0434\u0430\u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043a\u043e\u0434, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430 online-\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0433\u0440\u044b \u0441 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c \u043d\u0430 JavaScript, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u043c \u0434\u043e \u0434\u0432\u0443\u0445\u0441\u043e\u0442 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043d\u0430 \u043f\u043e\u043b\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 1920&#215;1080 (Full HD), \u0433\u0434\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 <s>\u0443\u0431\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f<\/s> \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c \u0432 \u044d\u0442\u0443 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u0433\u0440\u0443.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-304959","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304959","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=304959"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304959\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304959"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304959"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304959"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}