{"id":314210,"date":"2020-12-02T21:01:08","date_gmt":"2020-12-02T21:01:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=314210"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=314210","title":{"rendered":"\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f C\/C++ \u043d\u0430 Apple M1"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/232\/1b1\/5c8\/2321b15c85bee0e06028954b29beb656.jpg\"><\/p>\n<p>  \u0417\u0430\u0438\u043d\u0442\u0440\u0438\u0433\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u044e\u0449\u0438\u043c\u0438 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0430\u043c\u0438 M1, \u044f \u0434\u043e\u0441\u0442\u0430\u043b \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 Mac Mini, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043c\u0435\u0440\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043d\u0430 C\/C++.<\/p>\n<p>  \u0418\u0437\u043c\u0435\u0440\u044f\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/build2.org\/\" rel=\"nofollow\">build2<\/a> (\u0431\u0435\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043f\u0430\u043a\u0435\u0442\u043e\u0432), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a\u043e\u0434 \u043d\u0430 C++ (611 \u0435\u0434\u0438\u043d\u0438\u0446 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438) \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u043d\u0430 C (29) \u0438 \u0441\u0432\u044f\u0437\u043a\u0430\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 (19). \u0422\u0430\u043a\u043e\u0439 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 C++ \u0438 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 <a href=\"https:\/\/openbenchmarking.org\/test\/pts\/build2\" rel=\"nofollow\">\u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 Phoronix<\/a>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c\u0441\u044f \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432.<\/p>\n<blockquote><p>\u0411\u0435\u043d\u0447\u043c\u0430\u0440\u043a Phoronix \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 build2 0.12.0, \u0443 \u043d\u0430\u0441 0.13.0 (\u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0440\u0435\u043b\u0438\u0437), \u0437\u0434\u0435\u0441\u044c \u0441\u0431\u043e\u0440\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043d\u0430 10% \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435.<\/p><\/blockquote>\n<p><a name=\"habracut\"><\/a><br \/>  \u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Mac OS \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043b\u044f XCode 12.2 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0441\u0451 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435:<\/p>\n<pre><code class=\"plaintext\">$ clang++ --version Apple clang version 12.0.0 (clang-1200.0.32.27) Target: arm64-apple-darwin20.1.0<\/code><\/pre>\n<p>  \u0421\u0443\u0434\u044f \u043f\u043e <code>_LIBCPP_VERSION<\/code> \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 <code>__version<\/code> \u0444\u0430\u0439\u043b\u0430 <code>libc++<\/code>, \u044d\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044f Apple Clang \u043e\u0442\u0432\u0435\u0442\u0432\u0438\u043b\u0430\u0441\u044c \u043e\u0442 \u0432\u0430\u043d\u0438\u043b\u044c\u043d\u043e\u0433\u043e Clang \u0433\u0434\u0435-\u0442\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 10.0.0.<\/p>\n<blockquote><p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0432 \u0442\u0440\u0438\u043f\u043b\u0435\u0442\u0435 Apple Clang \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e <code>aarch64<\/code>. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 <code>config.guess<\/code> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"plaintext\">$ .\/config.guess aarch64-apple-darwin20.1.0<\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435, build2 \u043a\u0430\u043d\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b <code>arm64<\/code> \u0432 <code>aarch64<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 <code>buildfiles<\/code> \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u0438\u0434\u0438\u043c aarch64.<\/p><\/blockquote>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0432 <code>sysctl<\/code>:<\/p>\n<pre><code class=\"plaintext\">$ sysctl -n hw.ncpu 8<\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c 8 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u044d\u0442\u043e 4 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u044f\u0434\u0440\u0430 \u0438 4 \u044d\u043d\u0435\u0440\u0433\u043e\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0440\u043e\u0433\u043e\u043d\u0435 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u043c \u0432\u0441\u0435 \u044f\u0434\u0440\u0430. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u044d\u0442\u043e \u0434\u0430\u0451\u0442 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"plaintext\">$ time sh .\/build2-install-0.13.0.sh --local --yes ~\/install 163s<\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u041f\u0440\u0438\u044f\u0442\u043d\u044b\u043c \u0441\u044e\u0440\u043f\u0440\u0438\u0437\u043e\u043c \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0442\u043e, \u0447\u0442\u043e build2 0.13.0 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0431\u0435\u0437 \u043e\u0441\u043e\u0431\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u0445\u043e\u0442\u044f \u043e\u043d \u0432\u044b\u0448\u0435\u043b \u0440\u0430\u043d\u044c\u0448\u0435 M1. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 ARM \u0441\u043b\u0430\u0431\u043e\u0435 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438, \u044d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u043b\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 build2 \u0438 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0442\u043e\u043c\u0438\u043a\u043e\u0432.<\/p><\/blockquote>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0440\u0430\u0432\u043d\u0438\u043c M1 \u0441 \u043c\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0441\u0442\u0430\u043d\u0446\u0438\u0435\u0439 \u043d\u0430 8-\u044f\u0434\u0435\u0440\u043d\u043e\u043c Intel Xeon E-2288G (\u043f\u043e \u0441\u0443\u0442\u0438, i9-9900K \u043f\u043b\u044e\u0441 ECC). \u0422\u0430 \u0436\u0435 \u0441\u0431\u043e\u0440\u043a\u0430 \u043d\u0430 \u0432\u0430\u043d\u0438\u043b\u044c\u043d\u043e\u043c Clang \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 131\u00a0\u0441. \u0425\u043e\u0442\u044f \u044d\u0442\u043e \u043b\u0443\u0447\u0448\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c M1 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u0435\u0442. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0447\u0430\u044f \u0441\u0442\u0430\u043d\u0446\u0438\u044f \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0438\u0437\u0440\u044b\u0433\u0430\u0435\u0442 \u0433\u043e\u0440\u044f\u0447\u0438\u0439 \u0432\u043e\u0437\u0434\u0443\u0445 \u0438 \u0433\u0443\u0434\u0438\u0442 \u043a\u0430\u043a \u0441\u0430\u043c\u043e\u043b\u0451\u0442, \u0430 \u041c1 \u0442\u0438\u0445\u043e \u0448\u0443\u0440\u0448\u0438\u0442 \u0441 \u0435\u0434\u0432\u0430 \u0437\u0430\u043c\u0435\u0442\u043d\u044b\u043c \u043f\u043e\u0442\u043e\u043a\u043e\u043c \u0442\u0451\u043f\u043b\u043e\u0433\u043e \u0432\u043e\u0437\u0434\u0443\u0445\u0430.<\/p>\n<p>  \u041e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c CPU \u0432 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0431\u0438\u043b\u0434\u0430\u0445:<\/p>\n<pre><code class=\"plaintext\">$ time sh. \/build2-install-0.13.0.sh --local --yes-j 1 ~ \/ install 691s<\/code><\/pre>\n<p>  \u042f\u0434\u0440\u043e E-2288G \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430 826 \u0441\u0435\u043a\u0443\u043d\u0434. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u044f\u0434\u0440\u043e Xeon \u043d\u0430 5\u00a0\u0413\u0413\u0446 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435, \u0447\u0435\u043c \u044f\u0434\u0440\u043e M1 \u043d\u0430 3,2 \u0413\u0413\u0446.<\/p>\n<p>  \u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u2014 \u0447\u0435\u0442\u044b\u0440\u0451\u0445\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0433\u043e\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u044f\u0434\u0440\u0430 \u041c1:<\/p>\n<pre><code class=\"plaintext\">$ time sh .\/build2-install-0.13.0.sh --local --yes -j 4 ~\/install 207s<\/code><\/pre>\n<p>  \u0425\u043e\u0442\u044f \u043e\u043d \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u0432\u043e\u0441\u044c\u043c\u0438\u044f\u0434\u0435\u0440\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430, \u043d\u043e \u0437\u0430\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u0430\u043c\u044f\u0442\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0442\u0430\u043a\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0441 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 (\u043a\u0430\u043a \u043d\u0430 \u0432\u0441\u0435\u0445 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445 M1).<\/p>\n<p>  \u0412\u043e\u0442 \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432:<\/p>\n<pre>CPU   CORES\/THREADS  TIME ------------------------- E-2288G    8\/16      131s M1         4+4       163s M1         4         207s M1         1         691s E-2288G    1         826s<\/pre>\n<p>  \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f\u0445 \u044d\u0442\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u044f\u0431\u043b\u043e\u043a \u0441 \u0430\u043f\u0435\u043b\u044c\u0441\u0438\u043d\u0430\u043c\u0438 (\u0440\u0430\u0431\u043e\u0447\u0430\u044f \u0441\u0442\u0430\u043d\u0446\u0438\u044f \u043f\u0440\u043e\u0442\u0438\u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0441\u0442\u0430\u0440\u044b\u0439 \u0434\u0438\u0437\u0430\u0439\u043d \u0438 \u0442\u0435\u0445\u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0442\u0438\u0432 \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0438 \u0442.\u00a0\u0434.) <\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0438\u0437 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0430 Phoronix. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0443\u043c\u0435\u0441\u0442\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043d\u043e\u0432\u0435\u0439\u0448\u0438\u0445 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0441\u0442\u0430\u043d\u0446\u0438\u0439 \u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 Intel \u0438 AMD. \u0412\u043e\u0442 \u043c\u043e\u044f \u043f\u043e\u0434\u0431\u043e\u0440\u043a\u0430 (\u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e, \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 10% \u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c Phoronix; \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0442\u0435\u0441\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f GCC \u0432\u043c\u0435\u0441\u0442\u043e Clang):<\/p>\n<pre>CPU                    CORES\/THREADS  TIME ------------------------------------------ AMD   Threadripper 3990X    64\/128    56s AMD   Ryzen        5950X    16\/32     71s Intel Xeon       E-2288G    8\/16      131s Apple                 M1    4+4       163s AMD   Ryzen        4900HS   8\/16      176s* Apple                 M1    4         207s AMD   Ryzen        4700U    8\/8       222s Intel Core         1185G    4\/8       281s* Intel Core         1165G    4\/8       295s  * \u042d\u043a\u0441\u0442\u0440\u0430\u043f\u043e\u043b\u044f\u0446\u0438\u044f.<\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0434\u043b\u044f \u043b\u0443\u0447\u0448\u0438\u0445 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 Intel (1185G) \u0438 AMD (4900HS), \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0435\u0449\u0451 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b, \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0435 \u0446\u0438\u0444\u0440\u044b \u044d\u043a\u0441\u0442\u0440\u0430\u043f\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u043e\u0432.<\/p>\n<p>  \u0418\u0437 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0439 \u0432\u044b\u0448\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e Apple M1\u00a0\u2014 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u044d\u043d\u0435\u0440\u0433\u043e\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u044d\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 ARM-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430. \u0414\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u0442\u0430 \u0436\u0435 \u0441\u0431\u043e\u0440\u043a\u0430 \u043d\u0430 Raspberry Pi 4B \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 1724 \u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u0442\u043e \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0432 10 \u0440\u0430\u0437 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435! \u0425\u043e\u0442\u044f \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0442\u0443\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c Linux \u0438\u043b\u0438 Windows, \u043d\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0432\u0438\u0434\u0435\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430, \u0447\u0442\u043e \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445 \u0441 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. \u0412 \u0438\u0442\u043e\u0433\u0435, \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 \u043d\u0430 \u0431\u0430\u0437\u0435 ARM \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c.<\/p>\n<p>  \u0423\u0432\u0438\u0434\u0435\u0432 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438 M1, \u043d\u0435\u0432\u043e\u043b\u044c\u043d\u043e \u0437\u0430\u0434\u0430\u0451\u0448\u044c\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c, \u043a\u0430\u043a Apple \u0442\u0430\u043a\u043e\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c. \u0425\u043e\u0442\u044f \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0441\u043f\u0435\u043a\u0443\u043b\u044f\u0446\u0438\u0439 \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0447\u0451\u0440\u043d\u043e\u0439 \u043c\u0430\u0433\u0438\u0438 \u0438 \u043a\u043e\u043b\u0434\u043e\u0432\u0441\u0442\u0432\u0430, \u043d\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c <a href=\"https:\/\/www.anandtech.com\/show\/16252\/mac-mini-apple-m1-tested\" rel=\"nofollow\">\u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043e M1 \u043d\u0430 Anandtech<\/a> (\u0438 \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u0442\u0430\u043c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435). \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b:<\/p>\n<blockquote><p><b>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 TSMC 5 \u043d\u043c<\/b><br \/>  \u041f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0438\u043d\u0442\u0435\u043b\u043e\u0432\u0441\u043a\u0438\u043c\u0438 10 \u043d\u043c (\u0434\u043b\u044f 11x5G, 14\u00a0\u043d\u043c \u0434\u043b\u044f E-2288G) \u0438 7\u00a0\u043d\u043c \u0443 AMD\/TSMC.<\/p>\n<p>  <b>LPDDR4-4266 RAM<\/b> <br \/>  \u0422\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0432\u0435\u0439\u0448\u0438\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b \u043e\u0442 Intel \u0438 AMD \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u0442\u0430\u043a\u043e\u0439 \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u044c\u044e.<\/p>\n<p>  <b>\u0411\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u044d\u0448 L1<\/b> <br \/>  \u0423 M1 \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u044d\u0448 L1 \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <b>\u0411\u043e\u043b\u044c\u0448\u043e\u0439 \u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043e\u0431\u0449\u0438\u0439 \u043a\u044d\u0448 L2<\/b> <br \/>  \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 Intel \u0438 AMD, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u044d\u0448\u0438 L2 \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u043e\u0431\u044a\u0451\u043c\u0430 \u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u0449\u0438\u0439 \u043a\u044d\u0448 L3, \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 M1 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u0449\u0438\u0439 \u043a\u044d\u0448 L2.<\/p>\n<p>  <b>\u0428\u0438\u0440\u043e\u043a\u043e\u0435 \u044f\u0434\u0440\u043e<\/b> <br \/>  \u0423 M1 \u043d\u0435\u043e\u0431\u044b\u0447\u0430\u0439\u043d\u043e \u00ab\u0448\u0438\u0440\u043e\u043a\u043e\u0435\u00bb \u044f\u0434\u0440\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0438\/\u0438\u043b\u0438 \u043d\u0435 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443. \u0415\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0438\u0437-\u0437\u0430 \u0441\u043b\u0430\u0431\u043e\u0433\u043e \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 ARM \u0438 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430, Apple \u0441\u043c\u043e\u0433\u043b\u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u043e\u0435 \u044f\u0434\u0440\u043e.<\/p><\/blockquote>\n<p>  \u0411\u044b\u043b\u043e \u0431\u044b \u0442\u0430\u043a\u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a Apple \u0441\u043c\u043e\u0436\u0435\u0442 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044f\u0434\u0435\u0440.<\/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\/531006\/\"> https:\/\/habr.com\/ru\/post\/531006\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/232\/1b1\/5c8\/2321b15c85bee0e06028954b29beb656.jpg\"><\/p>\n<p>  \u0417\u0430\u0438\u043d\u0442\u0440\u0438\u0433\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u044e\u0449\u0438\u043c\u0438 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0430\u043c\u0438 M1, \u044f \u0434\u043e\u0441\u0442\u0430\u043b \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 Mac Mini, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043c\u0435\u0440\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043d\u0430 C\/C++.<\/p>\n<p>  \u0418\u0437\u043c\u0435\u0440\u044f\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/build2.org\/\" rel=\"nofollow\">build2<\/a> (\u0431\u0435\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043f\u0430\u043a\u0435\u0442\u043e\u0432), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a\u043e\u0434 \u043d\u0430 C++ (611 \u0435\u0434\u0438\u043d\u0438\u0446 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438) \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u043d\u0430 C (29) \u0438 \u0441\u0432\u044f\u0437\u043a\u0430\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 (19). \u0422\u0430\u043a\u043e\u0439 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 C++ \u0438 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 <a href=\"https:\/\/openbenchmarking.org\/test\/pts\/build2\" rel=\"nofollow\">\u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 Phoronix<\/a>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c\u0441\u044f \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432.<\/p>\n<blockquote><p>\u0411\u0435\u043d\u0447\u043c\u0430\u0440\u043a Phoronix \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 build2 0.12.0, \u0443 \u043d\u0430\u0441 0.13.0 (\u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0440\u0435\u043b\u0438\u0437), \u0437\u0434\u0435\u0441\u044c \u0441\u0431\u043e\u0440\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043d\u0430 10% \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435.<\/p><\/blockquote>\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-314210","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/314210","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=314210"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/314210\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=314210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=314210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=314210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}