{"id":111450,"date":"2023-11-12T03:10:13","date_gmt":"2023-11-12T01:10:13","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/v-nochnyh-sborkah-rust-rasshireny-vozmozhnosti-rasparallelivaniya-kompilyaczii"},"modified":"2023-11-12T03:10:13","modified_gmt":"2023-11-12T01:10:13","slug":"v-nochnyh-sborkah-rust-rasshireny-vozmozhnosti-rasparallelivaniya-kompilyaczii","status":"publish","type":"post","link":"https:\/\/prohoster.info\/es\/blog\/news\/v-nochnyh-sborkah-rust-rasshireny-vozmozhnosti-rasparallelivaniya-kompilyaczii","title":{"rendered":"En las compilaciones nocturnas de Rust se han ampliado las capacidades de paralelizaci\u00f3n de la compilaci\u00f3n.","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>En el frontend del compilador Rust, que realiza tareas como an\u00e1lisis sint\u00e1ctico, verificaci\u00f3n de tipos y an\u00e1lisis de pr\u00e9stamos, se ha implementado soporte para la ejecuci\u00f3n paralela, lo que permite reducir significativamente el tiempo de compilaci\u00f3n. La paralelizaci\u00f3n ya est\u00e1 disponible en las compilaciones nocturnas de Rust y se activa mediante la opci\u00f3n &#171;-Z threads=8&#187;. Se planea incluir esta opci\u00f3n en la rama estable en 2024.    <\/p>\n<p>El trabajo para reducir el tiempo de compilaci\u00f3n en Rust se ha estado realizando durante varios a\u00f1os. En los primeros 10 meses de 2023, el tiempo de compilaci\u00f3n se redujo en promedio en un 13%, el consumo m\u00e1ximo de memoria disminuy\u00f3 en un 15% y el tama\u00f1o de los archivos generados se redujo en un 7%. En esta etapa, se alcanz\u00f3 una aceleraci\u00f3n gracias a las optimizaciones del propio compilador. Despu\u00e9s de esto, los desarrolladores comenzaron a trabajar en la aceleraci\u00f3n mediante la paralelizaci\u00f3n de las operaciones durante la compilaci\u00f3n.     <\/p>\n<p>Hasta ahora, la paralelizaci\u00f3n en Rust se ha logrado principalmente a nivel de procesos; por ejemplo, el gestor de paquetes Cargo puede iniciar m\u00faltiples procesos rustc para compilar varios paquetes simult\u00e1neamente. El soporte para paralelizaci\u00f3n tambi\u00e9n est\u00e1 presente en el backend, que lleva a cabo operaciones relacionadas con la generaci\u00f3n de c\u00f3digo \u2014 el backend de Rust puede generar c\u00f3digo en partes, que luego LLVM puede procesar en paralelo. Sin embargo, el frontend a\u00fan solo pod\u00eda procesar el c\u00f3digo fuente en modo de un solo hilo.      <\/p>\n<p>Para soportar la paralelizaci\u00f3n, el frontend ha sido adaptado para utilizar la biblioteca Rayon y ha sido significativamente revisado. Por ejemplo, muchas de sus partes ahora se sincronizan mediante mutexes y bloqueos de lectura\/escritura, y se utilizan tipos at\u00f3micos en el c\u00f3digo. Durante las pruebas de rendimiento, la nueva implementaci\u00f3n paralelizable pod\u00eda realizar la compilaci\u00f3n hasta un 2% m\u00e1s lenta en modo de un solo hilo (-Z threads=1), pero cuando hab\u00eda m\u00e1s de un hilo, la velocidad aumentaba significativamente. Por ejemplo, al establecer 8 hilos (-Z threads=8), en algunas situaciones se lograba reducir el tiempo de compilaci\u00f3n en un 50%.    <\/p>\n<p>Sin embargo, el resultado depende en gran medida de la configuraci\u00f3n del entorno y del c\u00f3digo que se compila \u2014 para programas muy peque\u00f1os, que ya se compilan r\u00e1pidamente, la compilaci\u00f3n en modo multihilo puede ser m\u00e1s lenta. Adem\u00e1s, el consumo de memoria en modo multihilo puede aumentar significativamente; por ejemplo, en las pruebas se observ\u00f3 un aumento en el consumo de memoria de hasta el 35%.<br \/>\n<br \/>Fuente: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=60095\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0412\u043e \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 Rust, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0435\u043c \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u0430\u043a \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u043e\u0432 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0437\u0430\u0438\u043c\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0439, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u0420\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u0435 \u0443\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432 \u043d\u043e\u0447\u043d\u044b\u0445 \u0441\u0431\u043e\u0440\u043a\u0430\u0445 Rust \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043e\u043f\u0446\u0438\u0438 &#171;-Z threads=8&#187;. \u0412 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e\u0442 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 2024 \u0433\u043e\u0434\u0443. \u0420\u0430\u0431\u043e\u0442\u0430 \u043d\u0430\u0434 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0432 Rust [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-111450","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0412\u043e \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 Rust, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0435\u043c \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u0430\u043a \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u043e\u0432 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0437\u0430\u0438\u043c\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0439, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/es\/blog\/news\/v-nochnyh-sborkah-rust-rasshireny-vozmozhnosti-rasparallelivaniya-kompilyaczii\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"es_ES\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0412 \u043d\u043e\u0447\u043d\u044b\u0445 \u0441\u0431\u043e\u0440\u043a\u0430\u0445 Rust \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0412\u043e \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 Rust, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0435\u043c \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u0430\u043a \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u043e\u0432 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0437\u0430\u0438\u043c\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0439, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/es\/blog\/news\/v-nochnyh-sborkah-rust-rasshireny-vozmozhnosti-rasparallelivaniya-kompilyaczii\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-11-12T01:10:13+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-11-12T01:10:13+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47En las compilaciones nocturnas de Rust se han ampliado las capacidades de paralelizaci\u00f3n de la compilaci\u00f3n | ProHoster","description":"En el frontend del compilador Rust, que realiza tareas como an\u00e1lisis sint\u00e1ctico, verificaci\u00f3n de tipos y an\u00e1lisis de pr\u00e9stamos, se ha implementado soporte para la ejecuci\u00f3n paralela, lo que permite reducir significativamente el tiempo.","canonical_url":"https:\/\/prohoster.info\/es\/blog\/news\/v-nochnyh-sborkah-rust-rasshireny-vozmozhnosti-rasparallelivaniya-kompilyaczii","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"es_ES","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0412 \u043d\u043e\u0447\u043d\u044b\u0445 \u0441\u0431\u043e\u0440\u043a\u0430\u0445 Rust \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 | ProHoster","og:description":"\u0412\u043e \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 Rust, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0435\u043c \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u0430\u043a \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u043e\u0432 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0437\u0430\u0438\u043c\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0439, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f.","og:url":"https:\/\/prohoster.info\/es\/blog\/news\/v-nochnyh-sborkah-rust-rasshireny-vozmozhnosti-rasparallelivaniya-kompilyaczii","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2023-11-12T01:10:13+00:00","article:modified_time":"2023-11-12T01:10:13+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":[],"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts\/111450","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/comments?post=111450"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts\/111450\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/media?parent=111450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/categories?post=111450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/tags?post=111450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}