{"id":415813,"date":"2024-06-30T00:35:34","date_gmt":"2024-06-30T00:35:34","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=415813"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-06-30T00:35:34","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=415813","title":{"rendered":"<span>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c Android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 Kotlin \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u0421++ \u0438\u043b\u0438 \u0446\u0435\u043d\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u044c\u044e<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0443\u0447\u0435\u0431\u044b \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0441\u044f Android \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e  \u0438\u0437 \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435. \u0412\u044b\u0431\u0440\u0430\u043b \u0442\u0435\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0430\u0432\u043d\u043e \u0440\u0430\u0437\u0436\u0438\u0433\u0430\u0435\u0442 \u043c\u043e\u0435 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u0441\u0442\u0432\u043e, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u043d\u0430 Kotlin\u00a0 \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u0421++. <\/p>\n<p>\u041f\u043e\u0438\u0441\u043a \u0432 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043d\u0435 \u0434\u0430\u043b \u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u0447\u0435\u0433\u043e, \u0432\u0441\u0451, \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044e, \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0432 \u0446\u0438\u043a\u043b\u0435 \u2013 \u043f\u0443\u0437\u044b\u0440\u044c\u043a\u043e\u0432\u0430\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0438  \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b. \u0412 \u0446\u0435\u043b\u043e\u043c \u0442\u0430\u043a\u0438\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043a \u0432\u044b\u0432\u043e\u0434\u0443 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 JNI \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0438 Java  \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/p>\n<p>\u041f\u043e\u0438\u0441\u043a \u0441\u0440\u0435\u0434\u0438 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0438 \u0441\u0442\u0443\u0434\u0435\u043d\u0447\u0435\u0441\u043a\u0438\u0445 \u0440\u0430\u0431\u043e\u0442  \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0430\u0445 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0434\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 <a href=\"https:\/\/www.csc.kth.se\/utbildning\/kandidatexjobb\/datateknik\/2011\/rapport\/ulvesand_andreas_OCH_eriksson_daniel_K11009.pdf\" rel=\"noopener noreferrer nofollow\">[1]<\/a>, <a href=\"https:\/\/compmus.ime.usp.br\/sbcm\/2013\/pt\/docs\/pos_tec_4.pdf\" rel=\"noopener noreferrer nofollow\">[2]<\/a>,<a href=\"https:\/\/www.diva-portal.org\/smash\/get\/diva2:1114955\/FULLTEXT01.pdf\" rel=\"noopener noreferrer nofollow\">[3]<\/a>,<a href=\"https:\/\/ph.pollub.pl\/index.php\/jcsi\/article\/view\/2912\/2667\" rel=\"noopener noreferrer nofollow\">[4]<\/a> \u2013 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435 \u0438 \u0442.\u043f. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0440\u0430\u0431\u043e\u0442 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445  \u0441 \u041e\u0421 Android 2.0 \u2013 7.0.<\/p>\n<p>\u0412 <a href=\"https:\/\/developer.android.com\/ndk\/guides\" rel=\"noopener noreferrer nofollow\">\u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430\u0445<\/a> \u043e\u0442 Google \u0442\u043e\u0436\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c NDK, \u0441\u0443\u0445\u043e\u0435 <\/p>\n<blockquote>\n<p>Squeeze extra performance out of a device to achieve low latency or run<br \/>computationally intensive applications, such as games or physics simulations.<\/p>\n<p>Reuse your own or other developers&#8217; C or C++ libraries.<\/p>\n<\/blockquote>\n<p> \u00ab\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 NDK, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u0436\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438\u00bb \u043a\u0430\u043a-\u0442\u043e \u043d\u0435 \u0434\u0430\u0435\u0442 \u0447\u0435\u0442\u043a\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c, \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0441\u0432\u043e\u0439 \u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0441 blackjack \u0438 NDK.<\/p>\n<h2>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c<\/h2>\n<p>\u041d\u0430 \u0442\u0435\u043c\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 Android \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u0435\u0441\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f <a href=\"https:\/\/habr.com\/ru\/company\/solarsecurity\/blog\/334796\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a>, \u044f \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u044e \u043d\u0430 \u0438\u0441\u0442\u0438\u043d\u0443 \u0442\u0430\u043a \u044f \u0434\u0436\u0443\u043d\u0441\u043a\u0438\u0439 \u0434\u0436\u0443\u043d \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u043e \u0445\u043e\u0431\u0431\u0438, \u0430 \u0431\u043e\u043b\u0435\u0435 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u044f \u0440\u0435\u0448\u0438\u043b \u0443\u0436\u0435 \u0432\u043e \u0432\u0437\u0440\u043e\u0441\u043b\u043e\u043c \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0435, \u0438 \u0442\u0430\u043a \u0441\u043f\u0435\u0448\u0438\u0442\u044c \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0435\u043a\u0443\u0434\u0430, \u043d\u0430\u0447\u0430\u043b \u044f \u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f,\u043d\u043e \u0432\u0441\u0435 \u0436\u0435 \u0432\u043a\u0440\u0430\u0442\u0446\u0435 \u0438\u0437\u043b\u043e\u0436\u0443 \u043a\u0430\u043a \u044f \u043f\u043e\u043d\u044f\u043b \u0432\u043e\u043f\u0440\u043e\u0441.<\/p>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u2013 \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u0443\u0435\u0442 \u0431\u0430\u0439\u0442\u043a\u043e\u0434 java \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c.<\/p>\n<p>\u0412 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 Android \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 5.0 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 Dalvik, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0431\u0430\u0439\u0442-\u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b (Just In Time \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f- JIT). Dalvik \u0431\u044b\u043b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u0443\u0440\u044b.<\/p>\n<p>\u0421 \u0432\u044b\u0445\u043e\u0434\u043e\u043c Android 5.0 \u0432 2014 \u0433\u043e\u0434\u0443, Dalvik \u0431\u044b\u043b \u0437\u0430\u043c\u0435\u043d\u0435\u043d Android Runtime (ART) \u2013 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043e\u0439 \u0441 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e [3]. \u0412 ART \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f Ahead of Time (AOT) \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f &#8212; \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438\u043b\u0438 \u0432 \u043f\u0435\u0440\u0438\u043e\u0434 \u0431\u0435\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0441\u0442\u043e\u0438\u0442 \u043d\u0430 \u0437\u0430\u0440\u044f\u0434\u043a\u0435).\u00a0 \u0412 Android 7.0 \u0432 ART \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d JIT \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u0434\u0430, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u00ab\u0443\u0437\u043a\u0438\u0435\u00bb \u043c\u0435\u0441\u0442\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435. <\/p>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b Dalvik \u0438 ART \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043a\u0430\u043a \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 C\/C++, \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/p>\n<h3>\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0421++ \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c<\/h3>\n<p>Java Native Interface (JNI) &#8212; \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 Java-\u043a\u043e\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b Java (VM), \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a C, C++ . \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JNI \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 C\/C++ \u0438\u0437 Java,\u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0435 Java-\u043c\u0435\u0442\u043e\u0434\u044b, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b \u0438\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b Java \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044f \u0432 \u0432\u0438\u0434\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, Android \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 NativeDevelopment Kit (NDK). <\/p>\n<h2>\u0412\u044b\u0431\u043e\u0440 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430<\/h2>\n<p>\u0412\u043e\u043e\u0440\u0443\u0436\u0438\u0432\u0448\u0438\u0441\u044c \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u043f\u0440\u043e Dalvik \u0438 ART \u043c\u0430\u0448\u0438\u043d\u044b, JIT \u0438 Ahead of Time \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e, \u0434\u0435\u043b\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0437\u0430 \u043c\u0430\u043b\u044b\u043c \u2013 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u0441\u0451 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445.<br \/>\u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u044f \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c\u0438:<\/p>\n<ol>\n<li>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043e\u043b\u0433\u043e \u2013 \u0447\u0435\u043c \u0434\u043e\u043b\u044c\u0448\u0435, \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435, \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u0442\u0430\u043a\u043e\u0435 \u0441\u0435\u0431\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c, \u0431\u0435\u0437 \u044f\u0432\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0438\u043a\u0441\u0435\u043b\u044c\u043d\u044b\u0445 \u0448\u0435\u0439\u0434\u0435\u0440\u043e\u0432 \u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430 \u0434\u0438\u0441\u043a \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u0430\u043a\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432: \u0440\u0430\u0431\u043e\u0442\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u0430\u0440\u044f\u0434\u0430 \u0431\u0430\u0442\u0430\u0440\u0435\u0438, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435, \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 etc.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0441 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 (\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0447\u0438\u0441\u0435\u043b \u0438 \u0442.\u043f.) \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0442\u044c \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0430\u043a\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b \u0434\u043e \u043d\u0435\u0443\u0437\u043d\u0430\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u043c\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u043f\u0443\u043d\u043a\u0442\u0430 4 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u2013 \u043c\u043e\u0435\u0439 \u0438\u0434\u0435\u0435\u0439 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f Java  \u043c\u0430\u0448\u0438\u043d\u0430 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438. Java \u043c\u0430\u0448\u0438\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043d\u0430 \u00ab\u043a\u0443\u0447\u0435\u00bb (heap) \u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u043c\u0443\u0441\u043e\u0440\u0430. \u0427\u0442\u043e \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430  Int, \u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b, \u0434\u0430 \u0435\u0449\u0435 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439.<\/p>\n<p>\u0412 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u041c\u0430\u043d\u0434\u0435\u043b\u044c\u0431\u0440\u043e\u0442\u0430 \u0438 \u0441\u0438\u043c\u043f\u0430\u0442\u0438\u0447\u043d\u044b\u0439 \u0444\u0440\u0430\u043a\u0442\u0430\u043b, \u0432 \u0441\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0438\u0441\u0430\u043b \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u0435 \u043f\u043e OpenGL \u2013 \u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0444\u0440\u0430\u043a\u0442\u0430\u043b\u043e\u0432 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u0433\u0440\u0443\u0436\u0430\u043b\u043e \u041f\u041a, \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0430 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u0442\u043e\u0447\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043e\u0442\u043d\u044f\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u0414\u0430 \u0438 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u043d\u0438\u043a\u0430\u043a \u0443\u0436 \u043d\u0435\u043b\u044c\u0437\u044f \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u043a \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u043c \u0442\u0438\u043f\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044f, \u043f\u043e \u043c\u0435\u0440\u0435 \u043c\u043e\u0438\u0445 \u0441\u0438\u043b, \u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c Google:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0430 JetPack Compose <\/p>\n<\/li>\n<li>\n<p>ViewModel  \u0438 StateHoder \u2013 \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u043c\u0435\u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 (\u043f\u043e\u0432\u043e\u0440\u043e\u0442 \u044d\u043a\u0440\u0430\u043d\u0430) \u043d\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043f\u043e\u043c\u0435\u0445\u043e\u0439<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e withContext(Dispatchers.Default), \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432 \u043d\u0435\u043c \u00ab\u0442\u044f\u0436\u0435\u043b\u044b\u0435\u00bb \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u043d\u0435\u043b\u044c\u0437\u044f<\/p>\n<\/li>\n<li>\n<p>\u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u043e\u0431\u043c\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 JNI \u0438 JVM \u2013 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 JNI \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 \u0446\u0438\u043a\u043b\u0435, \u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0421++, \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0438\u0445 \u043a\u0430\u043a \u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u0434\u043d\u0438\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c JNI , \u0434\u0430\u043b\u044c\u0448\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 JVM \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430  \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438: \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432\u043e\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u043c\u043e\u0434\u0443\u043b\u044f. \u0414\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0431\u044b\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043a\u043b\u0430\u0441\u0441 Complex, \u043a\u043b\u0430\u0441\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442: \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0443 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f,\u043c\u0435\u0442\u043e\u0434 square &#8212; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430,\u043c\u0435\u0442\u043e\u0434 sqr_abs \u2013 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u043c\u043e\u0434\u0443\u043b\u044f \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430.<\/p>\n<p>\u0421\u0430\u043c\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0445\u043e\u0434\u044f\u0442 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 calc \u043a\u043b\u0430\u0441\u0441\u0430 Mandelbrot <\/p>\n<pre><code>Mandelbrot::Mandelbrot() {     \/\/ \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c vector \u0442\u0430\u043a \u043a\u0430\u043a \u0437\u0440\u0430\u043d\u0435\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0447\u0435\u043a \u0434\u043b\u044f \u0437\u0430\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u043d\u0438\u044f     points.reserve(300000); }  std::pair&lt;size_t,double*> Mandelbrot::calc(const double start_x,const double end_x,const double start_y,const double end_y,unsigned int max_iter){     points.clear();     \/\/ \u0440\u0430\u0441\u0441\u0447\u0435\u0442 \u0448\u0430\u0433\u0430     const  int HD_WIDTH=1920;     const  int HD_HEIGHT=1280;     double step_x=(end_x-start_x)\/HD_WIDTH;     double step_y=(end_y-start_y)\/HD_HEIGHT;      int iterNumb=0;     \/\/ \u043f\u0440\u043e\u0439\u0442\u0438 \u0432\u0441\u0435 \u0442\u043e\u0447\u043a\u0438 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u0448\u0430\u0433\u043e\u043c     for (double x=start_x;x&lt;=end_x;x+=step_x){         for (double y=start_y;y&lt;=end_y;y+=step_y){             Complex cn; \/\/ new complex 0             unsigned int i=0;             while (i&lt;max_iter &amp;&amp; sqr_abs(cn)&lt;=4){                 cn=square(cn)+Complex(x,y);                 ++i;                 ++iterNumb;             }             if (sqr_abs(cn)&lt;=4){                 points.push_back(x);                 points.push_back(y);             }         }     }     __android_log_print(ANDROID_LOG_VERBOSE, \"Native VS Kotlin\",\"Iteration number %d\",iterNumb);      return std::make_pair(points.size(),points.data()); }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u043e\u0447\u043a\u0438  (\u0438\u0437 1920\u04451280) \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0446\u0438\u043a\u043b, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439  max_iter=200 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439, \u0435\u0441\u043b\u0438 \u043f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f,\u0447\u0442\u043e \u0442\u043e\u0447\u043a\u0430 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 &#8212; \u0435\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u0432 \u0432\u0435\u043a\u0442\u043e\u0440. <\/p>\n<p>\u042f \u043d\u0435 \u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434, \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0443\u0434\u0435\u043b\u044f\u043b \u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u0431\u044b  \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 Kotlin \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u043b\u0430\u0441\u044c \u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0421++. <\/p>\n<pre><code>class Mandelbrot {      \/\/ \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c vector \u0442\u0430\u043a \u043a\u0430\u043a \u0437\u0440\u0430\u043d\u0435\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0447\u0435\u043a \u0434\u043b\u044f \u0437\u0430\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u043d\u0438\u044f     private var points: ArrayList&lt;Double> = ArrayList(300000);       fun calc(         startX : Double,         endX : Double,         startY : Double,         endY : Double,         maxIter : Int     ):List&lt;Double>{         points.clear()         var iterNumb:Int=0; \/\/total iterations         val stepX:Double         val stepY:Double          stepX= (endX-startX)\/HD_WIDTH         stepY=(endY-startY)\/HD_HEIGHT         \/\/ \u043f\u0440\u043e\u0439\u0442\u0438 \u0432\u0441\u0435 \u0442\u043e\u0447\u043a\u0438 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u0448\u0430\u0433\u043e\u043c         var x=startX         while(x&lt;=endX){             var y=startY             while (y&lt;=endY){                 var cn=Complex() \/\/New complex 0                 var i:Int=0                 while (i&lt;maxIter &amp;&amp; sqrAbs(cn)&lt;4){                         cn = square(cn)+Complex(x,y)                         ++i                     ++iterNumb                 }                 if (sqrAbs(cn)&lt;=4){                     points.add(x);                     points.add(y);                 }                 y+=stepY             }             x+=stepX         }          Log.d(\"Native VS Kotlin\",\"Kotlin iterations number =$iterNumb\")         \/\/return Pair(points.size,points)       return points     }<\/code><\/pre>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430 \u0421++, \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0442\u043e\u0447\u0435\u043a, \u0445\u0440\u0430\u043d\u0438\u0442 \u0438\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u0435 \u0421++, Java \u043c\u0430\u0448\u0438\u043d\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0438\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 Java \u043f\u0440\u044f\u043c\u043e \u0438\u0437 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 Java, \u043e\u0434\u043d\u0430\u043a\u043e \u0432\u044b\u0437\u043e\u0432 \u043b\u044e\u0431\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 JNI  \u0438\u043c\u0435\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c. \u0412\u044b\u0437\u043e\u0432 \u0432 \u0446\u0438\u043a\u043b\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 JNI \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043f\u0435\u0440\u0435\u0447\u0435\u0440\u043a\u043d\u0443\u043b \u0431\u044b \u0432\u0435\u0441\u044c \u0441\u043c\u044b\u0441\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.  \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043e\u043a\u043e\u043d\u0447\u0435\u043d\u043e, \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 JNI<\/p>\n<ul>\n<li>\n<p>NewDoubleArray &#8212; \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 Java<\/p>\n<\/li>\n<li>\n<p>SetDoubleArrayRegion \u2013 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0443\u0447\u0430\u0441\u0442\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0421++ \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, Java \u043c\u0430\u0448\u0438\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 Double, \u0435\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a ArrayList \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e asList() \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 (\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u043e\u0435) \u0432\u0440\u0435\u043c\u044f.<\/p>\n<h2>PNG \u0444\u0430\u0439\u043b\u044b \u043a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0435 \u0433\u043e\u0442\u043e\u0432\u044b, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0441\u0442\u0430\u043d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0430 \u00ab\u0421\u043e\u0437\u0434\u0430\u0442\u044c PNG\u00bb , \u043f\u043e\u0441\u043b\u0435 \u0435\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f  buildPNG (\u0444\u0430\u0439\u043b png.kt)<br \/> \u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u00ab\u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e\u00bb \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/github.com\/leonbloy\/pngj\" rel=\"noopener noreferrer nofollow\">pngj<\/a>,  \u0432\u0441\u0435 \u0442\u043e\u0447\u043a\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043a\u0440\u0430\u0448\u0435\u043d\u044b \u0441\u0438\u043d\u0438\u043c \u0446\u0432\u0435\u0442\u043e\u043c, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u2013 \u0431\u0435\u043b\u044b\u043c. \u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u043d\u0430 \u0434\u0438\u0441\u043a \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044b \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435.<br \/>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0433\u0440\u0430\u0435\u0442 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0440\u043e\u043b\u044c, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0433\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<h2>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0442\u0435\u0441\u0442\u043e\u0432<\/h2>\n<p>\u0414\u043b\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0431\u044b\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0447\u0435\u0442\u044b\u0440\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.<\/p>\n<ol>\n<li>\n<p>HUAWEI Y6 2019 \u2013 \u041e\u0421 Android 9.0 , \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 MT6761, 2000 MHz <\/p>\n<\/li>\n<li>\n<p>Realme C15 \u2013 \u041e\u0421 Android 11, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u00a0Mediatek MT6765G Helio G35, 2300 Mhz<\/p>\n<\/li>\n<li>\n<p>Meizu Note 8 M822H \u2013 \u041e\u0421 Android 8.1, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 Qualcomm Snapdragon 632, 1800 MHz<\/p>\n<\/li>\n<li>\n<p>Realme 10 \u2013 \u041e\u0421 Android 13, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 MediaTek Helio G99 2200MHz (556) 15c 1820\u043c\u0441<\/p>\n<\/li>\n<\/ol>\n<ul>\n<li>\n<p>\u0412\u0441\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0431\u044b\u043b\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u0440\u044f\u0436\u0435\u043d\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0431\u044b\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b &#171;\u043f\u0440\u043e\u0433\u0440\u0435\u0432\u043e\u0447\u043d\u044b\u0435&#187; \u0437\u0430\u043f\u0443\u0441\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0431\u044b\u043b\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u0434\u0435\u0441\u044f\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u043e\u043b\u0435\u0442\u0430 \u0438 \u0435\u0449\u0435 \u0434\u0435\u0441\u044f\u0442\u044c \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0441\u0442\u0430\u043b\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f Kotlin \u0438 \u0421++ \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"195\" width=\"195\">\n<p align=\"left\"><strong>GeekBench<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\"><strong>Kotlin, \u043c\u0441<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>C++, \u043c\u0441<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">HUAWEI Y6 2019<\/p>\n<\/td>\n<td data-colwidth=\"195\" width=\"195\">\n<p>162<\/p>\n<\/td>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">41653<\/p>\n<\/td>\n<td>\n<p align=\"left\">5604<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Realme C15<\/p>\n<\/td>\n<td data-colwidth=\"195\" width=\"195\">\n<p align=\"left\">174<\/p>\n<\/td>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">50905<\/p>\n<\/td>\n<td>\n<p align=\"left\">4052<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Meizu Note 8<\/p>\n<\/td>\n<td data-colwidth=\"195\" width=\"195\">\n<p align=\"left\">261<\/p>\n<\/td>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">30160<\/p>\n<\/td>\n<td>\n<p align=\"left\">3522<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Realme 10<\/p>\n<\/td>\n<td data-colwidth=\"195\" width=\"195\">\n<p align=\"left\">556<\/p>\n<\/td>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">14550<\/p>\n<\/td>\n<td>\n<p align=\"left\">1862<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0412\u0440\u0435\u043c\u044f \u0438\u0437\u043c\u0435\u0440\u044f\u043b\u043e\u0441\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <em>measureTimeMillis. <\/em><\/p>\n<p>APK \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 Build<\/p>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043d\u0430 Kotlin \u0432 Logcat \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2ca\/20c\/6d2\/2ca20c6d2615156aff10e014a4fd7049.png\" width=\"702\" height=\"523\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2ca\/20c\/6d2\/2ca20c6d2615156aff10e014a4fd7049.png\"\/><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430 &#171;\u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u043c\u0443\u0441\u043e\u0440\u0430&#187;. \u0412 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u043c Logcat \u0440\u0443\u0433\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0442\u043e \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u0431\u0430\u0442\u0430\u0440\u0435\u044e.<\/p>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0441 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043a\u043e\u043b\u043e\u0441\u0441\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c JVM \u0438, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e NDK \u0442\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0435 \u0441 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438, \u0430 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438.<\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/3036662\/JNIvsKotlin\" rel=\"noopener noreferrer nofollow\">Github<\/a> <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/4fe\/29d\/1ee\/4fe29d1ee0d311a122da213d710067fa.jpeg\" width=\"360\" height=\"800\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4fe\/29d\/1ee\/4fe29d1ee0d311a122da213d710067fa.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p>UPD: \u041f\u043e \u0441\u043e\u0432\u0435\u0442\u0430\u043c \u0438\u0437 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 &#8212; \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432\u0435\u0442\u043a\u0443 \u0433\u0434\u0435 \u0421++ \u0445\u0440\u0430\u043d\u0438\u0442 \u043d\u0435 \u0432\u0435\u043a\u0442\u043e\u0440 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0445 double, \u0430<\/p>\n<pre><code>std::vector&lt;unique_ptr&lt;double>><\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0442\u0441\u044f \u0447\u0442\u043e double \u0443\u0436\u0435 \u043a\u0430\u043a-\u0431\u044b \u043d\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432, \u0430 \u043e\u0431\u044a\u0435\u043a\u0442. \u041d\u0435 \u043e\u0441\u043e\u0431\u043e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0415\u0449\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432\u0435\u0442\u043a\u0443,\u0433\u0434\u0435 Kotlin \u0445\u0440\u0430\u043d\u0438\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043d\u0435 \u0432 ArrayList&lt;Double>, \u0430 DoubleArray \u0438 \u043f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 &#8212; \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 List.\u0422\u043e\u0436\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0430\u043b\u043e.<\/p>\n<pre><code> private var points=DoubleArray(3000000);  ....  return  points.copyOf(index + 1).asList()<\/code><\/pre>\n<p><strong>UPDATE:<\/strong><\/p>\n<p>\u041a\u0430\u043a \u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c, \u0443\u0437\u043a\u0438\u043c \u043c\u0435\u0441\u0442\u043e\u043c \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 Complex \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438<\/p>\n<blockquote>\n<p>\u042f \u0434\u0443\u043c\u0430\u044e \u0432\u0441\u0435 \u0442\u043e\u0440\u043c\u043e\u0437\u0430 \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 Complex \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438, \u0430<br \/> \u043a\u0443\u0434\u0430 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0434\u0430\u0431\u043b\u044b \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u0443\u0436\u0435 \u043d\u0435 \u0442\u0430\u043a \u0438 \u0432\u0430\u0436\u043d\u043e,<br \/> \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043c\u0430\u0441\u0441\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 Complex, \u0442\u0430\u043c \u0441\u0438\u043b\u044c\u043d\u043e<br \/> \u0437\u0430\u0432\u044b\u0448\u0435\u043d\u0430 \u0432\u0435\u0440\u0445\u043d\u044f\u044f \u043f\u043b\u0430\u043d\u043a\u0430 \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0435\u0441\u043b\u0438 \u0435\u0435 \u0445\u043e\u0442\u044c \u0447\u0443\u0442\u043e\u043a<br \/> \u0441\u043d\u0438\u0437\u0438\u0442\u044c, \u0432\u0441\u0435 \u043b\u0435\u0442\u0430\u0435\u0442. \u0414\u0443\u043c\u0430\u044e \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0443\u0437\u043a\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435, \u043a\u0443\u0447\u0430<br \/> \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u0443\u0447\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0442\u043e\u043c \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442, \u043d\u0443<br \/> \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u044f \u0438\u0445 \u0445\u043e\u0442\u0435\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c)<\/p>\n<\/blockquote>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/r\/w48\/getpro\/habr\/avatars\/16a\/656\/544\/16a656544b0f3643cdb4e61571a26e67.jpg\" alt=\"\" title=\"\" width=\"24\" height=\"24\" data-src=\"https:\/\/habrastorage.org\/r\/w48\/getpro\/habr\/avatars\/16a\/656\/544\/16a656544b0f3643cdb4e61571a26e67.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435<a href=\"https:\/\/habr.com\/ru\/users\/igormich88\/\" rel=\"noopener noreferrer nofollow\"> igormich88 &#8212; <\/a>\u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0433\u0434\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0441\u0432\u0435\u0434\u0435\u043d\u043e \u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0443, \u0438 \u0432\u0441\u0435 \u0441\u0442\u0430\u043b\u043e \u043d\u0430 \u0441\u0432\u043e\u0438 \u043c\u0435\u0441\u0442\u0430, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435,\u0447\u0435\u043c \u0447\u0435\u0440\u0435\u0437 JNI.<\/p>\n<p><strong>Kotlin Complex objetcs created =414501449<br \/>Kotlin Complex objetcs created(optimized) =1<\/strong><\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 <strong>400<\/strong> \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u043d\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 \u043a\u0443\u0447\u0435, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0432\u0441\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<p>\u041f\u0440\u0430\u0432\u0434\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0443 \u0436\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0438 \u0432 \u0421++, \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0433\u043e\u0440\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d. \u041d\u043e \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0438 \u0431\u044b\u043b \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u043a \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f ART \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043d\u0430 native. <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u043d\u0435 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445 \u0438 \u043a\u0430\u043a \u0432 \u043d\u0438\u0445 \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c double, \u0430 \u0432\u0441\u0435 \u0442\u0430\u043a\u0438 \u0432 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 Complex. \u0415\u0441\u043b\u0438 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 \u043a\u0443\u0447\u0435, \u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u0442\u0430\u043a \u0432\u0430\u0436\u043d\u043e \u0432 \u043a\u0430\u043a\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u043e\u0447\u0435\u043a.<\/p>\n<p>\u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 &#8212; \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u044e \u043d\u0435\u043c\u0430\u043b\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0438 \u0435\u0441\u043b\u0438 \u0432 Native \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u043e\u0431\u043e \u043d\u0435 \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044f\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c 400 \u043c\u043b\u043d \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 \u0445\u043e\u0434\u0443 \u0438 \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0442\u043e\u0440\u043c\u043e\u0437\u043e\u0432, \u0442\u043e \u0432 ART \u0442\u0430\u043a \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>\u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u043b <a href=\"https:\/\/habr.com\/ru\/users\/event1\/\" rel=\"noopener noreferrer nofollow\">event1<\/a>, \u0441\u0442\u0430\u0442\u044c\u044e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0435\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0430\u0437\u0432\u0430\u0442\u044c &#171;<strong>\u0446\u0435\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u044c\u044e<\/strong>&#187; \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u0434\u0443\u0445\u0435.<\/p>\n<hr\/>\n<p><strong>UPDATE:<\/strong><\/p>\n<p>\u0420\u0430\u0437 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 Kotlin &#8212; \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f 400 \u043c\u043b\u043d \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 Comlex, \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0442\u043e\u0436\u0435 \u0438 \u0432 \u0421++,  \u043a\u0430\u043a \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b <a href=\"https:\/\/habr.com\/ru\/users\/placidity_master\/\" rel=\"noopener noreferrer nofollow\">placidity_master <\/a>.  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043d\u0435\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 Complex \u0438\u0437 \u0446\u0438\u043a\u043b\u0430 \u043d\u043e \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u0441\u0430\u043c \u043a\u043b\u0430\u0441\u0441 Complex \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043d\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u043e\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0430 \u0432\u0435\u043b \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u0430\u0445 \u0432 \u0441\u0432\u043e\u0438 \u043f\u043e\u043b\u044f\u0445 (\u043c\u0435\u0442\u043e\u0434 squareSelf). OK, \u044d\u0442\u043e \u0435\u0449\u0435 \u043f\u0440\u043e\u0449\u0435 \u0434\u0435\u043b\u0430\u0435\u043c \u0432 \u0421++ \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 Complex<\/p>\n<p>\u0412\u0435\u0442\u043a\u0430  <a href=\"https:\/\/github.com\/3036662\/JNIvsKotlin\" rel=\"noopener noreferrer nofollow\">master<\/a><\/p>\n<p><strong>APK \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u043a\u043d\u043e\u043f\u043e\u0447\u043a\u0430\u043c\u0438 <\/strong><a href=\"https:\/\/github.com\/3036662\/JNIvsKotlin\/blob\/master\/apk\/app-withOpzimized.apk\" rel=\"noopener noreferrer nofollow\"><strong>\u0442\u0443\u0442<\/strong><\/a><\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/37e\/331\/8e6\/37e3318e637a854fd17961aea72c338a.jpeg\" width=\"379\" height=\"1200\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/37e\/331\/8e6\/37e3318e637a854fd17961aea72c338a.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043b\u044f Realme 10. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043f\u043e\u0442\u0435\u0440\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0432\u044b\u0437\u043e\u0432 JNI, \u0421++ \u043f\u043e\u043a\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430) \u0425\u043e\u0442\u044f \u0431\u0435\u0437 \u0442\u0430\u043a\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 &#171;\u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430&#187; \u0443\u0436\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0438 \u043d\u0435 \u0442\u0430\u043a\u0430\u044f \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0432\u0438\u0436\u0443 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043d\u043e\u0432\u0430 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c ArrayList \u043d\u0430 DoubleArray, \u043d\u043e \u0443\u0436\u0435 \u0432 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438, \u0441\u0440\u0430\u0437\u0443 \u0441\u043a\u0430\u0436\u0443 &#8212; \u0443\u0436\u0435 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b, \u043d\u0435 \u0434\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0440\u043e\u0441\u0442\u0430.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/732746\/\"> https:\/\/habr.com\/ru\/articles\/732746\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0443\u0447\u0435\u0431\u044b \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0441\u044f Android \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e  \u0438\u0437 \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435. \u0412\u044b\u0431\u0440\u0430\u043b \u0442\u0435\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0430\u0432\u043d\u043e \u0440\u0430\u0437\u0436\u0438\u0433\u0430\u0435\u0442 \u043c\u043e\u0435 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u0441\u0442\u0432\u043e, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u043d\u0430 Kotlin\u00a0 \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u0421++. <\/p>\n<p>\u041f\u043e\u0438\u0441\u043a \u0432 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043d\u0435 \u0434\u0430\u043b \u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u0447\u0435\u0433\u043e, \u0432\u0441\u0451, \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044e, \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0432 \u0446\u0438\u043a\u043b\u0435 \u2013 \u043f\u0443\u0437\u044b\u0440\u044c\u043a\u043e\u0432\u0430\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0438  \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b. \u0412 \u0446\u0435\u043b\u043e\u043c \u0442\u0430\u043a\u0438\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043a \u0432\u044b\u0432\u043e\u0434\u0443 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 JNI \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0438 Java  \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/p>\n<p>\u041f\u043e\u0438\u0441\u043a \u0441\u0440\u0435\u0434\u0438 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0438 \u0441\u0442\u0443\u0434\u0435\u043d\u0447\u0435\u0441\u043a\u0438\u0445 \u0440\u0430\u0431\u043e\u0442  \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0430\u0445 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0434\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 <a href=\"https:\/\/www.csc.kth.se\/utbildning\/kandidatexjobb\/datateknik\/2011\/rapport\/ulvesand_andreas_OCH_eriksson_daniel_K11009.pdf\" rel=\"noopener noreferrer nofollow\">[1]<\/a>, <a href=\"https:\/\/compmus.ime.usp.br\/sbcm\/2013\/pt\/docs\/pos_tec_4.pdf\" rel=\"noopener noreferrer nofollow\">[2]<\/a>,<a href=\"https:\/\/www.diva-portal.org\/smash\/get\/diva2:1114955\/FULLTEXT01.pdf\" rel=\"noopener noreferrer nofollow\">[3]<\/a>,<a href=\"https:\/\/ph.pollub.pl\/index.php\/jcsi\/article\/view\/2912\/2667\" rel=\"noopener noreferrer nofollow\">[4]<\/a> \u2013 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435 \u0438 \u0442.\u043f. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0440\u0430\u0431\u043e\u0442 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445  \u0441 \u041e\u0421 Android 2.0 \u2013 7.0.<\/p>\n<p>\u0412 <a href=\"https:\/\/developer.android.com\/ndk\/guides\" rel=\"noopener noreferrer nofollow\">\u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430\u0445<\/a> \u043e\u0442 Google \u0442\u043e\u0436\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c NDK, \u0441\u0443\u0445\u043e\u0435 <\/p>\n<blockquote>\n<p>Squeeze extra performance out of a device to achieve low latency or run<br \/>computationally intensive applications, such as games or physics simulations.<\/p>\n<p>Reuse your own or other developers&#8217; C or C++ libraries.<\/p>\n<\/blockquote>\n<p> \u00ab\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 NDK, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u0436\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438\u00bb \u043a\u0430\u043a-\u0442\u043e \u043d\u0435 \u0434\u0430\u0435\u0442 \u0447\u0435\u0442\u043a\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c, \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0441\u0432\u043e\u0439 \u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0441 blackjack \u0438 NDK.<\/p>\n<h2>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c<\/h2>\n<p>\u041d\u0430 \u0442\u0435\u043c\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 Android \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u0435\u0441\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f <a href=\"https:\/\/habr.com\/ru\/company\/solarsecurity\/blog\/334796\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a>, \u044f \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u044e \u043d\u0430 \u0438\u0441\u0442\u0438\u043d\u0443 \u0442\u0430\u043a \u044f \u0434\u0436\u0443\u043d\u0441\u043a\u0438\u0439 \u0434\u0436\u0443\u043d \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u043e \u0445\u043e\u0431\u0431\u0438, \u0430 \u0431\u043e\u043b\u0435\u0435 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u044f \u0440\u0435\u0448\u0438\u043b \u0443\u0436\u0435 \u0432\u043e \u0432\u0437\u0440\u043e\u0441\u043b\u043e\u043c \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0435, \u0438 \u0442\u0430\u043a \u0441\u043f\u0435\u0448\u0438\u0442\u044c \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0435\u043a\u0443\u0434\u0430, \u043d\u0430\u0447\u0430\u043b \u044f \u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f,\u043d\u043e \u0432\u0441\u0435 \u0436\u0435 \u0432\u043a\u0440\u0430\u0442\u0446\u0435 \u0438\u0437\u043b\u043e\u0436\u0443 \u043a\u0430\u043a \u044f \u043f\u043e\u043d\u044f\u043b \u0432\u043e\u043f\u0440\u043e\u0441.<\/p>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u2013 \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u0443\u0435\u0442 \u0431\u0430\u0439\u0442\u043a\u043e\u0434 java \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c.<\/p>\n<p>\u0412 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 Android \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 5.0 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 Dalvik, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0431\u0430\u0439\u0442-\u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b (Just In Time \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f- JIT). Dalvik \u0431\u044b\u043b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u0443\u0440\u044b.<\/p>\n<p>\u0421 \u0432\u044b\u0445\u043e\u0434\u043e\u043c Android 5.0 \u0432 2014 \u0433\u043e\u0434\u0443, Dalvik \u0431\u044b\u043b \u0437\u0430\u043c\u0435\u043d\u0435\u043d Android Runtime (ART) \u2013 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043e\u0439 \u0441 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e [3]. \u0412 ART \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f Ahead of Time (AOT) \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f &#8212; \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438\u043b\u0438 \u0432 \u043f\u0435\u0440\u0438\u043e\u0434 \u0431\u0435\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0441\u0442\u043e\u0438\u0442 \u043d\u0430 \u0437\u0430\u0440\u044f\u0434\u043a\u0435).\u00a0 \u0412 Android 7.0 \u0432 ART \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d JIT \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u0434\u0430, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u00ab\u0443\u0437\u043a\u0438\u0435\u00bb \u043c\u0435\u0441\u0442\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435. <\/p>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b Dalvik \u0438 ART \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043a\u0430\u043a \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 C\/C++, \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/p>\n<h3>\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0421++ \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c<\/h3>\n<p>Java Native Interface (JNI) &#8212; \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 Java-\u043a\u043e\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b Java (VM), \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a C, C++ . \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JNI \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 C\/C++ \u0438\u0437 Java,\u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0435 Java-\u043c\u0435\u0442\u043e\u0434\u044b, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b \u0438\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b Java \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044f \u0432 \u0432\u0438\u0434\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, Android \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 NativeDevelopment Kit (NDK). <\/p>\n<h2>\u0412\u044b\u0431\u043e\u0440 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430<\/h2>\n<p>\u0412\u043e\u043e\u0440\u0443\u0436\u0438\u0432\u0448\u0438\u0441\u044c \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u043f\u0440\u043e Dalvik \u0438 ART \u043c\u0430\u0448\u0438\u043d\u044b, JIT \u0438 Ahead of Time \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e, \u0434\u0435\u043b\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0437\u0430 \u043c\u0430\u043b\u044b\u043c \u2013 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u0441\u0451 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445.<br \/>\u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u044f \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c\u0438:<\/p>\n<ol>\n<li>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043e\u043b\u0433\u043e \u2013 \u0447\u0435\u043c \u0434\u043e\u043b\u044c\u0448\u0435, \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435, \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u0442\u0430\u043a\u043e\u0435 \u0441\u0435\u0431\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c, \u0431\u0435\u0437 \u044f\u0432\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0438\u043a\u0441\u0435\u043b\u044c\u043d\u044b\u0445 \u0448\u0435\u0439\u0434\u0435\u0440\u043e\u0432 \u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430 \u0434\u0438\u0441\u043a \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u0430\u043a\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432: \u0440\u0430\u0431\u043e\u0442\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u0430\u0440\u044f\u0434\u0430 \u0431\u0430\u0442\u0430\u0440\u0435\u0438, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435, \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 etc.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0441 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 (\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0447\u0438\u0441\u0435\u043b \u0438 \u0442.\u043f.) \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0442\u044c \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0430\u043a\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b \u0434\u043e \u043d\u0435\u0443\u0437\u043d\u0430\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u043c\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u043f\u0443\u043d\u043a\u0442\u0430 4 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u2013 \u043c\u043e\u0435\u0439 \u0438\u0434\u0435\u0435\u0439 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f Java  \u043c\u0430\u0448\u0438\u043d\u0430 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438. Java \u043c\u0430\u0448\u0438\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043d\u0430 \u00ab\u043a\u0443\u0447\u0435\u00bb (heap) \u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u043c\u0443\u0441\u043e\u0440\u0430. \u0427\u0442\u043e \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430  Int, \u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b, \u0434\u0430 \u0435\u0449\u0435 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439.<\/p>\n<p>\u0412 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u041c\u0430\u043d\u0434\u0435\u043b\u044c\u0431\u0440\u043e\u0442\u0430 \u0438 \u0441\u0438\u043c\u043f\u0430\u0442\u0438\u0447\u043d\u044b\u0439 \u0444\u0440\u0430\u043a\u0442\u0430\u043b, \u0432 \u0441\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0438\u0441\u0430\u043b \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u0435 \u043f\u043e OpenGL \u2013 \u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0444\u0440\u0430\u043a\u0442\u0430\u043b\u043e\u0432 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u0433\u0440\u0443\u0436\u0430\u043b\u043e \u041f\u041a, \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0430 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u0442\u043e\u0447\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043e\u0442\u043d\u044f\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u0414\u0430 \u0438 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u043d\u0438\u043a\u0430\u043a \u0443\u0436 \u043d\u0435\u043b\u044c\u0437\u044f \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u043a \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u043c \u0442\u0438\u043f\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044f, \u043f\u043e \u043c\u0435\u0440\u0435 \u043c\u043e\u0438\u0445 \u0441\u0438\u043b, \u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c Google:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0430 JetPack Compose <\/p>\n<\/li>\n<li>\n<p>ViewModel  \u0438 StateHoder \u2013 \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u043c\u0435\u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 (\u043f\u043e\u0432\u043e\u0440\u043e\u0442 \u044d\u043a\u0440\u0430\u043d\u0430) \u043d\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043f\u043e\u043c\u0435\u0445\u043e\u0439<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e withContext(Dispatchers.Default), \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432 \u043d\u0435\u043c \u00ab\u0442\u044f\u0436\u0435\u043b\u044b\u0435\u00bb \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u043d\u0435\u043b\u044c\u0437\u044f<\/p>\n<\/li>\n<li>\n<p>\u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u043e\u0431\u043c\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 JNI \u0438 JVM \u2013 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 JNI \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 \u0446\u0438\u043a\u043b\u0435, \u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0421++, \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0438\u0445 \u043a\u0430\u043a \u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u0434\u043d\u0438\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c JNI , \u0434\u0430\u043b\u044c\u0448\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 JVM \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430  \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438: \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432\u043e\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u043c\u043e\u0434\u0443\u043b\u044f. \u0414\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0431\u044b\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043a\u043b\u0430\u0441\u0441 Complex, \u043a\u043b\u0430\u0441\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442: \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0443 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f,\u043c\u0435\u0442\u043e\u0434 square &#8212; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430,\u043c\u0435\u0442\u043e\u0434 sqr_abs \u2013 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u043c\u043e\u0434\u0443\u043b\u044f \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430.<\/p>\n<p>\u0421\u0430\u043c\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0445\u043e\u0434\u044f\u0442 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 calc \u043a\u043b\u0430\u0441\u0441\u0430 Mandelbrot <\/p>\n<pre><code>Mandelbrot::Mandelbrot() {     \/\/ \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c vector \u0442\u0430\u043a \u043a\u0430\u043a \u0437\u0440\u0430\u043d\u0435\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0447\u0435\u043a \u0434\u043b\u044f \u0437\u0430\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u043d\u0438\u044f     points.reserve(300000); }  std::pair&lt;size_t,double*> Mandelbrot::calc(const double start_x,const double end_x,const double start_y,const double end_y,unsigned int max_iter){     points.clear();     \/\/ \u0440\u0430\u0441\u0441\u0447\u0435\u0442 \u0448\u0430\u0433\u0430     const  int HD_WIDTH=1920;     const  int HD_HEIGHT=1280;     double step_x=(end_x-start_x)\/HD_WIDTH;     double step_y=(end_y-start_y)\/HD_HEIGHT;      int iterNumb=0;     \/\/ \u043f\u0440\u043e\u0439\u0442\u0438 \u0432\u0441\u0435 \u0442\u043e\u0447\u043a\u0438 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u0448\u0430\u0433\u043e\u043c     for (double x=start_x;x&lt;=end_x;x+=step_x){         for (double y=start_y;y&lt;=end_y;y+=step_y){             Complex cn; \/\/ new complex 0             unsigned int i=0;             while (i&lt;max_iter &amp;&amp; sqr_abs(cn)&lt;=4){                 cn=square(cn)+Complex(x,y);                 ++i;                 ++iterNumb;             }             if (sqr_abs(cn)&lt;=4){                 points.push_back(x);                 points.push_back(y);             }         }     }     __android_log_print(ANDROID_LOG_VERBOSE, \"Native VS Kotlin\",\"Iteration number %d\",iterNumb);      return std::make_pair(points.size(),points.data()); }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u043e\u0447\u043a\u0438  (\u0438\u0437 1920\u04451280) \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0446\u0438\u043a\u043b, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439  max_iter=200 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439, \u0435\u0441\u043b\u0438 \u043f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f,\u0447\u0442\u043e \u0442\u043e\u0447\u043a\u0430 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 &#8212; \u0435\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u0432 \u0432\u0435\u043a\u0442\u043e\u0440. <\/p>\n<p>\u042f \u043d\u0435 \u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434, \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0443\u0434\u0435\u043b\u044f\u043b \u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u0431\u044b  \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 Kotlin \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u043b\u0430\u0441\u044c \u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0421++. <\/p>\n<pre><code>class Mandelbrot {      \/\/ \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c vector \u0442\u0430\u043a \u043a\u0430\u043a \u0437\u0440\u0430\u043d\u0435\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0447\u0435\u043a \u0434\u043b\u044f \u0437\u0430\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u043d\u0438\u044f     private var points: ArrayList&lt;Double> = ArrayList(300000);       fun calc(         startX : Double,         endX : Double,         startY : Double,         endY : Double,         maxIter : Int     ):List&lt;Double>{         points.clear()         var iterNumb:Int=0; \/\/total iterations         val stepX:Double         val stepY:Double          stepX= (endX-startX)\/HD_WIDTH         stepY=(endY-startY)\/HD_HEIGHT         \/\/ \u043f\u0440\u043e\u0439\u0442\u0438 \u0432\u0441\u0435 \u0442\u043e\u0447\u043a\u0438 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u0448\u0430\u0433\u043e\u043c         var x=startX         while(x&lt;=endX){             var y=startY             while (y&lt;=endY){                 var cn=Complex() \/\/New complex 0                 var i:Int=0                 while (i&lt;maxIter &amp;&amp; sqrAbs(cn)&lt;4){                         cn = square(cn)+Complex(x,y)                         ++i                     ++iterNumb                 }                 if (sqrAbs(cn)&lt;=4){                     points.add(x);                     points.add(y);                 }                 y+=stepY             }             x+=stepX         }          Log.d(\"Native VS Kotlin\",\"Kotlin iterations number =$iterNumb\")         \/\/return Pair(points.size,points)       return points     }<\/code><\/pre>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430 \u0421++, \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0442\u043e\u0447\u0435\u043a, \u0445\u0440\u0430\u043d\u0438\u0442 \u0438\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u0435 \u0421++, Java \u043c\u0430\u0448\u0438\u043d\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0438\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 Java \u043f\u0440\u044f\u043c\u043e \u0438\u0437 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 Java, \u043e\u0434\u043d\u0430\u043a\u043e \u0432\u044b\u0437\u043e\u0432 \u043b\u044e\u0431\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 JNI  \u0438\u043c\u0435\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c. \u0412\u044b\u0437\u043e\u0432 \u0432 \u0446\u0438\u043a\u043b\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 JNI \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043f\u0435\u0440\u0435\u0447\u0435\u0440\u043a\u043d\u0443\u043b \u0431\u044b \u0432\u0435\u0441\u044c \u0441\u043c\u044b\u0441\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.  \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043e\u043a\u043e\u043d\u0447\u0435\u043d\u043e, \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 JNI<\/p>\n<ul>\n<li>\n<p>NewDoubleArray &#8212; \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 Java<\/p>\n<\/li>\n<li>\n<p>SetDoubleArrayRegion \u2013 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0443\u0447\u0430\u0441\u0442\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0421++ \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, Java \u043c\u0430\u0448\u0438\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 Double, \u0435\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a ArrayList \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e asList() \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 (\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u043e\u0435) \u0432\u0440\u0435\u043c\u044f.<\/p>\n<h2>PNG \u0444\u0430\u0439\u043b\u044b \u043a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0435 \u0433\u043e\u0442\u043e\u0432\u044b, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0441\u0442\u0430\u043d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-415813","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/415813","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=415813"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/415813\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=415813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=415813"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=415813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}