{"id":320597,"date":"2021-03-31T09:00:57","date_gmt":"2021-03-31T09:00:57","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=320597"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=320597","title":{"rendered":"\u041e\u0431\u0437\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 ARM NEON \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0437\u043d\u0430\u043a\u043e\u043c \u0441 MMX\/SSE\/AVX"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<blockquote>\n<p>\u041c\u0438\u0440 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f. \u042f \u0447\u0443\u0432\u0441\u0442\u0432\u0443\u044e \u044d\u0442\u043e \u0432 \u0432\u043e\u0434\u0435, \u0447\u0443\u0432\u0441\u0442\u0432\u0443\u044e \u044d\u0442\u043e \u0432 \u0437\u0435\u043c\u043b\u0435, \u043e\u0449\u0443\u0449\u0430\u044e \u0432 \u0432\u043e\u0437\u0434\u0443\u0445\u0435.<\/p>\n<p><em>\u00ab\u0412\u043b\u0430\u0441\u0442\u0435\u043b\u0438\u043d \u043a\u043e\u043b\u0435\u0446\u00bb, \u0414\u0436\u043e\u043d \u0420\u043e\u043d\u0430\u043b\u044c\u0434 \u0420\u0443\u044d\u043b \u0422\u043e\u043b\u043a\u0438\u043d<\/em><\/p>\n<\/blockquote>\n<p>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 x86 \u0434\u043e\u043b\u0433\u0438\u0435 \u0434\u0435\u0441\u044f\u0442\u0438\u043b\u0435\u0442\u0438\u044f \u0431\u044b\u043b\u0430 \u043b\u0438\u0434\u0435\u0440\u043e\u043c \u043f\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c. \u0418 \u044d\u0442\u043e\u0442 \u0444\u0430\u043a\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u0435\u0439 \u0434\u043e\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u0436\u0435 \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043d\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 ARM \u0432\u043e\u043a\u0440\u0443\u0433 \u043d\u0430\u0441 \u0441\u0442\u0430\u043b\u043e \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435. \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0438\u0448\u0435\u0442\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043e\u0444\u0442 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438\u043b\u0438 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0441\u0442\u0430\u043d\u0446\u0438\u0439, \u0434\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043b\u0438\u0448\u044c \u0437\u043d\u0430\u043d\u0438\u0435\u043c x86. \u041d\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0441\u043a\u043b\u0430\u0434 \u0441\u0438\u043b \u0443\u0436\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0441\u043a\u043e\u0440\u043e. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u0441 ARM \u0438 \u043d\u0430\u0440\u044b\u043b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0432 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043d\u0430 \u0442\u0440\u0435\u0434 \u0432 \u0442\u0432\u0438\u0442\u0435\u0440\u0435.<\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u043d\u0435\u0442 \u0446\u0435\u043b\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0441\u0451 \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430, \u044f \u0431\u0443\u0434\u0443 \u0437\u0430\u043e\u0441\u0442\u0440\u044f\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043b\u0438\u0448\u044c \u043d\u0430 \u043e\u0442\u043b\u0438\u0447\u0438\u044f\u0445 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043b\u0438\u0441\u044c. \u041f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, SIMD, \u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u0438 \u0421\u0438 \u043d\u0430 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435.<\/p>\n<p>\u041c\u043e\u0439 \u043e\u043f\u044b\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <a href=\"https:\/\/github.com\/uploadcare\/pillow-simd\" rel=\"noopener noreferrer nofollow\">Pillow-SIMD<\/a>. \u0422\u0430\u043c \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b <a href=\"https:\/\/en.wikipedia.org\/wiki\/Intrinsic_function\" rel=\"noopener noreferrer nofollow\">\u0438\u043d\u0442\u0440\u0438\u043d\u0441\u0438\u043a\u0438<\/a> \u0432 \u043a\u043e\u0434\u0435 \u043d\u0430 \u0421\u0438 \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f 6-8-\u043a\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439.<\/p>\n<h3>\u041f\u043e\u0434 \u0447\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u0438\u0448\u0435\u043c?<\/h3>\n<p>\u0427\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u044d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u043f\u043e\u0440\u043e\u0433 \u0434\u043b\u044f \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432 ARM \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0438\u0437 \u0442\u0435\u0445, \u0447\u0442\u043e \u0431\u0443\u0434\u0443\u0442. \u0412 x86 \u0435\u0441\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043c\u0430\u043d\u0434, \u0435\u0441\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f (\u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 SSE, AVX, \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f \u0438\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f) \u0438 \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c (32 \u0438\u043b\u0438 64 \u0431\u0438\u0442\u0430). \u0412 ARM \u0436\u0435, <a href=\"https:\/\/en.wikipedia.org\/wiki\/ARM_architecture#Cores\" rel=\"noopener noreferrer nofollow\">\u0437\u0430\u0433\u0438\u0431\u0430\u0439\u0442\u0435 \u043f\u0430\u043b\u044c\u0446\u044b<\/a>:<\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u0442\u044c <strong>\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b<\/strong>, \u043a\u043e\u0438\u0445 \u0431\u043e\u043b\u0435\u0435 20. \u041d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u043d\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a: ARMv7-M, ARMv8-R, ARMv8.3-A.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u0442\u044c <strong>\u043c\u0438\u043a\u0440\u043e\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/strong>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: Cortex-R4, Cortex-A76.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u0442\u044c <strong>\u043f\u0440\u043e\u0444\u0430\u0439\u043b<\/strong>: Classic, Microcontroller, Real-time, Application.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 <strong>\u043d\u0430\u0431\u043e\u0440\u044b \u043a\u043e\u043c\u0430\u043d\u0434<\/strong>! A32, A64, Thumb, Thumb2.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, <strong>\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f<\/strong> \u043d\u0430\u0431\u043e\u0440\u0430 \u043a\u043e\u043c\u0430\u043d\u0434: SIMD, NEON, SVE.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0443 \u0438 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0434\u0435\u043b\u0430\u0441\u044c <strong>\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c<\/strong>: AArch32 \u0438 AArch64.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u044f \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0442\u0443 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f, \u044f \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0443 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0438 \u0443\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c. \u0412\u0441\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 <strong>\u043f\u0440\u043e\u0444\u0430\u0439\u043b\u043e\u0432<\/strong>. Classic \u2014 \u044d\u0442\u043e \u043f\u0440\u044f\u043c \u0441\u043e\u0432\u0441\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u043a, \u0442\u0430\u043a\u043e\u0435 \u0432\u044b \u0432\u0440\u044f\u0434 \u043b\u0438 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u0435. \u0418\u0437 \u0442\u0440\u0451\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0430\u043c\u043e\u0435 \u0445\u043e\u0434\u043e\u0432\u043e\u0435 \u2014 \u044d\u0442\u043e Application. \u0412\u0441\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u044b, \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u044d\u0442\u043e Application. \u041f\u0440\u043e\u0444\u0430\u0439\u043b \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0442\u0440\u0430\u0436\u0451\u043d \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438 <strong>\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b<\/strong> \u0432 \u0432\u0438\u0434\u0435 \u043f\u043e\u0441\u0442\u0444\u0438\u043a\u0441\u0430 (A, M, R). \u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0435 \u2014 ARMv7 \u0438 ARMv8, \u0437\u0430\u0442\u043e \u0443 ARMv8 \u0432\u044b\u0448\u043b\u043e \u0443\u0436\u0435 6 \u043c\u0438\u043d\u043e\u0440\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u043e\u0436\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430\u043c\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, ARMv8.2-A). \u041f\u0440\u0438\u0447\u0451\u043c 64-\u0431\u0438\u0442\u043d\u0430\u044f <strong>\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c<\/strong> \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 ARMv8. \u041e\u0434\u043d\u0430\u043a\u043e ARMv8-A \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 64-\u0431\u0438\u0442\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430 \u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u0430 \u0432\u043e\u0442 ARMv8.1-A \u0443\u0436\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u043d\u0438\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0447\u0438\u043f\u0430 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043c, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0441\u043e\u0444\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0442\u043e <strong>\u043c\u0438\u043a\u0440\u043e\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/strong> \u0443\u0436\u0435 \u043d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0447\u0438\u043f\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0437\u043d\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0435\u0448\u0430 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u044b\u043f\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0438 \u043a\u0430\u043a\u0438\u0435 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0447\u0438\u043f. \u041f\u0440\u0438\u0447\u0435\u043c, \u0431\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u043a \u043c\u0438\u043a\u0440\u043e\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043e\u0442 \u0441\u0430\u043c\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 ARM (\u043e\u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f Cortex \u0438 \u0441\u043b\u0435\u0434\u043e\u043c \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u0441\u0442\u0444\u0438\u043a\u0441 \u043f\u0440\u043e\u0444\u0430\u0439\u043b\u0430), \u0442\u0430\u043a \u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0430\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f Apple Firestorm, Neoverse N1 \u0438\u043b\u0438 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p><strong>\u041d\u0430\u0431\u043e\u0440 \u043a\u043e\u043c\u0430\u043d\u0434 <\/strong>A32 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 32-\u0431\u0438\u0442\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 AArch32, \u0430 A64 \u0432 64-\u0431\u0438\u0442\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 AArch64. \u0418 \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0437\u0430\u0447\u0435\u043c \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u0432\u0435\u0449\u0438. \u041d\u043e \u0434\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e A32 \u2014 \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432 32-\u0431\u0438\u0442\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435. A32 \u0438 A64 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 32 \u0431\u0438\u0442\u0430 \u0434\u043b\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0430 AArch32 \u0432\u044b\u0448\u0435\u043b \u043e\u0447\u0435\u043d\u044c \u0434\u0430\u0432\u043d\u043e \u0438 \u043c\u043d\u043e\u0433\u0438\u043c \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0440\u0430\u0441\u0442\u043e\u0447\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u0438 \u0442\u043e\u0433\u0434\u0430 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Thumb \u0438 Thumb2. \u0412 \u043d\u0438\u0445 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0438 16 \u0431\u0438\u0442. \u0414\u043b\u044f AArch64 \u0443\u0436\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435 \u0437\u0430\u0432\u0435\u0437\u043b\u0438, \u0432 \u043d\u0451\u043c \u043b\u044e\u0431\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 32 \u0431\u0438\u0442\u0430.<\/p>\n<p>\u041d\u0443 \u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, <strong>\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f<\/strong> \u043d\u0430\u0431\u043e\u0440\u0430 \u043a\u043e\u043c\u0430\u043d\u0434. \u0412\u043e\u043e\u0431\u0449\u0435, \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f VFPv1-VFPv5 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439, \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u044f \u0442\u0430\u043a \u0438 \u043d\u0435 \u0441\u043c\u043e\u0433 \u043f\u043e\u043d\u044f\u0442\u044c. \u041a\u0430\u043a \u0438 \u0432 x86, \u0432 ARM \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0437\u0430\u0432\u0435\u0437\u043b\u0438 \u043d\u0435 \u0441\u0440\u0430\u0437\u0443. \u0412 ARMv6 \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 SIMD (\u0442\u0430\u043a \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f), \u0430 \u0432 ARMv7 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 128-\u0431\u0438\u0442\u043d\u044b\u0439 advanced SIMD, \u043e\u043d \u0436\u0435 ASIMD, \u043e\u043d \u0436\u0435 NEON, \u043f\u043e \u0441\u0443\u0442\u0438 \u043f\u0440\u044f\u043c\u043e\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 SSE \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439. \u041e \u043d\u0451\u043c \u044f \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e. \u0410 \u0432\u043e\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0430 AVX \u0432 ARM \u043d\u0435\u0442, \u0442\u0430\u043c \u043f\u043e\u0448\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0451\u043c. \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0435 \u043f\u044f\u0442\u044c \u043b\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0451 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c, \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 Scalable Vector Extension (SVE), \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u043d\u0430 \u0447\u0438\u043f\u0430\u0445, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0445 \u0440\u0430\u0437\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432. \u041d\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u043a\u0430\u043a \u044f \u043f\u043e\u043d\u044f\u043b, SVE \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0432 Fugaku supercomputer.<\/p>\n<h2>\u042d\u0442\u043e \u0436\u0435 \u0443\u0436\u0430\u0441?<\/h2>\n<p>\u041d\u0443, \u0432\u043e\u043e\u0431\u0449\u0435, \u0434\u0430, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043d\u0430 \u043b\u044e\u0431\u043e\u043c ARM \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435, \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u0441 x86. \u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430 \u043d\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e NEON, \u043d\u043e \u0434\u0430\u0436\u0435 64-\u0431\u0438\u0442\u043d\u043e\u0439 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0438 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439. \u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e, \u043a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0443 ARM \u043d\u0435\u0442 \u0442\u043e\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0430\u0448 \u043a\u043e\u0434. \u042d\u0442\u043e \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u0435\u0436\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440. \u0418 \u0435\u0449\u0451, \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u044d\u0442\u043e \u0432\u0441\u0451 \u0436\u0435 \u0431\u0443\u0434\u0435\u0442 AArch64 \u0441\u0438\u0441\u0442\u0435\u043c\u0430. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u0440\u0443\u043a\u0430\u043c\u0438.<\/p>\n<p>AArch64 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 ARMv8. <a href=\"https:\/\/en.wikipedia.org\/wiki\/AArch64#ARMv8-A\" rel=\"noopener noreferrer nofollow\">ARMv8-A<\/a> \u0443\u0436\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 VFPv4 (64-\u0431\u0438\u0442\u043d\u044b\u0439 FPU), NEON \u0438 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438. \u0410 SVE \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0435\u0449\u0451 \u043f\u0430\u0440\u0443 \u043b\u0435\u0442. \u0423 NEON \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u043d\u0435\u0442. \u0422\u0430\u043a \u0436\u0435 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439: A64. \u0410 \u043c\u0438\u043a\u0440\u043e\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0438 \u043d\u0430 \u0447\u0442\u043e \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u043f\u043e\u0434 ARM (\u0442\u043e\u0447\u043d\u0435\u0435 \u043f\u043e\u0434 AArch64) \u0434\u0430\u0436\u0435 \u043f\u0440\u043e\u0449\u0435, \u0447\u0435\u043c \u043f\u043e\u0434 x86. \u041d\u0438\u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u0435 `#ifdef __aarch64__` \u0438 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c \u0432\u0441\u0435\u043c, \u0447\u0435\u043c \u0445\u043e\u0442\u0438\u0442\u0435.<\/p>\n<h3>\u0417\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 NEON<\/h3>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e x86 \u0438 ARM \u043c\u0430\u043b\u043e \u0447\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f. \u0418 \u0442\u0430\u043c \u0438 \u0442\u0430\u043c \u0435\u0441\u0442\u044c \u043e\u0431\u0449\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0438 SIMD. \u0414\u043b\u044f \u043e\u0431\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b <a href=\"https:\/\/developer.arm.com\/documentation\/102374\/0101\/Registers-in-AArch64---general-purpose-registers\" rel=\"noopener noreferrer nofollow\">General-purpose registers<\/a> \u0432 AArch64 Instruction Set Architecture. \u0418 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u043f\u043e\u043b\u043d\u043e\u043c\u0443 \u0432\u0432\u043e\u0434\u043d\u043e\u043c\u0443 \u0433\u0430\u0439\u0434\u0443 \u2014 <a href=\"https:\/\/developer.arm.com\/architectures\/instruction-sets\/simd-isas\/neon\/neon-programmers-guide-for-armv8-a\/coding-for-neon\" rel=\"noopener noreferrer nofollow\">Coding for Neon<\/a>.<\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0431\u0440\u043e\u0441\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u043b\u0430\u0437\u0430 \u2014 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435. \u0418 \u044d\u0442\u043e \u0434\u0430\u0436\u0435 \u0438\u043c\u0435\u0435\u0442 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"css\">LD3 { V0.16B, V1.16B, V2.16B }, [x0]<\/code><\/pre>\n<p>\u0422\u0443\u0442 \u043d\u0430\u0434\u043e \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u0430\u043c\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u043d\u0435 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b, \u0442\u0438\u043f \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438.<\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u0443\u0434\u0438\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043b-\u0432\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0432\u0441\u044f\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0434\u0432\u0438\u0433\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0441\u0434\u0432\u0438\u0433 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0432\u0435\u043a\u0442\u043e\u0440\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/24b\/dfe\/a55\/24bdfea557cfb4dfb2397bfadd1045ed.png\" width=\"1922\" height=\"632\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 SSE, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435\u0442. \u041f\u043e\u0445\u043e\u0436\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 AVX2 \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438 <code>vpsrlv[dq]<\/code>, <code>vpsllv[dq]<\/code>, <code>vpsravd<\/code>. \u041d\u043e, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432 NEON \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0441\u0434\u0432\u0438\u0433\u0430\u044e\u0442 \u0432 \u043e\u0431\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u043d\u0430\u043a\u0430. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0432 AVX2 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0432\u0438\u043d\u0443\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e 32-\u0431\u0438\u0442\u043d\u044b\u0435 \u0438 64-\u0431\u0438\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u043a\u0443\u0441\u043d\u043e\u0441\u0442\u0438 NEON \u043d\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0441\u0434\u0432\u0438\u0433\u0430 \u0435\u0441\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0421\u0434\u0432\u0438\u0433 \u0438 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u043c<\/p>\n<\/li>\n<li>\n<p>\u0421\u0434\u0432\u0438\u0433 \u0432\u043f\u0440\u0430\u0432\u043e \u0441 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435\u043c<\/p>\n<\/li>\n<li>\n<p>\u0421\u0434\u0432\u0438\u0433 \u0441 \u0441\u0430\u0442\u0443\u0440\u0430\u0446\u0438\u0435\u0439<\/p>\n<\/li>\n<li>\n<p>\u0421\u0434\u0432\u0438\u0433 \u0441 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435\u043c \u0438\u043b\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u0438<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u0447\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0438 \u0432\u0441\u0451 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043b\u044e\u0431\u044b\u043c \u0442\u0438\u043f\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e\u043f\u0440\u0430\u0432\u044c\u0442\u0435, \u043d\u043e \u0432\u0440\u043e\u0434\u0435 SSE \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c.<\/p>\n<p>\u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0440\u0438\u043d\u0441\u0438\u043a\u043e\u0432, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 SSE\/AVX, \u0433\u0434\u0435 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0434\u043b\u044f float \u0438 double (<code>__m128<\/code>&nbsp;\u0438 <code>__m128d<\/code>), \u0432 NEON \u0435\u0441\u0442\u044c \u0442\u0438\u043f\u044b \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0446\u0435\u043b\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u043d\u0432\u0435\u043d\u0446\u0438\u0438 <a href=\"https:\/\/en.wikipedia.org\/wiki\/C_data_types#Fixed-width_integer_types\" rel=\"noopener noreferrer nofollow\">stdint.h<\/a>.<\/p>\n<pre><code class=\"cpp\">uint8x16_t Sx4 = vld1q_u8(&amp;Srgba[i]); uint8x16_t Dx4 = vld1q_u8(&amp;Drgba[i]); uint32x4_t Sax4 = vshrq_n_u32((uint32x4_t) Sx4, 24); uint32x4_t Dax4 = vshrq_n_u32((uint32x4_t) Dx4, 24);<\/code><\/pre>\n<p>\u0422\u0443\u0442 \u043f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b \u0438\u043c\u0435\u044e\u0442 \u0442\u0438\u043f \u00ab16 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0445 int8\u00bb, \u0432\u0442\u043e\u0440\u044b\u0435 \u2014 \u00ab4 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0445 int32\u00bb. \u041d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u0434\u0440\u0443\u0433 \u043a \u0434\u0440\u0443\u0433\u0443. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0438\u043f\u044b \u0432\u0440\u043e\u0434\u0435 <code>uint8x16x3_t<\/code>&nbsp;\u2014 \u044d\u0442\u043e \u0442\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u043f\u043e\u0434\u0440\u044f\u0434. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0442\u0430\u043a\u0438\u0435 \u0442\u0438\u043f\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<h3>\u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a \u0438\u043d\u0442\u0440\u0438\u043d\u0441\u0438\u043a\u043e\u0432<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0434\u0435\u0441\u044f\u0442\u0438\u043b\u0435\u0442\u0438\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 SIMD-\u043a\u043e\u0434 \u0434\u043b\u044f x86, \u0432\u044b \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c <a href=\"https:\/\/software.intel.com\/sites\/landingpage\/IntrinsicsGuide\/\" rel=\"noopener noreferrer nofollow\">Intel Intrinsics Guide<\/a>. \u042d\u0442\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a \u0441 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c, \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0438 \u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438. \u0418 \u0434\u0430\u0436\u0435 \u0435\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0437\u0430\u0434\u0435\u0440\u0436\u0435\u043a \u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u044f\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 Intel.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/887\/d55\/702\/887d5570287fce3e7b2005391b5460c1.png\" width=\"2132\" height=\"1308\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u043d\u0451\u043c \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e\u0435, \u043d\u043e \u0438 \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0435, \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u044f \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0438 \u0447\u0438\u0442\u0430\u044f \u0432\u0441\u0451 \u043f\u043e\u0434\u0440\u044f\u0434.<\/p>\n<p>\u0423 ARM \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u043c \u044d\u0442\u043e\u0433\u043e \u0433\u0430\u0439\u0434\u0430 \u0441\u043b\u0443\u0436\u0438\u0442 <a href=\"https:\/\/developer.arm.com\/architectures\/instruction-sets\/simd-isas\/neon\/intrinsics\" rel=\"noopener noreferrer nofollow\">Neon Intrinsics Reference<\/a>. \u0418 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u043e\u043b\u044c \u0438 \u0443\u043d\u0438\u0436\u0435\u043d\u0438\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/40f\/6a4\/d53\/40f6a4d532cc6b2e97a7c65aa34c433e.png\" width=\"2126\" height=\"1308\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u041d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0438\u0441\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e 30 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0441\u043d\u0438\u0437\u0443 \u0435\u0441\u0442\u044c \u043f\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u0430\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f, \u0442\u043e\u0436\u0435 \u0441 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u044d\u043a\u0440\u0430\u043d \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0442\u0440\u0438 \u0430\u0431\u0437\u0430\u0446\u0430 \u0442\u0435\u043a\u0441\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u043e\u043c\u0430\u0442\u044b\u0432\u0430\u0442\u044c. \u0410 \u043f\u0440\u043e\u043c\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e, \u0432\u0435\u0434\u044c \u043b\u044e\u0431\u043e\u0439 \u0447\u0438\u0445 \u2014 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 &#171;mul&#187; \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f 50 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0444\u0443\u043d\u043a\u0446\u0438\u0439! \u0422\u043e \u0435\u0441\u0442\u044c 1500 \u0448\u0442\u0443\u043a. \u0417\u043d\u0430\u0435\u0442\u0435, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0435\u0441\u0442\u044c \u0441\u043b\u043e\u0432\u043e accu<strong>mul<\/strong>ate!<\/p>\n<\/li>\n<li>\n<p>\u0423 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0444\u043b\u0430\u0433\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u043c\u0435\u043d\u044f\u044e\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u0447\u0442\u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043a\u043e\u043b\u043e 12. \u0418 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041f\u043e \u0444\u0430\u043a\u0442\u0443 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0435 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0430 \u0434\u043b\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0435\u043c \u043e\u0434\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0434\u0440\u0443\u0433\u043e\u0439, \u043f\u043e\u0447\u0442\u0438 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435, \u043e\u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 \u044d\u0442\u043e\u0442 \u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434? \u041e\u043d \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043e\u0447\u0435\u043d\u044c \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u0435\u043d \u0438 \u0437\u0430\u043f\u0443\u0442\u0430\u043d.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043f\u043e\u043a\u0430 \u044f \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043d\u0430\u0448\u0435\u043b \u0442\u0430\u043a\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u0438\u0449\u0443 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0432 <a href=\"https:\/\/developer.arm.com\/documentation\/ddi0596\/2020-12\/SIMD-FP-Instructions\" rel=\"noopener noreferrer nofollow\">\u0430\u043b\u0444\u0430\u0432\u0438\u0442\u043d\u043e\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0441 \u043a\u0440\u0430\u0442\u043a\u0438\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c<\/a>, \u0430 \u0443\u0436\u0435 \u043f\u043e\u0442\u043e\u043c \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0438\u0449\u0443 \u0432 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0435 \u0438\u043d\u0442\u0440\u0438\u043d\u0441\u0438\u043a\u0438.<\/p>\n<h3>\u041f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c NEON \u0432 \u0434\u0435\u043b\u0435. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043a\u043e\u0434\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u044f \u0432\u044b\u0431\u0440\u0430\u043b <a href=\"https:\/\/habr.com\/ru\/post\/468067\/\" rel=\"noopener noreferrer nofollow\">\u0430\u043b\u044c\u0444\u0430-\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0442\u0438\u043d\u0433 \u0441 premultiplied alpha<\/a>. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u043e\u0439:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"R_{rgba} = S_{rgba} + D_{rgba} \u00d7 (1 \u2212 S_a)\" alt=\"R_{rgba} = S_{rgba} + D_{rgba} \u00d7 (1 \u2212 S_a)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b4e\/9bf\/438\/b4e9bf43857e5b78c8fb2fc2342705ca.svg\" width=\"230\" height=\"20\"><\/p>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u043d\u0430 SIMD:<\/p>\n<pre><code class=\"cpp\">#include &lt;stdint.h&gt; #include &lt;stddef.h&gt;  #define SHIFTFORDIV255(a)\\     ((((a) &gt;&gt; 8) + a) &gt;&gt; 8)  #define DIV255(a)\\     SHIFTFORDIV255(a + 0x80)  static void opSourceOver_premul(uint8_t* restrict Rrgba,                     const uint8_t* restrict Srgba,                     const uint8_t* restrict Drgba, size_t len) {     size_t i = 0;     for (; i &lt; len*4; i += 4) {         uint8_t Sa = Srgba[i + 3];         Rrgba[i + 0] = DIV255(Srgba[i + 0] * 255 + Drgba[i + 0] * (255 - Sa));         Rrgba[i + 1] = DIV255(Srgba[i + 1] * 255 + Drgba[i + 1] * (255 - Sa));         Rrgba[i + 2] = DIV255(Srgba[i + 2] * 255 + Drgba[i + 2] * (255 - Sa));         Rrgba[i + 3] = DIV255(Srgba[i + 3] * 255 + Drgba[i + 3] * (255 - Sa));     } }<\/code><\/pre>\n<p>\u0412\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0430\u0434 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438. 1 &#8212; S<sub>a<\/sub> \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 <code>255 - Sa<\/code>. \u0422\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043c\u044b \u0443\u043c\u043d\u043e\u0436\u0430\u0435\u043c \u043d\u0430 \u0431\u0430\u0439\u0442, \u0442\u043e \u0438 \u043b\u0435\u0432\u0443\u044e \u043d\u0443\u0436\u043d\u043e \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c. \u0410 \u043f\u043e\u0441\u043b\u0435 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 255, \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043c\u0430\u043a\u0440\u043e\u0441 <code>DIV255<\/code>&nbsp;\u043f\u0443\u0442\u0451\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0434\u0432\u0438\u0433\u043e\u0432.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u044f \u0431\u0443\u0434\u0443 \u043d\u0430 Raspberry Pi 4, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u0434 AArch64. \u0427\u0435\u043c \u0431\u043e\u0433\u0430\u0442\u044b, \u0442\u0435\u043c \u0438 \u0440\u0430\u0434\u044b, \u043a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0441\u044f. \u041f\u0440\u0438\u0447\u0435\u043c \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0438\u043a\u043e\u0432\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0431\u0435\u0437 \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0431\u0443\u0434\u0443 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0435 \u0434\u043b\u0438\u043d\u043e\u0439 1000 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439, \u0442\u043e \u0435\u0441\u0442\u044c \u0432\u0441\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043e 12 \u041a\u0431 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430 \u043e\u0434\u0438\u043d \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>\u042f \u0431\u0443\u0434\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c Clang-9, \u0442.\u043a. \u043e\u043d \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0432\u044b\u0434\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043a\u043e\u0434, \u0447\u0435\u043c GCC. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0447\u0438\u0441\u0442\u044b\u0439 \u043a\u043e\u0434, \u0431\u0435\u0437 \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<pre><code class=\"diff\">$ clang-9 -Wall -O2 -o run.64 main.c -fno-tree-vectorize &amp;&amp; .\/run.64 Time elapsed: 0.189449 Time elapsed: 0.189280 Time elapsed: 0.189272 Time elapsed: 0.189272<\/code><\/pre>\n<p>\u0412\u0440\u0435\u043c\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445 \u0434\u043b\u044f 20 \u0442\u044b\u0441\u044f\u0447 \u043f\u0440\u043e\u0433\u043e\u043d\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u0434\u043b\u0438\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a 1000 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439. \u0422\u043e \u0435\u0441\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 105 \u041c\u041f\u0445\/\u0441. \u0418 \u0432\u043e\u043e\u0431\u0449\u0435-\u0442\u043e \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u043e, \u0434\u0430\u0436\u0435 \u0434\u043b\u044f Raspberry Pi. \u0415\u0441\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0447\u0443\u0442\u044c \u043b\u0443\u0447\u0448\u0435.<\/p>\n<pre><code class=\"diff\">$ clang-9 -Wall -O2 -o run.64 main.c -ftree-vectorize &amp;&amp; .\/run.64 Time elapsed: 0.082168 Time elapsed: 0.082341 Time elapsed: 0.082135 Time elapsed: 0.082147<\/code><\/pre>\n<p>\u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0432 2.3 \u0440\u0430\u0437\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0451, \u043d\u0430 \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<h3>NEON-\u0432\u0435\u0440\u0441\u0438\u044f<\/h3>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 NEON \u2014 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <code>arm_neon.h<\/code>. \u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0435\u0441\u044c, \u044d\u0442\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u0435\u0435, \u0447\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0433\u0443\u0433\u043b\u0438\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0430\u0449\u0438\u0435 \u0438\u043c\u0435\u043d\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0432\u0440\u043e\u0434\u0435 <code>smmintrin.h<\/code>.<\/p>\n<p><strong>1. \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430\/\u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435.<\/strong> \u0425\u043e\u0442\u044f \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043a\u043e\u0434 \u0445\u043e\u0440\u043e\u0448\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0446\u0438\u043a\u043b\u0430, \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0439\u0442\u0438 \u0447\u0443\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438 128-\u0431\u0438\u0442\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f \u043f\u0438\u043a\u0441\u0435\u043b\u044f\u043c\u0438.<\/p>\n<pre><code class=\"cpp\">#include &lt;stdint.h&gt; #include &lt;stddef.h&gt; #include &lt;arm_neon.h&gt;  static void opSourceOver_premul(uint8_t* restrict Rrgba,                     const uint8_t* restrict Srgba,                     const uint8_t* restrict Drgba, size_t len) {     size_t i = 0;     for (; i &lt; len*4 - 12; i += 16) {         uint8x16_t Sx4 = vld1q_u8(&amp;Srgba[i]);         uint8x16_t Dx4 = vld1q_u8(&amp;Drgba[i]);         uint8x16_t Rx4 = vaddq_u8(Sx4, Dx4);  \/\/ Temporary stub         vst1q_u8(&amp;Rrgba[i], Rx4);     }     for (; i &lt; len*4; i += 4) {         uint8_t Sa = Srgba[i + 3];         Rrgba[i + 0] = DIV255(Srgba[i + 0] * 255 + Drgba[i + 0] * (255 - Sa));         Rrgba[i + 1] = DIV255(Srgba[i + 1] * 255 + Drgba[i + 1] * (255 - Sa));         Rrgba[i + 2] = DIV255(Srgba[i + 2] * 255 + Drgba[i + 2] * (255 - Sa));         Rrgba[i + 3] = DIV255(Srgba[i + 3] * 255 + Drgba[i + 3] * (255 - Sa));     } }<\/code><\/pre>\n<p>\u0422\u0443\u0442 \u043f\u043e\u043a\u0430 \u0447\u0442\u043e <code>Rx4<\/code>&nbsp;\u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u041d\u043e \u0437\u0430\u0442\u043e \u043a\u043e\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0438 \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043a\u0438\u043d\u0443\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u043e\u0434 \u043d\u0430 NEON, \u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442:<\/p>\n<pre><code class=\"diff\">$ clang-9 -Wall -O2 -o run.64 main.c &amp;&amp; .\/run.64 Time elapsed: 0.008030 Time elapsed: 0.007872 Time elapsed: 0.007859 Time elapsed: 0.008629<\/code><\/pre>\n<p>8 \u043c\u0441 \u0438\u043b\u0438 2500 \u041c\u041f\u0445\/\u0441! <s>\u0412\u043e\u0442 \u043c\u044b \u0438 \u0443\u0441\u043a\u043e\u0440\u0438\u043b\u0438 \u043a\u043e\u0434 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e NEON \u0432 25 \u0440\u0430\u0437.<\/s><\/p>\n<p><strong>2. \u0412\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0430\u043b\u044c\u0444\u0430-\u043a\u0430\u043d\u0430\u043b\u0430.<\/strong> \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u043d\u0443\u0436\u043d\u043e \u0438\u0437 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 <code>Sx4<\/code>&nbsp;\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0430\u043b\u044c\u0444\u0430-\u043a\u0430\u043d\u0430\u043b\u0430. \u041e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430 3, 7, 11 \u0438 15 \u043f\u043e\u0437\u0438\u0446\u0438\u0438. \u041f\u0440\u0438\u0447\u0435\u043c \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0445 \u0441\u0440\u0430\u0437\u0443 \u0440\u0430\u0437\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u043d\u0430 \u0432\u0441\u0435 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0435 \u0431\u0430\u0439\u0442\u044b \u044d\u0442\u043e\u0433\u043e \u0436\u0435 \u043f\u0438\u043a\u0441\u0435\u043b\u044f. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u0430\u043d\u0434 \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u0439\u0442\u043e\u0432, \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u0441\u0434\u0435\u043b\u0430\u043b \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/developer.arm.com\/architectures\/instruction-sets\/simd-isas\/neon\/intrinsics?search=vqtbl1q_u8\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435<\/a>. \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0447\u0435\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 255.<\/p>\n<pre><code class=\"cpp\">uint8x16_t vsubq_u8 (uint8x16_t a, uint8x16_t b); uint8x16_t vdupq_n_u8 (uint8_t value); uint8x16_t vqtbl1q_u8 (uint8x16_t t, uint8x16_t idx);  uint8x16_t Sax4 = vsubq_u8(     vdupq_n_u8(255),     vqtbl1q_u8(Sx4, (uint8x16_t){3,3,3,3, 7,7,7,7, 11,11,11,11, 15,15,15,15}) );<\/code><\/pre>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b \u043f\u0440\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f \u0438\u0437 255 \u043d\u0430 \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u043e\u0442\u0440\u0438\u0446\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043b\u043e\u0433\u0438\u0447\u043d\u043e.<\/p>\n<p><strong>3. \u0423\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435.<\/strong> \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b <code>Sx4<\/code>&nbsp;\u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u043d\u0430 255, \u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b <code>Dx4<\/code>&nbsp;\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0430\u043b\u044c\u0444\u044b \u0438\u0437 <code>Sax4<\/code>. \u0412\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f 8-\u0431\u0438\u0442\u043d\u044b\u0435.<\/p>\n<p>\u0412 NEON \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0432\u0438\u0434\u0430 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f: \u043b\u0438\u0431\u043e \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>vmulq_*<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0442 \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0438 \u043e\u0442\u0434\u0430\u044e\u0442 \u043d\u0438\u0436\u043d\u044e\u044e \u0447\u0430\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u043b\u0438\u0431\u043e \u044d\u0442\u043e <code>vmull_*<\/code> \u0438 <code>vmull_high_*<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0434 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440\u0430, \u043d\u043e \u0437\u0430\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0438 \u043e\u0442\u0434\u0430\u044e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0446\u0435\u043b\u0438\u043a\u043e\u043c.<\/p>\n<pre><code class=\"cpp\">uint16x8_t vmull_u8 (uint8x8_t a, uint8x8_t b); uint8x8_t vget_low_u8 (uint8x16_t a); uint8x8_t vdup_n_u8 (uint8_t value); uint16x8_t vmull_high_u8 (uint8x16_t a, uint8x16_t b);  uint16x8_t Rx2lo = vmull_u8(vget_low_u8(Sx4), vdup_n_u8(255)); uint16x8_t Rx2hi = vmull_high_u8(Sx4, vdupq_n_u8(255));<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f <code>Dx4<\/code> \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b&nbsp;\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u043e \u0443 \u043d\u0438\u0445 \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u0440\u0430\u0437\u043d\u043e\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0443\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442. \u042d\u0442\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u043c. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u043e\u0434\u043d\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e.<\/p>\n<pre><code class=\"cpp\">uint16x8_t vmlal_u8 (uint16x8_t a, uint8x8_t b, uint8x8_t c); uint16x8_t vmlal_high_u8 (uint16x8_t a, uint8x16_t b, uint8x16_t c);  Rx2lo = vmlal_u8(Rx2lo, vget_low_u8(Dx4), vget_low_u8(Sax4)); Rx2hi = vmlal_high_u8(Rx2hi, Dx4, Sax4);<\/code><\/pre>\n<p><strong>4. \u0414\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 255<\/strong>. \u041d\u0443 \u0447\u0442\u043e, \u043f\u0440\u0438\u0448\u043b\u0430 \u043f\u043e\u0440\u0430 \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0435\u043b\u0435 \u043a\u0440\u0443\u0442\u044b\u0435 \u0441\u0434\u0432\u0438\u0433\u0438. \u0412 \u0421\u0438-\u0432\u0435\u0440\u0441\u0438\u0438 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cpp\">#define DIV255(a)\\     ((((a + 0x80) &gt;&gt; 8) + a + 0x80) &gt;&gt; 8)<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u2014 \u0441\u0434\u0432\u0438\u0433\u0438 \u0441 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e \u0441\u0434\u0432\u0438\u0433\u0430 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 \u0432 \u043e\u0434\u0438\u043d \u0431\u0438\u0442 \u043f\u0440\u0430\u0432\u0435\u0435 \u0441\u0434\u0432\u0438\u0433\u0430.  \u041f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u0443\u0436\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"cpp\">#define ROUND_SHR(a, n)\\     ((a + (1&lt;&lt;(n-1))) &gt;&gt; n) #define DIV255(a)\\     ROUND_SHR(ROUND_SHR(a, 8) + a, 8)<\/code><\/pre>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e <code>ROUND_SHR(a, 8) + a<\/code>. \u042d\u0442\u043e \u0436\u0435 \u0441\u0434\u0432\u0438\u0433 \u0441 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u043c <code>vrsraq_n_u16<\/code>, \u043f\u043e\u043c\u043d\u0438\u0442\u0435? \u041d\u0443 \u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0441\u0434\u0432\u0438\u0433 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0437\u0430\u043e\u0434\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u043b \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u0432\u0435\u0434\u044c \u0442\u043e\u0442 \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0442\u044c 255. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u043e\u0436\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043d\u0438\u0436\u043d\u044e\u044e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u0432\u0435\u043a\u0442\u043e\u0440\u0430, \u043d\u043e \u0438 \u0432 \u0432\u0435\u0440\u0445\u043d\u044e\u044e (<code>vqrshrn_high_n_u16<\/code>).<\/p>\n<pre><code class=\"cpp\">uint8x16_t vqrshrn_high_n_u16 (uint8x8_t r, uint16x8_t a, const int n); uint8x8_t vqrshrn_n_u16 (uint16x8_t a, const int n); uint16x8_t vrsraq_n_u16 (uint16x8_t a, uint16x8_t b, const int n);  uint8x16_t Rx4 = vqrshrn_high_n_u16(     vqrshrn_n_u16(vrsraq_n_u16(Rx2lo, Rx2lo, 8), 8),     vrsraq_n_u16(Rx2hi, Rx2hi, 8), 8);<\/code><\/pre>\n<p>\u0412\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435:<\/p>\n<pre><code class=\"cpp\">static void opSourceOver_premul(uint8_t* restrict Rrgba,                     const uint8_t* restrict Srgba,                     const uint8_t* restrict Drgba, size_t len) {     size_t i = 0;      for (; i &lt; len*4 - 12; i += 16) {         uint8x16_t Sx4 = vld1q_u8(&amp;Srgba[i]);         uint8x16_t Dx4 = vld1q_u8(&amp;Drgba[i]);          uint8x16_t Sax4 = vsubq_u8(             vdupq_n_u8(255),             vqtbl1q_u8(Sx4, (uint8x16_t){3,3,3,3, 7,7,7,7, 11,11,11,11, 15,15,15,15})         );          uint16x8_t Rx2lo = vmull_u8(vget_low_u8(Sx4), vdup_n_u8(255));         uint16x8_t Rx2hi = vmull_high_u8(Sx4, vdupq_n_u8(255));          Rx2lo = vmlal_u8(Rx2lo, vget_low_u8(Dx4), vget_low_u8(Sax4));         Rx2hi = vmlal_high_u8(Rx2hi, Dx4, Sax4);          uint8x16_t Rx4 = vqrshrn_high_n_u16(             vqrshrn_n_u16(vrsraq_n_u16(Rx2lo, Rx2lo, 8), 8),             vrsraq_n_u16(Rx2hi, Rx2hi, 8), 8);         vst1q_u8(&amp;Rrgba[i], Rx4);     }      for (; i &lt; len*4; i += 4) {         uint8_t Sa = Srgba[i + 3];         Rrgba[i + 0] = DIV255(Srgba[i + 0] * 255 + Drgba[i + 0] * (255 - Sa));         Rrgba[i + 1] = DIV255(Srgba[i + 1] * 255 + Drgba[i + 1] * (255 - Sa));         Rrgba[i + 2] = DIV255(Srgba[i + 2] * 255 + Drgba[i + 2] * (255 - Sa));         Rrgba[i + 3] = DIV255(Srgba[i + 3] * 255 + Drgba[i + 3] * (255 - Sa));     } }<\/code><\/pre>\n<p>\u041d\u0443 \u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0440\u0430\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443:<\/p>\n<pre><code class=\"diff\">$ clang-9 -Wall -O2 -o run.64 main.c &amp;&amp; .\/run.64 Time elapsed: 0.047613 Time elapsed: 0.047455 Time elapsed: 0.047452 Time elapsed: 0.047448<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0432 1,75 \u0440\u0430\u0437 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0430\u0432\u0442\u043e\u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0438 \u0432 4 \u0440\u0430\u0437\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0432\u0435\u0440\u0441\u0438\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u0431\u0435\u0437 \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 (\u043a\u0441\u0442\u0430\u0442\u0438, \u0434\u043b\u044f GCC \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f 5,5 \u0440\u0430\u0437\u0430).<\/p>\n<h3>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0442\u0435\u043d\u0438\u044f<\/h3>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0436\u0438\u0437\u043d\u0435\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434 NEON, \u043e\u0434\u043d\u0430\u043a\u043e, \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 (\u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 4 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439, 8 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0439 \u0437\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e) \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u0436\u0438\u0434\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c.<\/p>\n<p>\u041a\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 Broadcom BCM2835, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0442\u044c \u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439, \u043d\u043e \u0441\u0443\u043f\u0435\u0440\u0431\u044e\u0434\u0436\u0435\u0442\u043d\u044b\u0439. \u041c\u043e\u0436\u043d\u043e \u043e\u0436\u0438\u0434\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0430 \u0442\u0430\u043a\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u0435\u0448\u0443 L1. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u0440\u0435\u0434\u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442, \u0442.\u043a. \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0436\u0435 \u043b\u0435\u0436\u0430\u0442 \u0432 \u0441\u0430\u043c\u043e\u043c \u0431\u043b\u0438\u0437\u043a\u043e\u043c \u043a\u0435\u0448\u0435. \u0417\u0430\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0447\u0442\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0433\u0435 \u043a\u043b\u0430\u0441\u0442\u044c \u00ab\u0432 \u043a\u0430\u0440\u043c\u0430\u043d\u00bb \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c  \u0448\u0430\u0433\u0435. \u0410 \u0438\u0437 \u043a\u0430\u0440\u043c\u0430\u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043e \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c.<\/p>\n<pre><code class=\"cpp\">    uint8x16_t Sx4_next = vld1q_u8(&amp;Srgba[0]);     uint8x16_t Dx4_next = vld1q_u8(&amp;Drgba[0]);     \/\/ for (; i &lt; len*4 - 12; i += 16) {     for (; i &lt; len*4 - 12 - 16; i += 16) {         \/\/ uint8x16_t Sx4 = vld1q_u8(&amp;Srgba[i]);         \/\/ uint8x16_t Dx4 = vld1q_u8(&amp;Drgba[i]);         uint8x16_t Sx4 = Sx4_next;         uint8x16_t Dx4 = Dx4_next;         Sx4_next = vld1q_u8(&amp;Srgba[i + 16]);         Dx4_next = vld1q_u8(&amp;Drgba[i + 16]);         ...<\/code><\/pre>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c, \u0447\u0442\u043e \u0446\u0438\u043a\u043b \u043d\u0443\u0436\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u0443 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f.<\/p>\n<pre><code class=\"diff\">$ clang-9 -Wall -O2 -o run.64 main.c &amp;&amp; .\/run.64 Time elapsed: 0.038070 Time elapsed: 0.037855 Time elapsed: 0.037834 Time elapsed: 0.037831<\/code><\/pre>\n<p>\u0413\u0438\u043f\u043e\u0442\u0435\u0437\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0432\u0435\u0440\u043d\u043e\u0439, \u044d\u0442\u043e \u0434\u0430\u043b\u043e \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u0435\u0449\u0451 25%. \u0418\u0442\u043e\u0433\u043e NEON \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0440\u043e\u0432\u043d\u043e \u0432 5 \u0440\u0430\u0437 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u043a\u043e\u0434 \u0431\u0435\u0437 \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<h3>\u0420\u0430\u0437\u0431\u043e\u0440 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430<\/h3>\n<p>\u041d\u0443 \u0447\u0442\u043e, \u043f\u043e\u0440\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u043b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440.<\/p>\n<pre><code>$ clang-9 -Wall -O2 -o main.s main.c -S<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0432\u044b\u0432\u043e\u0434 \u0443\u0436\u0435 \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439, \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c\u0438 \u0438 \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"go\">    ldr     q0, [x19]                   \/\/ Sx4 = vld1q_u8(&amp;Srgba[0])     ldr     q1, [x20]                   \/\/ Dx4 = vld1q_u8(&amp;Drgba[0])     movi    v17.2d, #0xffffffffffffffff     mov     x9, xzr .LBB0_3:     tbl     v5.16b, { v0.16b }, v16.16b \/\/ vqtbl1q_u8(Sx4, v16)     mvn     v5.16b, v5.16b              \/\/ Sax4 = vsubq_u8(vdupq_n_u8(255), v5)     ext     v6.16b, v0.16b, v0.16b, #8     umull   v3.8h, v1.8b, v5.8b         \/\/ Rx2lo = vmull_u8(Dx4, Sax4);     add     x10, x19, x9     add     x11, x20, x9     umull   v4.8h, v6.8b, v17.8b        \/\/ Rx2hi = vmull_high_u8(Sx4, 0xff)     umlal   v3.8h, v0.8b, v17.8b        \/\/ vmlal_u8(Rx2lo, Sx4, 0xff)     umlal2  v4.8h, v1.16b, v5.16b       \/\/ vmlal_high_u8(Rx2hi, Dx4, Sax4)     ldr     q0, [x10, #16]              \/\/ Sx4 = vld1q_u8(&amp;Srgba[i + 16])     ldr     q1, [x11, #16]              \/\/ Dx4 = vld1q_u8(&amp;Drgba[i + 16])     ursra   v3.8h, v3.8h, #8            \/\/ vrsraq_n_u16(Rx2lo, Rx2lo, 8)     ursra   v4.8h, v4.8h, #8            \/\/ vrsraq_n_u16(Rx2hi, Rx2hi, 8)     uqrshrn v2.8b, v3.8h, #8            \/\/ Rx4 = vqrshrn_n_u16(Rx2lo, 8)     add     x10, x9, #16                 uqrshrn2 v2.16b, v4.8h, #8          \/\/ vqrshrn_high_n_u16(Rx4, Rx2hi, 8)     cmp     x10, #3972                       str     q2, [x21, x9]               \/\/ vst1q_u8(&amp;Rrgba[i], Rx4)     mov     x9, x10     b.lo    .LBB0_3<\/code><\/pre>\n<p>\u0425\u043e\u0447\u0443 \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e <code>q0<\/code>&nbsp;\u0438 <code>v0<\/code>&nbsp;\u2014 \u044d\u0442\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430. \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u2014 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432\u0435\u0440\u043d\u043e \u043f\u043e\u043d\u044f\u043b \u0437\u0430\u0434\u0443\u043c\u043a\u0443 \u0441 \u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0449\u0438\u043c \u0447\u0442\u0435\u043d\u0438\u0435\u043c \u0438, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432 \u043a\u043e\u0434\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0437 \u0441\u0442\u0430\u0440\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u043d\u043e\u0432\u044b\u0435, \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435\u0442. \u0427\u0442\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 <code>v0<\/code> \u0438 <code>v1<\/code> \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f. \u0425\u043e\u0442\u044c \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438 \u0441\u043c\u0435\u0441\u0442\u0438\u043b\u0430\u0441\u044c \u0441 \u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0443, \u0442\u0443\u0442 \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440, \u0442.\u043a. \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u043d \u0440\u0435\u0448\u0438\u043b \u0442\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u043b\u0430\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0447\u0442\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 <code>umull<\/code>&nbsp;\u0438 <code>umlal<\/code>. \u0422\u0443\u0442 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0435, \u0437\u0430\u0447\u0435\u043c-\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0437\u0430\u043c\u0435\u043d\u0438\u043b <code>umull2<\/code> \u043d\u0430 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d <code>umull<\/code>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u043c\u0443 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0432 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u21168 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0438\u0448\u043d\u0435\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 v0 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 v6. \u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>vget_low_u8<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044d\u0442\u043e \u0438 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u0442\u0438\u043f\u0443. \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, <a href=\"https:\/\/godbolt.org\/z\/1P7Ydboxd\" rel=\"noopener noreferrer nofollow\">\u0447\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430<\/a>, \u0442\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e  \u043e\u043d\u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0442, \u0447\u0442\u043e \u043d\u0438\u0436\u043d\u044f\u044f \u0447\u0430\u0441\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u2014 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0441\u0430\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440. \u041d\u0443 \u0430 GCC \u0432\u043e\u043e\u0431\u0449\u0435 \u0442\u0432\u043e\u0440\u0438\u0442 \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0434\u0438\u0447\u044c: \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0441 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u043c\u0438, \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u0440\u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f. \u0414\u043b\u044f <code>Rx2lo<\/code>&nbsp;\u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043c\u0435\u0441\u0442\u0430\u043c\u0438 <code>vmull_u8<\/code>&nbsp;\u0438 <code>vmlal_u8<\/code>. \u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u044d\u0442\u043e \u043d\u0438 \u043d\u0430 \u0447\u0442\u043e \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442, \u043d\u043e \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0437\u0430\u0447\u0435\u043c.<\/p>\n<p>\u041d\u0443 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435, \u043d\u0430 \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0438. \u0415\u0441\u043b\u0438 \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>str q2, [x21, x9]<\/code>&nbsp;\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440, \u0442\u043e \u0434\u043b\u044f <code>ldr<\/code>&nbsp;\u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u0440\u0430\u043d\u0435\u0435, \u043f\u0440\u0438\u0447\u0435\u043c \u0434\u0432\u0430 \u0440\u0430\u0437\u0430, \u0445\u043e\u0442\u044f \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c <code>x9 + 16<\/code>&nbsp;\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043e\u0431\u0435\u0438\u0445 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430\u0445.<\/p>\n<p>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u0441\u0451 \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c:<\/p>\n<pre><code class=\"go\">    ldr     q0, [x19]                   \/\/ Sx4 = vld1q_u8(&amp;Srgba[0])     ldr     q1, [x20]                   \/\/ Dx4 = vld1q_u8(&amp;Drgba[0])     movi    v17.2d, #0xffffffffffffffff     mov     x9, xzr                     \/\/ i = 0 .LBB0_3:     tbl     v5.16b, { v0.16b }, v16.16b \/\/ vqtbl1q_u8(Sx4, v16)     mvn     v5.16b, v5.16b              \/\/ Sax4 = vsubq_u8(vdupq_n_u8(255), v5)     add     x10, x9, #16                \/\/ x10 = i + 16     umull   v3.8h, v0.8b, v17.8b        \/\/ Rx2lo = vmull_u8(Sx4, 0xff);     umull2  v4.8h, v0.16b, v17.16b      \/\/ Rx2hi = vmull_high_u8(Sx4, 0xff)     ldr     q0, [x19, x10]              \/\/ Sx4 = vld1q_u8(&amp;Srgba[i + 16])     umlal   v3.8h, v1.8b, v5.8b         \/\/ vmlal_u8(Rx2lo, Dx4, Sax4)     umlal2  v4.8h, v1.16b, v5.16b       \/\/ vmlal_high_u8(Rx2hi, Dx4, Sax4)     ldr     q1, [x20, x10]              \/\/ Dx4 = vld1q_u8(&amp;Drgba[i + 16])     ursra   v3.8h, v3.8h, #8            \/\/ vrsraq_n_u16(Rx2lo, Rx2lo, 8)     ursra   v4.8h, v4.8h, #8            \/\/ vrsraq_n_u16(Rx2hi, Rx2hi, 8)     uqrshrn v2.8b, v3.8h, #8            \/\/ Rx4 = vqrshrn_n_u16(Rx2lo, 8)     uqrshrn2 v2.16b, v4.8h, #8          \/\/ vqrshrn_high_n_u16(Rx4, Rx2hi, 8)     cmp     x10, #3972                       str     q2, [x21, x9]               \/\/ vst1q_u8(&amp;Rrgba[i], Rx4)     mov     x9, x10     b.lo    .LBB0_3<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c:<\/p>\n<pre><code class=\"diff\">$ clang-9 -Wall -O2 -o main.o -c main.s &amp;&amp; gcc .\/main.o -o run.64 &amp;&amp; .\/run.64  Time elapsed: 0.033388 Time elapsed: 0.033204 Time elapsed: 0.033223 Time elapsed: 0.033190<\/code><\/pre>\n<p>\u0415\u0441\u0442\u044c \u0435\u0449\u0451 14% \u043f\u0440\u0438\u0440\u043e\u0441\u0442\u0430. \u0418\u0442\u043e\u0433\u043e \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 5,7 \u0440\u0430\u0437.<\/p>\n<p>\u0411\u044b\u043b\u043e \u0431\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u0442\u043e\u0432 \u0443\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0446\u0438\u043a\u043b. \u0418\u043c\u0435\u0435\u043c 1800\u041c\u0413\u0446 (\u0442\u0430\u043a\u0442\u043e\u0432\/\u0441), 0.033190 \u0441\/\u0437\u0430\u043f\u0443\u0441\u043a \u0438 250 * 20 * 1000 \u0446\u0438\u043a\u043b\u043e\u0432\/\u0437\u0430\u043f\u0443\u0441\u043a. \u0418\u0442\u043e\u0433\u043e: 1800000000 *&nbsp;0.033190 \/ (250 * 20 * 1000) \u2248 12 \u0442\u0430\u043a\u0442\u043e\u0432\/\u0446\u0438\u043a\u043b. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u0432 \u0446\u0438\u043a\u043b\u0435 17 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u044d\u0442\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u042f \u043d\u0435 \u0434\u0443\u043c\u0430\u043b, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u0430\u043a \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e.<\/p>\n<h3>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 SSE<\/h3>\n<p>\u0414\u0443\u043c\u0430\u044e, \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043b\u0438\u0448\u043d\u0438\u043c \u0440\u0435\u0448\u0438\u0442\u044c \u0442\u0443 \u0436\u0435 \u0437\u0430\u0434\u0430\u0447\u0443 \u043d\u0430 SSE \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0443\u0441\u0438\u043b\u0438\u044f. \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f. \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u0430\u043b\u044c\u0444\u0430-\u043a\u0430\u043d\u0430\u043b \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439-\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u043d\u0430 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u0430\u043d\u0430\u043b\u044b. \u0422\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e NEON-\u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<pre><code class=\"cpp\">__m128i Sax4 = _mm_sub_epi8(     _mm_set1_epi8((char) 255),     _mm_shuffle_epi8(Sx4, _mm_set_epi8(         15,15,15,15, 11,11,11,11, 7,7,7,7, 3,3,3,3)));<\/code><\/pre>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0431\u0430\u0439\u0442\u043e\u0432 \u0443 <code>_mm_set_epi8<\/code>&nbsp;\u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0443\u0436\u043d\u043e 8-\u0431\u0438\u0442\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435. \u0412 SSE \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0435, \u044d\u0442\u043e \u0438\u043d\u0442\u0440\u0438\u043d\u0441\u0438\u043a <code>_mm_maddubs_epi16<\/code>. \u0418 \u043a\u0441\u0442\u0430\u0442\u0438, \u043e\u043d \u0436\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0438 \u0434\u0430\u0436\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0434\u0435\u043b\u043e \u0432 \u0448\u043b\u044f\u043f\u0435.<\/p>\n<pre><code class=\"cpp\">\/\/ \u042d\u0442\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434! __m128i Rx2lo = _mm_maddubs_epi16(     _mm_unpacklo_epi8(_mm_set1_epi8((char) 255), Sax4),     _mm_unpacklo_epi8(Sx4, Dx4)); __m128i Rx2hi = _mm_maddubs_epi16(     _mm_unpackhi_epi8(_mm_set1_epi8((char) 255), Sax4),     _mm_unpackhi_epi8(Sx4, Dx4));<\/code><\/pre>\n<p>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u043e\u0441\u044c \u0432\u0434\u0432\u043e\u0435 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 NEON-\u0432\u0435\u0440\u0441\u0438\u0435\u0439. \u041d\u043e, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, <code>_mm_maddubs_epi16<\/code> \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442&nbsp;\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u044b\u0439 8-\u0431\u0438\u0442\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043a\u0430\u043a \u0446\u0435\u043b\u043e\u0435 \u0431\u0435\u0437 \u0437\u043d\u0430\u043a\u0430, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u043e \u0437\u043d\u0430\u043a\u043e\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u043c. \u0424\u0443\u043d\u043a\u0446\u0438\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0431\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0431\u044b\u043b\u0438 \u0431\u044b \u0431\u0435\u0437 \u0437\u043d\u0430\u043a\u0430, \u043d\u0435\u0442. \u0410 \u0437\u043d\u0430\u0447\u0438\u0442, \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 16-\u0431\u0438\u0442\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0441 \u043f\u0443\u0441\u0442\u044b\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u043c, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0438 \u0437\u0430\u043f\u0443\u0442\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u0434.<\/p>\n<pre><code class=\"cpp\">__m128i Rx2lo = _mm_add_epi16(     _mm_mullo_epi16(_mm_unpacklo_epi8(Sx4, _mm_setzero_si128()),                     _mm_set1_epi16(255)),     _mm_mullo_epi16(_mm_unpacklo_epi8(Dx4, _mm_setzero_si128()),                     _mm_unpacklo_epi8(Sax4, _mm_setzero_si128()))); __m128i Rx2hi = _mm_add_epi16(     _mm_mullo_epi16(_mm_unpackhi_epi8(Sx4, _mm_setzero_si128()),                     _mm_set1_epi16(255)),     _mm_mullo_epi16(_mm_unpackhi_epi8(Dx4, _mm_setzero_si128()),                     _mm_unpackhi_epi8(Sax4, _mm_setzero_si128())));<\/code><\/pre>\n<p>\u0414\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 255 \u0438 \u0437\u0430\u043f\u0430\u043a\u043e\u0432\u043a\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433, SSE \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442.<\/p>\n<pre><code class=\"cpp\">Rx2lo = _mm_add_epi16(Rx2lo, _mm_set1_epi16(0x80)); Rx2lo = _mm_srli_epi16(_mm_add_epi16(_mm_srli_epi16(Rx2lo, 8), Rx2lo), 8); Rx2hi = _mm_add_epi16(Rx2hi, _mm_set1_epi16(0x80)); Rx2hi = _mm_srli_epi16(_mm_add_epi16(_mm_srli_epi16(Rx2hi, 8), Rx2hi), 8); __m128i Rx4 = _mm_packus_epi16(Rx2lo, Rx2hi);<\/code><\/pre>\n<p>\u0417\u0430 \u0432\u044b\u0447\u0435\u0442\u043e\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a\/\u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0439, \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442 \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u0442\u0438\u043f\u043e\u0432, \u044f \u043d\u0430\u0441\u0447\u0438\u0442\u0430\u043b 23 \u0438\u043d\u0442\u0440\u0438\u043d\u0441\u0438\u043a\u0430 \u0432 SSE \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u043e\u0442\u0438\u0432 10 \u0432 NEON. \u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u043f\u0440\u0435\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f.<\/p>\n<h3>\u041c\u043e\u0451 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p>NEON \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u043b \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0434\u0443\u043c\u0430\u043d\u043d\u043e\u0439 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043c\u0430\u043d\u0434. \u042f \u043d\u0430\u0448\u0435\u043b \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0442\u0430\u043a\u0438\u0435 \u043f\u043b\u044e\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 SSE, \u0435\u0441\u0442\u044c \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0440\u0430\u0434\u043e\u0432\u0430\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u043f\u0446\u0438\u0439 \u0441\u0434\u0432\u0438\u0433\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c NEON-\u043a\u043e\u0434 \u0432 \u043b\u044e\u0431\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0440\u0430\u043d\u0442\u0430\u0439\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 NEON \u0434\u0430\u0435\u0442 \u043e\u0449\u0443\u0442\u0438\u043c\u044b\u0439 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0432\u043d\u044b\u0439 \u0442\u0430\u043a\u043e\u043c\u0443 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f SSE.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0447\u0435\u043d\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u0441 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0411\u044b\u043b\u0438 \u043e\u043f\u0430\u0441\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 <code>_mm_madd_epi16<\/code>, \u0434\u0435\u043b\u0430\u044e\u0449\u0435\u0439 8 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 4 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0451 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u043e\u0439 <code>vmull_*<\/code>\/<code>vmlal_*<\/code>, \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u0438\u043d\u0443\u0441\u044b \u044f \u0431\u044b \u043e\u0442\u043c\u0435\u0442\u0438\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>\u0410\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435\u044e\u0437\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a \u0438\u043d\u0442\u0440\u0438\u043d\u0441\u0438\u043a\u043e\u0432. \u042d\u0442\u043e \u043d\u0435 \u043c\u0438\u043d\u0443\u0441 \u0441\u0430\u043c\u043e\u0433\u043e NEON, \u043d\u043e \u044d\u0442\u043e \u0442\u043e, \u0441 \u0447\u0435\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0437\u0430\u043b\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 clang.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043c\u0435\u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043d\u0442\u0440\u0438\u043d\u0441\u0438\u043a\u043e\u0432 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0442 \u0447\u0438\u0442\u044b \u0432 \u0438\u0433\u0440\u0430\u0445: <code>vqrshrn_n_u16<\/code>, <code>vqdmulh_s16<\/code><\/p>\n<\/li>\n<\/ul>\n<h3>\u0411\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438<\/h3>\n<p>\u042f \u0441\u043e\u0431\u0440\u0430\u043b \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432 <a href=\"https:\/\/github.com\/homm\/neon_benchs\" rel=\"noopener noreferrer nofollow\">\u043e\u0434\u0438\u043d \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a> \u0441 make-\u0444\u0430\u0439\u043b\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0441\u0442\u0440\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0438\u043b\u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435\u043c. \u041f\u043e\u043c\u0438\u043c\u043e Raspberry Pi 4 \u044f \u0441\u043c\u043e\u0433 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u0434 \u0435\u0449\u0451 \u043d\u0430 <code>c6g.large<\/code>&nbsp;\u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0435 \u0432 AWS, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430\u0445 <a href=\"https:\/\/aws.amazon.com\/ec2\/graviton\/\" rel=\"noopener noreferrer nofollow\">AWS Graviton2<\/a>. \u0412\u043e\u0442 \u0447\u0442\u043e \u044f \u043d\u0430\u043c\u0435\u0440\u0438\u043b:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"183\" width=\"183\">\n<\/td>\n<td colspan=\"2\" data-colwidth=\"105,110\" width=\"105\">\n<p align=\"center\">Raspberry Pi 4<\/p>\n<\/td>\n<td colspan=\"2\" data-colwidth=\"106,110\" width=\"106\">\n<p align=\"center\"><code>c6g.large<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"183\" width=\"183\">\n<\/td>\n<td data-colwidth=\"105\" width=\"105\">\n<p align=\"center\"><strong>GCC 8.3.0<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"110\" width=\"110\">\n<p align=\"center\"><strong>Clang 9.0.1<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p align=\"center\"><strong>GCC 9.3.0<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"110\" width=\"110\">\n<p align=\"center\"><strong>Clang 9.0.1<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"183\" width=\"183\">\n<p>\u0411\u0435\u0437 \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438<\/p>\n<\/td>\n<td data-colwidth=\"105\" width=\"105\">\n<p>267,4 \u043c\u0441<br \/><sub>7.94x<\/sub><\/p>\n<\/td>\n<td data-colwidth=\"110\" width=\"110\">\n<p>185,6 \u043c\u0441<br \/><sub>5.51x<\/sub><\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p>140,2 \u043c\u0441<br \/><sub>10.01x<\/sub><\/p>\n<\/td>\n<td data-colwidth=\"110\" width=\"110\">\n<p>103,8 \u043c\u0441<br \/><sub>7.41x<\/sub><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"183\" width=\"183\">\n<p>\u0410\u0432\u0442\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/p>\n<\/td>\n<td data-colwidth=\"105\" width=\"105\">\n<p>116,8<br \/><sub>3.47x<\/sub><\/p>\n<\/td>\n<td data-colwidth=\"110\" width=\"110\">\n<p>82,55<br \/><sub>2.45x<\/sub><\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p>140,2<br \/><sub>10.01x<\/sub><\/p>\n<\/td>\n<td data-colwidth=\"110\" width=\"110\">\n<p>46,54<br \/><sub>3.32x<\/sub><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"183\" width=\"183\">\n<p>\u0420\u0443\u0447\u043d\u0430\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/p>\n<\/td>\n<td data-colwidth=\"105\" width=\"105\">\n<p>46,36<br \/><sub>1.38x<\/sub><\/p>\n<\/td>\n<td data-colwidth=\"110\" width=\"110\">\n<p>47,56<br \/><sub>1.41x<\/sub><\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p>22,85<br \/><sub>1.63x<\/sub><\/p>\n<\/td>\n<td data-colwidth=\"110\" width=\"110\">\n<p>17,59<br \/><sub>1.26x<\/sub><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"183\" width=\"183\">\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0442\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<td data-colwidth=\"105\" width=\"105\">\n<p>46<br \/><sub>1.37x<\/sub><\/p>\n<\/td>\n<td data-colwidth=\"110\" width=\"110\">\n<p>36,8<br \/><sub>1.09x<\/sub><\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p>24,01<br \/><sub>1.71x<\/sub><\/p>\n<\/td>\n<td data-colwidth=\"110\" width=\"110\">\n<p>16,86<br \/><sub>1.2x<\/sub><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"183\" width=\"183\">\n<p>\u0410\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440<\/p>\n<\/td>\n<td colspan=\"2\" data-colwidth=\"105,110\" width=\"105\">\n<p>33,66 \u043c\u0441<br \/><sub>1.0x<\/sub><\/p>\n<\/td>\n<td colspan=\"2\" data-colwidth=\"106,110\" width=\"106\">\n<p>14 \u043c\u0441<br \/><sub>1.0x<\/sub><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430\u043c\u0438 \u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043b \u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043d\u0430 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435. \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f. \u0412\u044b\u0432\u043e\u0434\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. \u041f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 GCC \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0435\u0437\u0434\u0435 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 Clang.<\/p>\n<\/li>\n<li>\n<p>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u0446\u0435\u043b\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u043d\u0435 \u0434\u0430\u0435\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u0436\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0430, \u043a\u0430\u043a \u0440\u0443\u0447\u043d\u0430\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043f\u0440\u0438\u0447\u0435\u043c \u0434\u0430\u0436\u0435 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0441\u0432\u0435\u0436\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0434\u043b\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>GCC \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u043e\u0446\u0435\u043d\u0438\u043b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0447\u0442\u0435\u043d\u0438\u044f. \u042f \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043a\u043e\u0434, \u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a, \u0431\u0443\u0434\u0442\u043e \u043e\u043d \u0435\u0451 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043a\u0438\u043d\u0443\u043b.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043c\u043e\u0449\u043d\u044b\u0445 \u0447\u0438\u043f\u0430\u0445 \u043b\u044e\u0431\u0430\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0438\u0433\u0440\u044b\u0448. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0438\u0445 \u0443\u0436\u0435 \u043d\u0435 \u0442\u0430\u043a \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b \u043d\u0435 \u0443\u043c\u0435\u044e\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 ARM, \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u043d\u0442\u0440\u0438\u043d\u0441\u0438\u043a\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e \u044f \u0432\u0441\u0435 \u0436\u0435 \u0440\u0435\u0448\u0438\u043b \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u043d\u0435\u0438\u0437\u043c\u0435\u0440\u0438\u043c\u043e\u0435 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043d\u0435\u0441\u0440\u0430\u0432\u043d\u0438\u043c\u043e\u0435. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f ARM \u043d\u0430 Apple M1, \u0430 \u0434\u043b\u044f x86 \u043d\u0430 Intel(R) Xeon. \u0412\u044b\u0431\u043e\u0440 M1 \u043f\u043e\u043d\u044f\u0442\u0435\u043d \u2014 \u043a\u0440\u043e\u043c\u0435 \u043d\u0435\u0433\u043e \u043f\u043e\u043a\u0430 \u043d\u0435\u0442 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u043e\u0442 Apple. \u0410 \u0432\u043e\u0442 \u043d\u0430 \u0447\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c x86 \u0431\u044b\u043b\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c. \u041d\u0430 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435 \u0443 \u043c\u0435\u043d\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 2,4 \u0434\u043e 4,1 \u0413\u0433\u0446 \u043f\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u0430.<\/p>\n<p>\u0415\u0449\u0451 \u043c\u043e\u043c\u0435\u043d\u0442, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445 \u043d\u0430 M1 \u0431\u044b\u043b \u0441\u0438\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0439 \u0440\u0430\u0437\u0431\u0440\u043e\u0441, \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u0434\u0432\u0443\u0445 \u0440\u0430\u0437. \u042f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b \u043d\u0435 \u0443 \u0441\u0435\u0431\u044f \u0438 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u0431\u044b\u043b\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u0432\u044b\u0445\u043e\u0434\u0438\u0442. \u041c\u043e\u0451 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0441\u043b\u0430\u0431\u044b\u0435 \u044f\u0434\u0440\u0430. \u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u044f \u0431\u0440\u0430\u043b \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"171\" width=\"171\">\n<\/td>\n<td data-colwidth=\"171\" width=\"171\">\n<p align=\"center\">Apple M1<\/p>\n<\/td>\n<td colspan=\"2\">\n<p align=\"center\"><code>c5.large<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"171\" width=\"171\">\n<\/td>\n<td data-colwidth=\"171\" width=\"171\">\n<p align=\"center\"><strong>Clang 12.0.0<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>GCC 9.3.0<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>Clang 9.0.1<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"171\" width=\"171\">\n<p>\u0411\u0435\u0437 \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438<\/p>\n<\/td>\n<td data-colwidth=\"171\" width=\"171\">\n<p>43,13 \u043c\u0441<br \/><sub>4.74x<\/sub><\/p>\n<\/td>\n<td>\n<p>74,56 \u043c\u0441<br \/><sub>5.09x<\/sub><\/p>\n<\/td>\n<td>\n<p>80,26 \u043c\u0441<br \/><sub>6.16x<\/sub><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"171\" width=\"171\">\n<p>\u0410\u0432\u0442\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/p>\n<\/td>\n<td data-colwidth=\"171\" width=\"171\">\n<p>16,71<br \/><sub>1.84x<\/sub><\/p>\n<\/td>\n<td>\n<p>74,54<br \/><sub>5.09x<\/sub><\/p>\n<\/td>\n<td>\n<p>80,28<br \/><sub>6.16x<\/sub><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"171\" width=\"171\">\n<p>\u0420\u0443\u0447\u043d\u0430\u044f 128-\u0431\u0438\u0442\u043d\u0430\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/p>\n<\/td>\n<td data-colwidth=\"171\" width=\"171\">\n<p>9,09<br \/><sub>1.0x<\/sub><\/p>\n<\/td>\n<td>\n<p>14,65<br \/><sub>1.0x<\/sub><\/p>\n<\/td>\n<td>\n<p>13,03<br \/><sub>1.0x<\/sub><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"171\" width=\"171\">\n<p>\u0420\u0443\u0447\u043d\u0430\u044f 256-\u0431\u0438\u0442\u043d\u0430\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/p>\n<\/td>\n<td data-colwidth=\"171\" width=\"171\">\n<\/td>\n<td>\n<p>7,76<br \/><sub>0.53x<\/sub><\/p>\n<\/td>\n<td>\n<p>6,52<br \/><sub>0.5x<\/sub><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430\u043c\u0438 \u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043b \u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0443\u0447\u043d\u043e\u0439 128-\u0431\u0438\u0442\u043d\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u0425\u043e\u0447\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435\u043e\u0431\u044a\u0435\u043c\u043b\u044e\u0449\u0438\u0439 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a \u0438 \u043f\u043e \u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u043d\u0435\u043b\u044c\u0437\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u044b \u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u0441\u0435\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435.<\/p>\n<ul>\n<li>\n<p>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c M1 \u0431\u0435\u0437 \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u0435\u0442. \u042d\u0442\u043e \u043f\u0440\u0438 \u0442\u043e\u043c, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u043e\u0431\u043e\u0438\u0445 \u0447\u0438\u043f\u043e\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0430\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0423\u043f\u0441, \u0430\u0432\u0442\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 x86 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u0445. \u0410 \u0441\u043b\u0443\u0447\u0430\u0439 \u0432\u0441\u0451 \u0435\u0449\u0451 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0434\u0430 \u0432 \u0446\u0438\u043a\u043b\u0435 (\u043d\u0430\u043f\u043e\u043c\u043d\u044e, 23 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0442\u0438\u0432 10), x86 \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442\u0441\u044f \u043e\u0442 \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u0434\u043b\u044f \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044f\u0434\u0440\u0430 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u0434\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0425\u043e\u0442\u044c 128-\u0431\u0438\u0442\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0430 M1 \u0432\u0441\u0451 \u0435\u0449\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u043d\u0430 x86, \u043f\u0440\u043e\u0442\u0438\u0432 AVX \u0435\u043c\u0443 \u043d\u0435\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<hr>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451. \u0415\u0441\u043b\u0438 \u043d\u0430\u0448\u043b\u0438 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \u0438\u043b\u0438 \u0437\u043d\u0430\u0435\u0442\u0435 \u0435\u0449\u0451 \u0447\u0442\u043e-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u043e NEON \u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 ARM, \u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u0432\u043c\u0435\u0441\u0442\u0435.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/548698\/\"> https:\/\/habr.com\/ru\/post\/548698\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<blockquote>\n<p>\u041c\u0438\u0440 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f. \u042f \u0447\u0443\u0432\u0441\u0442\u0432\u0443\u044e \u044d\u0442\u043e \u0432 \u0432\u043e\u0434\u0435, \u0447\u0443\u0432\u0441\u0442\u0432\u0443\u044e \u044d\u0442\u043e \u0432 \u0437\u0435\u043c\u043b\u0435, \u043e\u0449\u0443\u0449\u0430\u044e \u0432 \u0432\u043e\u0437\u0434\u0443\u0445\u0435.<\/p>\n<p><em>\u00ab\u0412\u043b\u0430\u0441\u0442\u0435\u043b\u0438\u043d \u043a\u043e\u043b\u0435\u0446\u00bb, \u0414\u0436\u043e\u043d \u0420\u043e\u043d\u0430\u043b\u044c\u0434 \u0420\u0443\u044d\u043b \u0422\u043e\u043b\u043a\u0438\u043d<\/em><\/p>\n<\/blockquote>\n<p>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 x86 \u0434\u043e\u043b\u0433\u0438\u0435 \u0434\u0435\u0441\u044f\u0442\u0438\u043b\u0435\u0442\u0438\u044f \u0431\u044b\u043b\u0430 \u043b\u0438\u0434\u0435\u0440\u043e\u043c \u043f\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c. \u0418 \u044d\u0442\u043e\u0442 \u0444\u0430\u043a\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u0435\u0439 \u0434\u043e\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u0436\u0435 \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043d\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 ARM \u0432\u043e\u043a\u0440\u0443\u0433 \u043d\u0430\u0441 \u0441\u0442\u0430\u043b\u043e \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435. \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0438\u0448\u0435\u0442\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043e\u0444\u0442 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438\u043b\u0438 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0441\u0442\u0430\u043d\u0446\u0438\u0439, \u0434\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043b\u0438\u0448\u044c \u0437\u043d\u0430\u043d\u0438\u0435\u043c x86. \u041d\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0441\u043a\u043b\u0430\u0434 \u0441\u0438\u043b \u0443\u0436\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0441\u043a\u043e\u0440\u043e. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u0441 ARM \u0438 \u043d\u0430\u0440\u044b\u043b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0432 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043d\u0430 \u0442\u0440\u0435\u0434 \u0432 \u0442\u0432\u0438\u0442\u0435\u0440\u0435.<\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u043d\u0435\u0442 \u0446\u0435\u043b\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0441\u0451 \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430, \u044f \u0431\u0443\u0434\u0443 \u0437\u0430\u043e\u0441\u0442\u0440\u044f\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043b\u0438\u0448\u044c \u043d\u0430 \u043e\u0442\u043b\u0438\u0447\u0438\u044f\u0445 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043b\u0438\u0441\u044c. \u041f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, SIMD, \u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u0438 \u0421\u0438 \u043d\u0430 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435.<\/p>\n<p>\u041c\u043e\u0439 \u043e\u043f\u044b\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <a href=\"https:\/\/github.com\/uploadcare\/pillow-simd\" rel=\"noopener noreferrer nofollow\">Pillow-SIMD<\/a>. \u0422\u0430\u043c \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b <a href=\"https:\/\/en.wikipedia.org\/wiki\/Intrinsic_function\" rel=\"noopener noreferrer nofollow\">\u0438\u043d\u0442\u0440\u0438\u043d\u0441\u0438\u043a\u0438<\/a> \u0432 \u043a\u043e\u0434\u0435 \u043d\u0430 \u0421\u0438 \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f 6-8-\u043a\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439.<\/p>\n<h3>\u041f\u043e\u0434 \u0447\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u0438\u0448\u0435\u043c?<\/h3>\n<p>\u0427\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u044d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u043f\u043e\u0440\u043e\u0433 \u0434\u043b\u044f \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432 ARM \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0438\u0437 \u0442\u0435\u0445, \u0447\u0442\u043e \u0431\u0443\u0434\u0443\u0442. \u0412 x86 \u0435\u0441\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043c\u0430\u043d\u0434, \u0435\u0441\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f (\u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 SSE, AVX, \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f \u0438\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f) \u0438 \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c (32 \u0438\u043b\u0438 64 \u0431\u0438\u0442\u0430). \u0412 ARM \u0436\u0435, <a href=\"https:\/\/en.wikipedia.org\/wiki\/ARM_architecture#Cores\" rel=\"noopener noreferrer nofollow\">\u0437\u0430\u0433\u0438\u0431\u0430\u0439\u0442\u0435 \u043f\u0430\u043b\u044c\u0446\u044b<\/a>:<\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u0442\u044c <strong>\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b<\/strong>, \u043a\u043e\u0438\u0445 \u0431\u043e\u043b\u0435\u0435 20. \u041d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u043d\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a: ARMv7-M, ARMv8-R, ARMv8.3-A.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u0442\u044c <strong>\u043c\u0438\u043a\u0440\u043e\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/strong>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: Cortex-R4, Cortex-A76.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u0442\u044c <strong>\u043f\u0440\u043e\u0444\u0430\u0439\u043b<\/strong>: Classic, Microcontroller, Real-time, Application.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 <strong>\u043d\u0430\u0431\u043e\u0440\u044b \u043a\u043e\u043c\u0430\u043d\u0434<\/strong>! A32, A64, Thumb, Thumb2.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, <strong>\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f<\/strong> \u043d\u0430\u0431\u043e\u0440\u0430 \u043a\u043e\u043c\u0430\u043d\u0434: SIMD, NEON, SVE.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0443 \u0438 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0434\u0435\u043b\u0430\u0441\u044c <strong>\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c<\/strong>: AArch32 \u0438 AArch64.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u044f \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0442\u0443 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f, \u044f \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0443 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0438 \u0443\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c. \u0412\u0441\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 <strong>\u043f\u0440\u043e\u0444\u0430\u0439\u043b\u043e\u0432<\/strong>. Classic \u2014 \u044d\u0442\u043e \u043f\u0440\u044f\u043c \u0441\u043e\u0432\u0441\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u043a, \u0442\u0430\u043a\u043e\u0435 \u0432\u044b \u0432\u0440\u044f\u0434 \u043b\u0438 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u0435. \u0418\u0437 \u0442\u0440\u0451\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0430\u043c\u043e\u0435 \u0445\u043e\u0434\u043e\u0432\u043e\u0435 \u2014 \u044d\u0442\u043e Application. \u0412\u0441\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u044b, \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u044d\u0442\u043e Application. \u041f\u0440\u043e\u0444\u0430\u0439\u043b \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0442\u0440\u0430\u0436\u0451\u043d \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438 <strong>\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b<\/strong> \u0432 \u0432\u0438\u0434\u0435 \u043f\u043e\u0441\u0442\u0444\u0438\u043a\u0441\u0430 (A, M, R). \u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0435 \u2014 ARMv7 \u0438 ARMv8, \u0437\u0430\u0442\u043e \u0443 ARMv8 \u0432\u044b\u0448\u043b\u043e \u0443\u0436\u0435 6 \u043c\u0438\u043d\u043e\u0440\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u043e\u0436\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430\u043c\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, ARMv8.2-A). \u041f\u0440\u0438\u0447\u0451\u043c 64-\u0431\u0438\u0442\u043d\u0430\u044f <strong>\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c<\/strong> \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 ARMv8. \u041e\u0434\u043d\u0430\u043a\u043e ARMv8-A \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 64-\u0431\u0438\u0442\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430 \u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u0430 \u0432\u043e\u0442 ARMv8.1-A \u0443\u0436\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u043d\u0438\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0447\u0438\u043f\u0430 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043c, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0441\u043e\u0444\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0442\u043e <strong>\u043c\u0438\u043a\u0440\u043e\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/strong> \u0443\u0436\u0435 \u043d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0447\u0438\u043f\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0437\u043d\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0435\u0448\u0430 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u044b\u043f\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0438 \u043a\u0430\u043a\u0438\u0435 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0447\u0438\u043f. \u041f\u0440\u0438\u0447\u0435\u043c, \u0431\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u043a \u043c\u0438\u043a\u0440\u043e\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043e\u0442 \u0441\u0430\u043c\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 ARM (\u043e\u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f Cortex \u0438 \u0441\u043b\u0435\u0434\u043e\u043c \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u0441\u0442\u0444\u0438\u043a\u0441 \u043f\u0440\u043e\u0444\u0430\u0439\u043b\u0430), \u0442\u0430\u043a \u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0430\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f Apple Firestorm, Neoverse N1 \u0438\u043b\u0438 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p><strong>\u041d\u0430\u0431\u043e\u0440 \u043a\u043e\u043c\u0430\u043d\u0434 <\/strong>A32 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 32-\u0431\u0438\u0442\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 AArch32, \u0430 A64 \u0432 64-\u0431\u0438\u0442\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 AArch64. \u0418 \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0437\u0430\u0447\u0435\u043c \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u0432\u0435\u0449\u0438. \u041d\u043e \u0434\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e A32 \u2014 \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432 32-\u0431\u0438\u0442\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435. A32 \u0438 A64 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 32 \u0431\u0438\u0442\u0430 \u0434\u043b\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0430 AArch32 \u0432\u044b\u0448\u0435\u043b \u043e\u0447\u0435\u043d\u044c \u0434\u0430\u0432\u043d\u043e \u0438 \u043c\u043d\u043e\u0433\u0438\u043c \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0440\u0430\u0441\u0442\u043e\u0447\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u0438 \u0442\u043e\u0433\u0434\u0430 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Thumb \u0438 Thumb2. \u0412 \u043d\u0438\u0445 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0438 16 \u0431\u0438\u0442. \u0414\u043b\u044f AArch64 \u0443\u0436\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435 \u0437\u0430\u0432\u0435\u0437\u043b\u0438, \u0432 \u043d\u0451\u043c \u043b\u044e\u0431\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 32 \u0431\u0438\u0442\u0430.<\/p>\n<p>\u041d\u0443 \u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, <strong>\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f<\/strong> \u043d\u0430\u0431\u043e\u0440\u0430 \u043a\u043e\u043c\u0430\u043d\u0434. \u0412\u043e\u043e\u0431\u0449\u0435, \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f VFPv1-VFPv5 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439, \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u044f \u0442\u0430\u043a \u0438 \u043d\u0435 \u0441\u043c\u043e\u0433 \u043f\u043e\u043d\u044f\u0442\u044c. \u041a\u0430\u043a \u0438 \u0432 x86, \u0432 ARM \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0437\u0430\u0432\u0435\u0437\u043b\u0438 \u043d\u0435 \u0441\u0440\u0430\u0437\u0443. \u0412 ARMv6 \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 SIMD (\u0442\u0430\u043a \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f), \u0430 \u0432 ARMv7 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 128-\u0431\u0438\u0442\u043d\u044b\u0439 advanced SIMD, \u043e\u043d \u0436\u0435 ASIMD, \u043e\u043d \u0436\u0435 NEON, \u043f\u043e \u0441\u0443\u0442\u0438 \u043f\u0440\u044f\u043c\u043e\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 SSE \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439. \u041e \u043d\u0451\u043c \u044f \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e. \u0410 \u0432\u043e\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0430 AVX \u0432 ARM \u043d\u0435\u0442, \u0442\u0430\u043c \u043f\u043e\u0448\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0451\u043c. \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0435 \u043f\u044f\u0442\u044c \u043b\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0451 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c, \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 Scalable Vector Extension (SVE), \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u043d\u0430 \u0447\u0438\u043f\u0430\u0445, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0445 \u0440\u0430\u0437\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432. \u041d\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u043a\u0430\u043a \u044f \u043f\u043e\u043d\u044f\u043b, SVE \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0432 Fugaku supercomputer.<\/p>\n<h2>\u042d\u0442\u043e \u0436\u0435 \u0443\u0436\u0430\u0441?<\/h2>\n<p>\u041d\u0443, \u0432\u043e\u043e\u0431\u0449\u0435, \u0434\u0430, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043d\u0430 \u043b\u044e\u0431\u043e\u043c ARM \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435, \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u0441 x86. \u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430 \u043d\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e NEON, \u043d\u043e \u0434\u0430\u0436\u0435 64-\u0431\u0438\u0442\u043d\u043e\u0439 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0438 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439. \u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e, \u043a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0443 ARM \u043d\u0435\u0442 \u0442\u043e\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0430\u0448 \u043a\u043e\u0434. \u042d\u0442\u043e \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u0435\u0436\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440. \u0418 \u0435\u0449\u0451, \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u044d\u0442\u043e \u0432\u0441\u0451 \u0436\u0435 \u0431\u0443\u0434\u0435\u0442 AArch64 \u0441\u0438\u0441\u0442\u0435\u043c\u0430. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u0440\u0443\u043a\u0430\u043c\u0438.<\/p>\n<p>AArch64 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 ARMv8. <a href=\"https:\/\/en.wikipedia.org\/wiki\/AArch64#ARMv8-A\" rel=\"noopener noreferrer nofollow\">ARMv8-A<\/a> \u0443\u0436\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 VFPv4 (64-\u0431\u0438\u0442\u043d\u044b\u0439 FPU), NEON \u0438 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438. \u0410 SVE \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0435\u0449\u0451 \u043f\u0430\u0440\u0443 \u043b\u0435\u0442. \u0423 NEON \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u043d\u0435\u0442. \u0422\u0430\u043a \u0436\u0435 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439: A64. \u0410 \u043c\u0438\u043a\u0440\u043e\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0438 \u043d\u0430 \u0447\u0442\u043e \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u043f\u043e\u0434 ARM (\u0442\u043e\u0447\u043d\u0435\u0435 \u043f\u043e\u0434 AArch64) \u0434\u0430\u0436\u0435 \u043f\u0440\u043e\u0449\u0435, \u0447\u0435\u043c \u043f\u043e\u0434 x86. \u041d\u0438\u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u0435 `#ifdef __aarch64__` \u0438 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c \u0432\u0441\u0435\u043c, \u0447\u0435\u043c \u0445\u043e\u0442\u0438\u0442\u0435.<\/p>\n<h3>\u0417\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 NEON<\/h3>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e x86 \u0438 ARM \u043c\u0430\u043b\u043e \u0447\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f. \u0418 \u0442\u0430\u043c \u0438 \u0442\u0430\u043c \u0435\u0441\u0442\u044c \u043e\u0431\u0449\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0438 SIMD. \u0414\u043b\u044f \u043e\u0431\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b <a href=\"https:\/\/developer.arm.com\/documentation\/102374\/0101\/Registers-in-AArch64---general-purpose-registers\" rel=\"noopener noreferrer nofollow\">General-purpose registers<\/a> \u0432 AArch64 Instruction Set Architecture. \u0418 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u043f\u043e\u043b\u043d\u043e\u043c\u0443 \u0432\u0432\u043e\u0434\u043d\u043e\u043c\u0443 \u0433\u0430\u0439\u0434\u0443 \u2014 <a href=\"https:\/\/developer.arm.com\/architectures\/instruction-sets\/simd-isas\/neon\/neon-programmers-guide-for-armv8-a\/coding-for-neon\" rel=\"noopener noreferrer nofollow\">Coding for Neon<\/a>.<\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0431\u0440\u043e\u0441\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u043b\u0430\u0437\u0430 \u2014 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435. \u0418 \u044d\u0442\u043e \u0434\u0430\u0436\u0435 \u0438\u043c\u0435\u0435\u0442 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"css\">LD3 { V0.16B, V1.16B, V2.16B }, [x0]<\/code><\/pre>\n<p>\u0422\u0443\u0442 \u043d\u0430\u0434\u043e \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u0430\u043c\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u043d\u0435 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b, \u0442\u0438\u043f \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438.<\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u0443\u0434\u0438\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043b-\u0432\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0432\u0441\u044f\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0434\u0432\u0438\u0433\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0441\u0434\u0432\u0438\u0433 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0432\u0435\u043a\u0442\u043e\u0440\u0435.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 SSE, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435\u0442. \u041f\u043e\u0445\u043e\u0436\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 AVX2 \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438 <code>vpsrlv[dq]<\/code>, <code>vpsllv[dq]<\/code>, <code>vpsravd<\/code>. \u041d\u043e, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432 NEON \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0441\u0434\u0432\u0438\u0433\u0430\u044e\u0442 \u0432 \u043e\u0431\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u043d\u0430\u043a\u0430. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0432 AVX2 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0432\u0438\u043d\u0443\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e 32-\u0431\u0438\u0442\u043d\u044b\u0435 \u0438 64-\u0431\u0438\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u043a\u0443\u0441\u043d\u043e\u0441\u0442\u0438 NEON \u043d\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0441\u0434\u0432\u0438\u0433\u0430 \u0435\u0441\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0421\u0434\u0432\u0438\u0433 \u0438 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u043c<\/p>\n<\/li>\n<li>\n<p>\u0421\u0434\u0432\u0438\u0433 \u0432\u043f\u0440\u0430\u0432\u043e \u0441 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435\u043c<\/p>\n<\/li>\n<li>\n<p>\u0421\u0434\u0432\u0438\u0433 \u0441 \u0441\u0430\u0442\u0443\u0440\u0430\u0446\u0438\u0435\u0439<\/p>\n<\/li>\n<li>\n<p>\u0421\u0434\u0432\u0438\u0433 \u0441 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435\u043c \u0438\u043b\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u0438<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u0447\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0438 \u0432\u0441\u0451 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043b\u044e\u0431\u044b\u043c \u0442\u0438\u043f\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e\u043f\u0440\u0430\u0432\u044c\u0442\u0435, \u043d\u043e \u0432\u0440\u043e\u0434\u0435 SSE \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c.<\/p>\n<p>\u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0440\u0438\u043d\u0441\u0438\u043a\u043e\u0432, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 SSE\/AVX, \u0433\u0434\u0435 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0434\u043b\u044f float \u0438 double (<code>__m128<\/code>&nbsp;\u0438 <code>__m128d<\/code>), \u0432 NEON \u0435\u0441\u0442\u044c \u0442\u0438\u043f\u044b \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0446\u0435\u043b\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u043d\u0432\u0435\u043d\u0446\u0438\u0438 <a href=\"https:\/\/en.wikipedia.org\/wiki\/C_data_types#Fixed-width_integer_types\" rel=\"noopener noreferrer nofollow\">stdint.h<\/a>.<\/p>\n<pre><code class=\"cpp\">uint8x16_t Sx4 = vld1q_u8(&amp;Srgba[i]); uint8x16_t Dx4 = vld1q_u8(&amp;Drgba[i]); uint32x4_t Sax4 = vshrq_n_u32((uint32x4_t) Sx4, 24); uint32x4_t Dax4 = vshrq_n_u32((uint32x4_t) Dx4, 24);<\/code><\/pre>\n<p>\u0422\u0443\u0442 \u043f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b \u0438\u043c\u0435\u044e\u0442 \u0442\u0438\u043f \u00ab16 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0445 int8\u00bb, \u0432\u0442\u043e\u0440\u044b\u0435 \u2014 \u00ab4 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0445 int32\u00bb. \u041d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u0434\u0440\u0443\u0433 \u043a \u0434\u0440\u0443\u0433\u0443. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0438\u043f\u044b \u0432\u0440\u043e\u0434\u0435 <code>uint8x16x3_t<\/code>&nbsp;\u2014 \u044d\u0442\u043e \u0442\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u043f\u043e\u0434\u0440\u044f\u0434. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0442\u0430\u043a\u0438\u0435 \u0442\u0438\u043f\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<h3>\u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a \u0438\u043d\u0442\u0440\u0438\u043d\u0441\u0438\u043a\u043e\u0432<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0434\u0435\u0441\u044f\u0442\u0438\u043b\u0435\u0442\u0438\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 SIMD-\u043a\u043e\u0434 \u0434\u043b\u044f x86, \u0432\u044b \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c <a href=\"https:\/\/software.intel.com\/sites\/landingpage\/IntrinsicsGuide\/\" rel=\"noopener noreferrer nofollow\">Intel Intrinsics Guide<\/a>. \u042d\u0442\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a \u0441 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c, \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0438 \u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438. \u0418 \u0434\u0430\u0436\u0435 \u0435\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0437\u0430\u0434\u0435\u0440\u0436\u0435\u043a \u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u044f\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 Intel.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u043d\u0451\u043c \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e\u0435, \u043d\u043e \u0438 \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0435, \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u044f \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0438 \u0447\u0438\u0442\u0430\u044f \u0432\u0441\u0451 \u043f\u043e\u0434\u0440\u044f\u0434.<\/p>\n<p>\u0423 ARM \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u043c \u044d\u0442\u043e\u0433\u043e \u0433\u0430\u0439\u0434\u0430 \u0441\u043b\u0443\u0436\u0438\u0442 <a href=\"https:\/\/developer.arm.com\/architectures\/instruction-sets\/simd-isas\/neon\/intrinsics\" rel=\"noopener noreferrer nofollow\">Neon Intrinsics Reference<\/a>. \u0418 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u043e\u043b\u044c \u0438 \u0443\u043d\u0438\u0436\u0435\u043d\u0438\u0435.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u041d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0438\u0441\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e 30 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0441\u043d\u0438\u0437\u0443 \u0435\u0441\u0442\u044c \u043f\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u0430\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f, \u0442\u043e\u0436\u0435 \u0441 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u044d\u043a\u0440\u0430\u043d \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0442\u0440\u0438 \u0430\u0431\u0437\u0430\u0446\u0430 \u0442\u0435\u043a\u0441\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u043e\u043c\u0430\u0442\u044b\u0432\u0430\u0442\u044c. \u0410 \u043f\u0440\u043e\u043c\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e, \u0432\u0435\u0434\u044c \u043b\u044e\u0431\u043e\u0439 \u0447\u0438\u0445 \u2014 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 &#171;mul&#187; \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f 50 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0444\u0443\u043d\u043a\u0446\u0438\u0439! \u0422\u043e \u0435\u0441\u0442\u044c 1500 \u0448\u0442\u0443\u043a. \u0417\u043d\u0430\u0435\u0442\u0435, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0435\u0441\u0442\u044c \u0441\u043b\u043e\u0432\u043e accu<strong>mul<\/strong>ate!<\/p>\n<\/li>\n<li>\n<p>\u0423 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0444\u043b\u0430\u0433\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u043c\u0435\u043d\u044f\u044e\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u0447\u0442\u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043a\u043e\u043b\u043e 12. \u0418 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041f\u043e \u0444\u0430\u043a\u0442\u0443 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0435 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0430 \u0434\u043b\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0435\u043c \u043e\u0434\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0434\u0440\u0443\u0433\u043e\u0439, \u043f\u043e\u0447\u0442\u0438 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435, \u043e\u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 \u044d\u0442\u043e\u0442 \u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434? \u041e\u043d \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043e\u0447\u0435\u043d\u044c \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u0435\u043d \u0438 \u0437\u0430\u043f\u0443\u0442\u0430\u043d.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043f\u043e\u043a\u0430 \u044f \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043d\u0430\u0448\u0435\u043b \u0442\u0430\u043a\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u0438\u0449\u0443 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0432 <a href=\"https:\/\/developer.arm.com\/documentation\/ddi0596\/2020-12\/SIMD-FP-Instructions\" rel=\"noopener noreferrer nofollow\">\u0430\u043b\u0444\u0430\u0432\u0438\u0442\u043d\u043e\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0441 \u043a\u0440\u0430\u0442\u043a\u0438\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c<\/a>, \u0430 \u0443\u0436\u0435 \u043f\u043e\u0442\u043e\u043c \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0438\u0449\u0443 \u0432 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0435 \u0438\u043d\u0442\u0440\u0438\u043d\u0441\u0438\u043a\u0438.<\/p>\n<h3>\u041f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c NEON \u0432 \u0434\u0435\u043b\u0435. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043a\u043e\u0434\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u044f \u0432\u044b\u0431\u0440\u0430\u043b <a href=\"https:\/\/habr.com\/ru\/post\/468067\/\" rel=\"noopener noreferrer nofollow\">\u0430\u043b\u044c\u0444\u0430-\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0442\u0438\u043d\u0433 \u0441 premultiplied alpha<\/a>. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u043e\u0439:<\/p>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u043d\u0430 SIMD:<\/p>\n<pre><code class=\"cpp\">#include &lt;stdint.h&gt; #include &lt;stddef.h&gt;  #define SHIFTFORDIV255(a)\\     ((((a) &gt;&gt; 8) + a) &gt;&gt; 8)  #define DIV255(a)\\     SHIFTFORDIV255(a + 0x80)  static void opSourceOver_premul(uint8_t* restrict Rrgba,                     const uint8_t* restrict Srgba,                     const uint8_t* restrict Drgba, size_t len) {     size_t i = 0;     for (; i &lt; len*4; i += 4) {         uint8_t Sa = Srgba[i + 3];         Rrgba[i + 0] = DIV255(Srgba[i + 0] * 255 + Drgba[i + 0] * (255 - Sa));  <\/code><\/pre>\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-320597","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320597","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=320597"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320597\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=320597"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=320597"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=320597"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}