{"id":276390,"date":"2016-03-17T19:24:02","date_gmt":"2016-03-17T16:24:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=276390"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=276390","title":{"rendered":"\u041c\u043e\u0434\u0443\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f Python \u043d\u0430 Rust"},"content":{"rendered":"\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/files\/fa6\/0c7\/77c\/fa60c777cc09487eba64f52a083c8333.png\"\/><\/div>\n<p>  <i>\u201cAbsolute statements are the root of all evil.<br \/>  The key is balance. There are no answers, only questions.\u201d<br \/>  ????<\/i><\/p>\n<p>  \u0410\u0432\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438:  <a href=\"https:\/\/habrahabr.ru\/users\/zolkko\/\" class=\"user_link\">zolkko<\/a>.  <\/p>\n<h5><b>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438<\/b><\/h5>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043f\u0440\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0442\u0441\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f, \u0442\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430 \u0438\/\u0438\u043b\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 YAGNI \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430, Python \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u041f\u041e, \u0438\u0437\u0431\u0430\u0432\u0438\u0432 \u0435\u0433\u043e \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u0431\u043e\u0442\u0438\u0442\u044c\u0441\u044f \u043e \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0445 \u0432\u0435\u0449\u0430\u0445 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0440\u0435\u0433\u0438\u043e\u043d\u044b\u0445 \u043f\u0430\u043c\u044f\u0442\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043e\u0431 \u0435\u0451 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0438\u043b\u0438 \u043e \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f\u0445 \u043e \u0432\u044b\u0437\u043e\u0432\u0430\u0445. <\/p>\n<p>  \u041d\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0432 <a href=\"https:\/\/www.youtube.com\/watch?v=brE_dyedGm0\">\u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0435\u0433\u043e \u043b\u0435\u043a\u0446\u0438\u0439<\/a> \u043e Haskell \u0443\u043a\u0430\u0437\u0430\u043b \u0421\u0430\u0439\u043c\u043e\u043d \u0414\u0436\u043e\u043d\u0441. \u0423 \u043d\u0435\u0433\u043e \u0431\u044b\u043b \u0441\u043b\u0430\u0439\u0434, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b\u0430 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0430 \u0441\u0442\u0440\u0435\u043b\u043a\u0430, \u0437\u0430\u043a\u0440\u0430\u0448\u0435\u043d\u043d\u0430\u044f \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u043c: \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u201cno types\u201d, \u043f\u043e\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 \u2014 \u201cHaskell\u201d, \u0432 \u043a\u043e\u043d\u0446\u0435 \u2014 \u201cCoq\u201d. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0443\u043a\u0430\u0437\u0430\u043b \u043d\u0430 Coq, \u043e\u043d \u0441\u043a\u0430\u0437\u0430\u043b \u0442\u0430\u043a\u0443\u044e \u0444\u0440\u0430\u0437\u0443: \u201cThis stresses power over usability. Right?! You need a PhD here!\u201d[1]. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u044b\u043b\u0430 \u0448\u0443\u0442\u043a\u0430, \u043c\u0430\u043d\u0442\u0430\u0440\u0430 Python \u2013 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043b\u044e\u0431\u0438\u043c\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u044d\u0442\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430. \u0418 \u0438\u0437 \u043c\u043e\u0435\u0433\u043e \u043e\u043f\u044b\u0442\u0430, \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/files\/352\/4cb\/01c\/3524cb01cef7431aa1723863fe22bf8b.png\"\/><\/div>\n<p>  \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u041f\u041e, \u0442\u043e \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u0445 \u043e\u0431 \u044d\u0442\u043e\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0441\u044f \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443, \u043d\u043e \u044f \u0435\u0451 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0434\u0435\u043b\u044e \u043d\u0430 \u0442\u0440\u0438 \u0443\u0440\u043e\u0432\u043d\u044f:  <\/p>\n<ul>\n<li>\u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b<\/li>\n<li>\u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<li>\u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f<\/li>\n<\/ul>\n<p>  \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0437\u0434\u0435\u0441\u044c \u0432\u043e\u0442 \u0432 \u0447\u0451\u043c: \u0447\u0435\u043c \u0432\u044b\u0448\u0435 \u0443\u0440\u043e\u0432\u0435\u043d\u044c, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f, \u0442\u0435\u043c \u043e\u043d\u0430 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435. \u041e\u0431\u044b\u0447\u043d\u043e \u0442\u0430\u043a. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0447\u0435\u043c \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u043c\u044b \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e, \u0442\u0435\u043c \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0430\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c: \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0435 \u0434\u0435\u043b\u043e, \u0432 \u043a\u043e\u043d\u0446\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u0442\u043b\u043d\u0435\u043a, \u0434\u0430 \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c \u043f\u0440\u0435\u0436\u0434\u0435\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439, \u0442.\u043a. \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439, \u043c\u0435\u043d\u044f\u0442\u044c \u041f\u041e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u0435\u0435.<\/p>\n<h6><b>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/b><\/h6>\n<p>  \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0441\u0430\u043c\u043e\u0439 \u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0439 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 (\u0432 \u043f\u043b\u0430\u043d\u0435 \u0442\u0440\u0443\u0434\u043e\u0451\u043c\u043a\u043e\u0441\u0442\u0438) \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0435\u0439 \u0434\u043b\u044f \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 Python \u043a\u043e\u0434\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u0442\u043e\u0432 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a PyPy, Pyston \u0438 \u043f\u0440\u043e\u0447\u0438\u0445. \u0421\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043a\u043e\u0434 Cpython \u0443\u0436\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u0435\u043d, \u0430 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043b\u044e\u0431\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u0441\u043a\u043e\u0440\u0435\u0435 \u043a \u0434\u0435\u0433\u0440\u0430\u0434\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0410 \u0442\u0430\u043a \u0436\u0435 \u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u201c\u043a\u043b\u0430\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445\u201d \u043c\u0435\u043e\u0442\u0434\u043e\u0432 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0437-\u0437\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438 Python.<br \/>  \u042d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435, \u043e\u043c\u0435\u0447\u0430\u043b Kevin Modzelewski \u043d\u0430 Pyston Talk 2015[2]. \u041f\u043e \u0435\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 10% runtime. \u041a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u044e\u044f \u0436\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a JIT, tracing JIT, \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437, Pyston \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u0440\u043e\u0441\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 25%.<br \/>  \u0410 \u0432\u043e\u0442 \u043e\u0434\u0438\u043d \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a \u0433\u0440\u0430\u0444\u0438\u043a, \u0432\u0437\u044f\u0442\u044b\u0439 \u0438\u0437 \u0435\u0433\u043e \u0434\u043e\u043a\u043b\u0430\u0434\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/602\/c1f\/155\/602c1f1551e24ee58e9031cae50529d6.png\"\/><\/p>\n<p>  \u041d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0432\u0438\u0434\u043d\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 PyPy \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0432 38 \u0440\u0430\u0437 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e Cpython. \u0422\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u043c\u044b\u0441\u043b\u044c, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u0442\u0430\u043a\u043e\u0439 \u0438\u043d\u0442\u0441\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041f\u0440\u0438\u0447\u0451\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0435, \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u043f\u0440\u0438\u0431\u043b\u0435\u0436\u0451\u043d\u043d\u044b\u043c \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u043d\u0435\u043d\u0438\u044f \u041f\u041e. \u0418 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0432\u0435\u0440\u0441\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0438\u0442\u0430\u0442\u043e\u0440\u043e\u0432. \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0446\u0438\u0442\u0430\u0442\u0443: \u201cIf you make an optimization and don\u2019t measure to confirm the performance increase, all you know for certain is that you\u2019ve made your code harder to read\u201d[3].<\/p>\n<h6><b>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430<\/b><\/h6>\n<p>  \u0410\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u043d\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u0438 \u043f\u0440\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u044f\u0437\u044b\u043a\u0430 \u0437\u0430 \u0441\u0447\u0451\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0434\u0435\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0414\u043b\u044f \u0435\u0451 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b (\u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0438\u0434\u0435\u043e\u043c\u0438\u0442\u0438\u0447\u043d\u043e\u0439[4]), \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u0441\u043b\u043e\u0432 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c \u0441 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u044f\u043c\u0438 \u0438\u0437 3 \u043f\u043e 10 \u0438 \u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0449\u0438\u0435 \u044d\u0442\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432 \u0438\u0437 \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u0431\u0443\u043a\u0432:<\/p>\n<pre><code class=\"python\">LST = list(map(''.join, product('abc', repeat=10)))  def foo():     return map(str.upper, LST)  def bar():     res = []     for i in LST:         res.append(i.upper())     return res  def baz():     return [i.upper() for i in LST] <\/code><\/pre>\n<h5><b>\u041c\u043e\u0434\u0443\u043b\u0438 CPython<\/b><\/h5>\n<p>  \u0415\u0449\u0451 \u043e\u0434\u0438\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 Python \u2013 \u043c\u043e\u0434\u0443\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f.<br \/>  \u0412\u044b\u043d\u043e\u0441\u044f \u0447\u0430\u0441\u0442\u044c \u043b\u043e\u043a\u0438\u0433\u0438 \u0432 \u043c\u043e\u0434\u0443\u043b\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f, \u0432 \u0440\u044f\u0434\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c.<\/p>\n<h6><b>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/b><\/h6>\n<p>  \u041c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u043b\u044f Python \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f CUDA \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0435\u0439 \u0441 numpy \u0438\u043b\u0438 C++. \u041e\u0434\u043d\u0430\u043a\u043e, \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u044f \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 \u043d\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435:<\/p>\n<pre><code class=\"python\">def add_mul_two(a, b):     acc = 0     i = 0     while i &lt; 1000:         acc += a + b         i += 1     return acc <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e CPython \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0435\u0433\u043e \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e:<\/p>\n<pre><code class=\"python\">12 SETUP_LOOP              40 (to 55) 15 LOAD_FAST                3 (i) 18 LOAD_CONST             2 (1000) 21 COMPARE_OP             0 (&lt;) 24 POP_JUMP_IF_FALSE  54  27 LOAD_FAST                2 (acc) 30 LOAD_FAST                0 (a) 33 LOAD_FAST                1 (b) 36 BINARY_ADD 37 INPLACE_ADD 38 STORE_FAST              2 (acc)  41 LOAD_FAST                3 (i) 44 LOAD_CONST             3 (1) 47 INPLACE_ADD 48 STORE_FAST              3 (i) 51 JUMP_ABSOLUTE        15 54 POP_BLOCK <\/code><\/pre>\n<p>  \u041f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0432 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043d\u0430 C.<br \/>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u044f:<\/p>\n<pre><code class=\"python\">\/\/ example.c void initexample(void) {     Py_InitModule(&quot;example&quot;, NULL); } <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0442\u0430\u043a\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430<\/p>\n<pre><code class=\"python\">import example  IMPORT_NAME  0 (example) STORE_FAST    0 (example) <\/code><\/pre>\n<p>  \u0411\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e<\/p>\n<pre><code class=\"python\">\/\/ ceval.c ... w = GETITEM(names, oparg); v = PyDict_GetItemString(f-&gt;f_builtins, &quot;__import__&quot;); ... x = PyEval_CallObject(v, w); ... <\/code><\/pre>\n<p>  \u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 builtin___import__ (bltinmodule.c), \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u043e \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u0432\u044b\u0437\u043e\u0432\u043e\u0432:<\/p>\n<pre><code class=\"python\">dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, const char *pathname, FILE *fp) {     char funcname[258];     PyOS_snprintf(funcname, sizeof(funcname), &quot;init%.200s&quot;, shortname);     return dl_loadmod(Py_GetProgramName(), pathname, funcname); } <\/code><\/pre>\n<p>  \u0412\u043e \u0432\u0441\u044f\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0438 \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445: CPython \u0441\u043e\u0431\u0440\u0430\u043d \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439, \u043c\u043e\u0434\u0443\u043b\u044c \u0435\u0449\u0451 \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u043b\u0441\u044f, \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \u0438\u043c\u0435\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0439 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0438 \u0442.\u043f.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0434\u0443\u043b\u044f<\/p>\n<pre><code class=\"python\">static PyObject * add_mul_two(PyObject * self, PyObject * args);  static PyMethodDef ExampleMethods[] = {     {&quot;add_mul_two&quot;, add_mul_two, METH_VARARGS, &quot;&quot;},     {NULL, NULL, 0, NULL} };  void initexample(void) {     Py_InitModule(&quot;example&quot;, ExampleMethods); } <\/code><\/pre>\n<p>  \u0418 \u0441\u0430\u043c\u0430 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f. \u0422.\u043a. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u043e\u0447\u043d\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u0442\u0438\u043f\u044b \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"python\">PyObject * add_mul_two(PyObject * self, PyObject * args) {     int a, b, acc = 0;     if (!PyArg_ParseTuple(args, &quot;ii&quot;, &a, &b)) {         PyErr_SetNone(PyExc_ValueError);         return NULL;     }     for (int i = 0; i &lt; 1000; i++)         acc += a + b;     return Py_BuildValue(&quot;i&quot;, acc); } <\/code><\/pre>\n<p>  \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e \u0436\u0435, \u043a\u0430\u043a \u043a\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0443\u0447\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Numba:<\/p>\n<pre><code class=\"python\">___main__.add_mul_two$1.int32.int32: addl\t%r8d, %ecx imull\t$1000, %ecx, %eax movl\t%eax, (%rdi) xorl\t%eax, %eax retq <\/code><\/pre>\n<p>  \u041d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0432 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0438 \u043d\u0435 \u0432\u044b\u0445\u043e\u0434\u044f \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">@jit(int32(int32, int32), nopython=True) <\/code><\/pre>\n<p>  \u041f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 numba \u0442\u0430\u043a \u0436\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442<\/p>\n<pre><code class=\"python\">add_mul_two.inspect_asm().values()[0].decode('string_escape') <\/code><\/pre>\n<p>  \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0431\u0451\u0440\u0442\u043a\u0443 \u0432\u0438\u0434\u0430:  <\/p>\n<pre><code class=\"python\">_wrapper.__main__.add_mul_two$1.int32.int32: \t...            movq\t%rdi, %r14 \tmovabsq\t$_.const.add_mul_two, %r10 \tmovabsq\t$_PyArg_UnpackTuple, %r11     ... \tmovabsq\t$_PyNumber_Long, %r15 \tcallq\t*%r15 \tmovq\t%rax, %rbx \txorl\t%r14d, %r14d \ttestq\t%rbx, %rbx \tje\tLBB1_8 \tmovabsq\t$_PyLong_AsLongLong, %rax     \u2026 <\/code><\/pre>\n<p>  \u0415\u0451 \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0432 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0435 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0430\u043c \u0438 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043a\u043e\u043c\u043f\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043a\u0430\u0436\u0435\u0442\u044c\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0437\u0430\u043c\u0430\u043d\u0447\u0438\u0432\u044b\u043c, \u043e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0442\u0435\u043b\u043e \u0446\u0438\u043a\u043b\u0430 \u0432 \u043e\u0442\u0434\u0443\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0442\u043e \u0435\u0451 \u0442\u0430\u043a \u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u043c\u043b\u044f\u0442\u044c \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u0438\u043b\u0438 \u0436\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c nopython.<\/p>\n<p>  Cython \u2014 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0435\u043d\u0442. \u041e\u043d \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043d\u0430\u0434 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e Python \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0432\u044b\u0437\u043e\u0432\u0430 C \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f C \u0442\u0438\u043f\u043e\u0432. \u0410 \u043f\u043e\u0442\u043e\u043c\u0443 \u0432 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 add_mul_two \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0430 \u043d\u0451\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e Cpython. \u041e\u0434\u043d\u0430\u043a\u043e \u043e\u0431\u0448\u0438\u0440\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043d\u0435 \u0434\u0430\u0451\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u0438 \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 C \u0432\u0435\u0440\u0441\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 2000 \u0441\u0442\u0440\u043e\u043a CPython API \u0432\u0438\u0434\u0430:<\/p>\n<pre><code class=\"python\">__pyx_t_2 = PyNumber_Add(__pyx_v_a, __pyx_v_b); if (unlikely(!__pyx_t_2)) {     __pyx_filename = __pyx_f[0];     __pyx_lineno = 14; __pyx_clineno = __LINE__;     goto __pyx_L1_error; } __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_acc, __pyx_t_2); if (unlikely(!__pyx_t_3)) {     __pyx_filename = __pyx_f[0]; __pyx_lineno = 14;     __pyx_clineno = __LINE__; goto __pyx_L1_error; } <\/code><\/pre>\n<p>  \u0423\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0432 \u043f\u043b\u0430\u043d\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u043d\u0435 \u043f\u043e \u043e\u0431\u044a\u0451\u043c\u0443 \u043a\u043e\u0434\u0430, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u0430\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 C, \u0430 Cython \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0451\u0440\u0442\u043a\u0438.<\/p>\n<pre><code class=\"python\">int cadd_mul_two(int a, int b) {     int32_t acc = 0;     for (int i = 0; i &lt; 1000; i++)         acc += a + b;     return acc; }  cdef extern from &quot;example_func.h&quot;:     int cadd_mul_two(int, int)  def add_two(a, b):     return cadd_two(a, b)  cythonize(&quot;sample.pyx&quot;, sources=[ 'example_func.c' ]) <\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043d\u043e \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 C, Cython, Python.<\/p>\n<pre><code class=\"python\"> __pyx_t_1 = __Pyx_PyInt_As_int32_t(__pyx_v_a); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_ __pyx_t_2 = __Pyx_PyInt_As_int32_t(__pyx_v_b); if (unlikely((__pyx_t_2 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_ __pyx_t_3 = __Pyx_PyInt_From_int32_t(cadd_two(__pyx_t_1, __pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; _  <\/code><\/pre>\n<h5><b>Rust<\/b><\/h5>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0430 Rust, \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c extern \u0444\u0443\u043d\u043a\u0446\u0438\u044e c no_mangle,<\/p>\n<pre><code class=\"python\">#[no_mangle] pub extern fn initexample() {     unsafe {         Py_InitModule4_64(&SAMPLE[0] as *const _,             &METHODS[0] as *const _,             0 as *const _,             0,             PYTHON_API_VERSION);     }; } <\/code><\/pre>\n<p>  \u0438 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0438\u043f\u044b:<\/p>\n<pre><code class=\"python\">type PyCFunction = unsafe extern &quot;C&quot;     fn (slf: *mut isize, args: *mut isize) -&gt; *mut isize;  #[repr(C)] struct PyMethodDef {     pub ml_name: *const i8,     pub ml_meth: Option&lt;PyCFunction&gt;,     pub ml_flags: i32,     pub ml_doc: *const i8, } unsafe impl Sync for PyMethodDef { } <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435, \u043a\u0430\u043a \u0438 \u0432 C, \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c PyMethod:<\/p>\n<pre><code class=\"python\">lazy_static! {     static ref METHODS: Vec = { vec![         PyMethodDef {             ml_name: &ADD_MUL_TWO[0] as *const _,             ml_meth: Some(add_mul_two),         },         ...     ] }; } <\/code><\/pre>\n<p>  \u0418\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432 CPython \u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u043e\u0432 C API, \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0449\u0451 \u0438 \u0442\u0430\u043a\u043e\u0435:<\/p>\n<pre><code class=\"python\">#[link(name=&quot;python2.7&quot;)] extern {     fn Py_InitModule4_64(name: *const i8,         methods: *const PyMethodDef,         doc: *const i8, s: isize, apiver: usize) -&gt; *mut isize;     fn PyArg_ParseTuple(arg1: *mut isize,         arg2: *const i8, ...) -&gt; isize;     fn Py_BuildValue(arg1: *const i8, ...) -&gt; *mut isize; } <\/code><\/pre>\n<p>  \u0417\u0430\u0442\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u0432\u043e\u0442 \u043a\u0440\u0430\u0441\u0438\u0432\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"python\">#[allow(unused_variables)] unsafe extern &quot;C&quot; fn add_mul_two(slf: *mut isize,         args: *mut isize) -&gt; *mut isize {     let mut a: i32 = 0;     let mut b: i32 = 0;     if PyArg_ParseTuple(args,             &II_ARGS[0] as *const _,             &a as *const i32, &b as *const i32) == 0 {         return 0 as *mut _;     }     let mut acc: i32 = 0;     for i in 0..1000 { acc += a + b; }     Py_BuildValue(&I_ARGS[0] as *const _, acc) } <\/code><\/pre>\n<p>  \u0418\u043b\u0438 \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438  <\/p>\n<pre><code class=\"python\">let acc: i32 = (0..).take(1000)                 .map(|_| a + b)                 .fold(0, |acc, x| acc + x); <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0442\u0430\u043a \u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0432\u0435 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"python\">__ZN7add_mul_two20h391818698d43ab0ffcaE: ... callq   0x7a002      ## symbol stub for: _PyArg_ParseTuple testq   %rax, %rax je      0x14e3 movl    -0x8(%rbp), %eax addl    -0x4(%rbp), %eax imull   $0x3e8, %eax, %esi      ## imm = 0x3E8 leaq    _ref5540(%rip), %rdi    ## literal pool for: &quot;h&quot; ... <\/code><\/pre>\n<p>  \u041c\u0438\u043d\u0443\u0441\u044b \u0443 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:<\/p>\n<ul>\n<li>\u0442\u043e\u043b\u044c\u043a\u043e CPython API 2.7 \u0438 \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0442\u0430\u043a \u0436\u0435 Python 3, \u0442\u043e \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/li>\n<li>\u0435\u0441\u043b\u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0430 \u0437\u0430 \u0441\u0447\u0451\u0442 no_std, \u0442\u043e \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0435\u0451 \u0431\u043e\u043b\u044c\u0448\u0435<\/li>\n<li>\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0442.\u043a. \u0420\u044f\u0434 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Rust \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0442 C. \u0422\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Rust \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0430\u0441\u043a\u0430\u043b\u044c-\u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 C \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 std::ffi::CString<\/li>\n<\/ul>\n<p>  \u041d\u043e \u043a \u0441\u0447\u0430\u0441\u0442\u044c\u044e \u0435\u0441\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 rust-cpython, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043b \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 CpythonAPI \u043d\u043e \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043a \u043d\u0438\u043c \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438 \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u0430\u043a Python 2.x, \u0442\u0430\u043a \u0438 3.x. \u041a\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0438\u043c:<\/p>\n<pre><code class=\"python\">[package] name = &quot;example&quot; version = &quot;0.1.0&quot; [lib] name = &quot;example&quot; crate-type = [&quot;dylib&quot;]  [dependencies] interpolate_idents = &quot;0.0.9&quot;  [dependencies.cpython] version = &quot;0.0.5&quot; default-features = false features = [&quot;python27-sys&quot;] <\/code><\/pre>\n<pre><code class=\"python\">#![feature(slice_patterns)] #![feature(plugin)] #![plugin(interpolate_idents)]  #[macro_use] extern crate cpython;   use cpython::{PyObject, PyResult, Python, PyTuple, PyDict, ToPyObject, PythonObject};   fn add_two(py: Python, args: &PyTuple, _: Option&lt;&PyDict&gt;) -&gt; PyResult&lt;PyObject&gt; {     match args.as_slice() {         [ref a_obj, ref b_obj] =&gt; {             let a = a_obj.extract::&lt;i32&gt;(py).unwrap();             let b = b_obj.extract::&lt;i32&gt;(py).unwrap();             let mut acc:i32 = 0;              for _ in 0..1000 {                 acc += a + b;             }              Ok(acc.to_py_object(py).into_object())         },         _ =&gt; Ok(py.None())     } } <\/code><\/pre>\n<pre><code class=\"python\">py_module_initializer!(example, |py, module| {     try!(module.add(py, &quot;add_two&quot;, py_fn!(add_two)));     Ok(()) }); <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f nightly Rust \u043f\u043e \u0441\u0443\u0442\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f sclice_pattens \u0438 PyTuple.as_slice.<br \/>  \u0417\u0430\u0442\u043e, \u043a\u0430\u043a \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, Rust, \u0432 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441 \u043c\u043e\u0449\u044c\u043d\u044b\u043c\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u043c\u0438 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044f\u043c\u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0442\u043e\u043d\u043a\u0430\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445, \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439. \u0422.\u0435. \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u043e\u0439 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043e\u0439 \u0434\u0440\u0443\u0433\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c.<\/p>\n<p>  \u041a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/github.com\/zolkko\/pug-rust\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h5><b>Bibliography<\/b><\/h5>\n<p>  1: Simon Peyton Jones, Adventure with Types in Haskell \u2014 Simon Peyton Jones (Lecture 2), 2014, <a href=\"https:\/\/youtu.be\/brE_dyedGm0?t=536\">youtu.be\/brE_dyedGm0?t=536<\/a><br \/>  2: Kevin Modzelewski, 2015\/11\/10 Pyston Meetup, 2015, <a href=\"http:\/\/www.youtube.com\/watch?v=NdB9XoBg5zI\">www.youtube.com\/watch?v=NdB9XoBg5zI<\/a><br \/>  3: Martin Fowler, Yet Another OptimizationArticle, 2002, <a href=\"http:\/\/martinfowler.com\/ieeeSoftware\/yetOptimization.pdf\">martinfowler.com\/ieeeSoftware\/yetOptimization.pdf<\/a><br \/>  4: Raymond Hettinger, Transforming Code into Beautiful, Idiomatic Python, 2013, <a href=\"https:\/\/www.youtube.com\/watch?v=OSGv2VnC0go\">www.youtube.com\/watch?v=OSGv2VnC0go<\/a>               <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/279561\/\"> https:\/\/habrahabr.ru\/post\/279561\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/files\/fa6\/0c7\/77c\/fa60c777cc09487eba64f52a083c8333.png\"\/><\/div>\n<p>  <i>\u201cAbsolute statements are the root of all evil.<br \/>  The key is balance. There are no answers, only questions.\u201d<br \/>  ????<\/i><\/p>\n<p>  \u0410\u0432\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438:  <a href=\"https:\/\/habrahabr.ru\/users\/zolkko\/\" class=\"user_link\">zolkko<\/a>.  <\/p>\n<h5><b>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438<\/b><\/h5>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043f\u0440\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0442\u0441\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f, \u0442\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430 \u0438\/\u0438\u043b\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 YAGNI \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430, Python \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u041f\u041e, \u0438\u0437\u0431\u0430\u0432\u0438\u0432 \u0435\u0433\u043e \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u0431\u043e\u0442\u0438\u0442\u044c\u0441\u044f \u043e \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0445 \u0432\u0435\u0449\u0430\u0445 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0440\u0435\u0433\u0438\u043e\u043d\u044b\u0445 \u043f\u0430\u043c\u044f\u0442\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043e\u0431 \u0435\u0451 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0438\u043b\u0438 \u043e \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f\u0445 \u043e \u0432\u044b\u0437\u043e\u0432\u0430\u0445. <\/p>\n<p>  \u041d\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0432 <a href=\"https:\/\/www.youtube.com\/watch?v=brE_dyedGm0\">\u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0435\u0433\u043e \u043b\u0435\u043a\u0446\u0438\u0439<\/a> \u043e Haskell \u0443\u043a\u0430\u0437\u0430\u043b \u0421\u0430\u0439\u043c\u043e\u043d \u0414\u0436\u043e\u043d\u0441. \u0423 \u043d\u0435\u0433\u043e \u0431\u044b\u043b \u0441\u043b\u0430\u0439\u0434, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b\u0430 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0430 \u0441\u0442\u0440\u0435\u043b\u043a\u0430, \u0437\u0430\u043a\u0440\u0430\u0448\u0435\u043d\u043d\u0430\u044f \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u043c: \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u201cno types\u201d, \u043f\u043e\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 \u2014 \u201cHaskell\u201d, \u0432 \u043a\u043e\u043d\u0446\u0435 \u2014 \u201cCoq\u201d. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0443\u043a\u0430\u0437\u0430\u043b \u043d\u0430 Coq, \u043e\u043d \u0441\u043a\u0430\u0437\u0430\u043b \u0442\u0430\u043a\u0443\u044e \u0444\u0440\u0430\u0437\u0443: \u201cThis stresses power over usability. Right?! You need a PhD here!\u201d[1]. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u044b\u043b\u0430 \u0448\u0443\u0442\u043a\u0430, \u043c\u0430\u043d\u0442\u0430\u0440\u0430 Python \u2013 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043b\u044e\u0431\u0438\u043c\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u044d\u0442\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430. \u0418 \u0438\u0437 \u043c\u043e\u0435\u0433\u043e \u043e\u043f\u044b\u0442\u0430, \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-276390","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/276390","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=276390"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/276390\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=276390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=276390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=276390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}