{"id":108413,"date":"2023-05-08T12:48:42","date_gmt":"2023-05-08T10:48:43","guid":{"rendered":"https:\/\/prohoster.info\/?p=108413"},"modified":"2023-05-08T16:10:08","modified_gmt":"2023-05-08T14:10:08","slug":"sozdatel-llvm-razvivaet-novyj-yazyk-programmirovaniya-mojo","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/news\/sozdatel-llvm-razvivaet-novyj-yazyk-programmirovaniya-mojo","title":{"rendered":"The creator of LLVM is developing a new programming language called Mojo","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Chris Lattner, the founder and chief architect of LLVM and the creator of the Swift programming language, and Tim Davis, former head of AI projects at Google such as TensorFlow and JAX, introduced a new programming language called Mojo. This language combines ease of use for research development and rapid prototyping with suitability for creating high-performance end products. The first goal is achieved through a familiar Python-like syntax, while the second is accomplished through the ability to compile to machine code, safe memory management mechanisms, and support for hardware acceleration techniques.    <\/p>\n<p>The project focuses on using developments in the field of machine learning while being presented as a general-purpose language that enhances Python's capabilities with system programming tools and is suitable for a wide range of tasks. For example, the language is applicable in areas such as high-performance computing, data processing, and transformation. An interesting feature of Mojo is the ability to specify the emoji symbol &#171;&#128293;&#187; as a file extension for code files (for example, &#171;helloworld.&#128293;&#187;), in addition to the text extension &#171;.mojo&#187;.       <\/p>\n<p>Currently, the language is under intensive development and only an online interface is available for testing. Separate builds for running on local systems are promised to be published later, after feedback is received about the interactive web environment. The source codes of the compiler, JIT, and other related project components are planned to be released after the internal architecture design is completed (the model of developing a working prototype behind closed doors is reminiscent of the initial stages of LLVM, Clang, and Swift development). Since Mojo's syntax is based on Python and its type system is close to C\/C++, there's a plan to develop tools to facilitate the translation of existing C\/C++ and Python projects to Mojo, as well as to develop hybrid projects that combine code written in Python and Mojo.        <\/p>\n<p>The project is designed to leverage existing hardware resources in heterogeneous systems for computation. For instance, GPU, specialized accelerators for machine learning, and vector processor instructions (SIMD) can be utilized for running applications in the Mojo language and parallelizing computations. The development of a separate subset of the Python language is mentioned as a reason, rather than optimizing the existing CPython, focusing on compilation, integrating systems programming capabilities, and utilizing a fundamentally different internal architecture that allows executing code on GPUs and various hardware accelerators. The developers of Mojo aim to maintain compatibility with CPython as much as possible.            <\/p>\n<p>Mojo can be used both in an interpreted mode with JIT and for compilation into executable files (AOT, ahead-of-time). The compiler incorporates modern technologies for automatic optimization, caching, and distributed compilation. Source code written in Mojo is transformed into low-level intermediate code MLIR (Multi-Level Intermediate Representation), developed by the LLVM project, which provides additional optimization opportunities for processing data flow graphs. The compiler allows for the generation of machine code using various backends that support MLIR.        <\/p>\n<p>Utilizing additional hardware mechanisms to accelerate computations enables achieving performance that outstrips applications written in C\/C++ during intensive computations. For example, when testing an application that generates multiple Mandelbrot sets, a compiled application in the Mojo language running in the AWS cloud (r7iz.metal-16xl) was found to be 6 times faster than the C++ implementation (0.03 seconds versus 0.20 seconds), and also 35,000 times faster than the application in Python using the standard CPython 3.10.9 (0.03 seconds versus 1027 seconds) and 1500 times faster when using PYPY (0.03 seconds versus 46.1 seconds).    <\/p>\n<p>In evaluating performance in solving machine learning tasks, the AI stack Modular Inference Engine, written in Mojo, proved to be 3 times faster on an Intel processor when processing a language model, 6.4 times faster when executing a recommendation model, and 2.1 times faster when working with visual information models compared to a solution based on the TensorFlow library. With AMD processors, the advantage when using Mojo was 3.2, 5, and 2.2 times faster, and when using ARM processors \u2014 5.3, 7.5, and 1.7 times faster, respectively. The PyTorch-based solution lagged behind Mojo by 1.4, 1.1, and 1.5 times on Intel CPU, by 2.1, 1.2, and 1.5 times on AMD CPU, and by 4, 4.3, and 1.3 times on ARM CPU.      <center><img decoding=\"async\" alt=\"The creator of LLVM is developing a new programming language called Mojo\" src=\"\/wp-content\/uploads\/2023\/05\/df2598980ce4ed179ec3042d500235db.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/center>          <\/p>\n<p>The language supports static typing and tools for safe low-level memory manipulation, similar to Rust, such as tracking the lifetime of references and variable borrowing checks (borrow checker). In addition to safe pointer manipulation, the language also provides low-level capabilities, such as direct memory access in unsafe mode using the Pointer type, calling individual SIMD instructions, or accessing hardware extensions like TensorCores and AMX.    <center><img decoding=\"async\" alt=\"The creator of LLVM is developing a new programming language called Mojo\" src=\"\/wp-content\/uploads\/2023\/05\/000b92c5bbb54eec64649b30a434be6d.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/center>    <\/p>\n<p>To simplify the distinction between classic and optimized Python code for functions with explicit type definitions for all variables, it is suggested to use the separate keyword &#171;fn&#187; instead of &#171;def&#187;. Similarly, for classes, when static data packing in memory is necessary during compilation (as in C), the type &#171;struct&#187; can be used instead of &#171;class&#187;. Simple import of modules in C\/C++ languages is also possible; for example, to import the cos function from the math library, one can specify &#171;from &#171;math.h&#187; import cos&#187;.<br \/>\n<br \/>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=59094\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041a\u0440\u0438\u0441 \u041b\u0430\u0442\u043d\u0435\u0440 (Chris Lattner), \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440 LLVM, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Swift, \u0438 \u0422\u0438\u043c \u0414\u044d\u0432\u0438\u0441 (Tim Davis), \u0431\u044b\u0432\u0448\u0438\u0439 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c AI-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 Google, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Tensorflow \u0438 JAX, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Mojo, \u0441\u043e\u0447\u0435\u0442\u0430\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043e\u043a \u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432 \u0441 \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432. \u041f\u0435\u0440\u0432\u043e\u0435 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":108414,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-108413","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041a\u0440\u0438\u0441 \u041b\u0430\u0442\u043d\u0435\u0440 (Chris Lattner), \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440 LLVM, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Swift, \u0438 \u0422\u0438\u043c \u0414\u044d\u0432\u0438\u0441 (Tim Davis), \u0431\u044b\u0432\u0448\u0438\u0439 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c AI-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 Google, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Tensorflow \u0438 JAX.\" \/>\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\/en\/blog\/news\/sozdatel-llvm-razvivaet-novyj-yazyk-programmirovaniya-mojo\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\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\u0421\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c LLVM \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Mojo | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041a\u0440\u0438\u0441 \u041b\u0430\u0442\u043d\u0435\u0440 (Chris Lattner), \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440 LLVM, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Swift, \u0438 \u0422\u0438\u043c \u0414\u044d\u0432\u0438\u0441 (Tim Davis), \u0431\u044b\u0432\u0448\u0438\u0439 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c AI-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 Google, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Tensorflow \u0438 JAX.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/news\/sozdatel-llvm-razvivaet-novyj-yazyk-programmirovaniya-mojo\" \/>\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-05-08T10:48:43+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-05-08T14:10:08+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\udd47 The creator of LLVM is developing a new programming language Mojo | ProHoster","description":"Chris Lattner, the founder and chief architect of LLVM, as well as the creator of the Swift programming language, and Tim Davis, former head of AI projects at Google, such as Tensorflow and JAX.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/news\/sozdatel-llvm-razvivaet-novyj-yazyk-programmirovaniya-mojo","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","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\u0421\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c LLVM \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Mojo | ProHoster","og:description":"\u041a\u0440\u0438\u0441 \u041b\u0430\u0442\u043d\u0435\u0440 (Chris Lattner), \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440 LLVM, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Swift, \u0438 \u0422\u0438\u043c \u0414\u044d\u0432\u0438\u0441 (Tim Davis), \u0431\u044b\u0432\u0448\u0438\u0439 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c AI-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 Google, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Tensorflow \u0438 JAX.","og:url":"https:\/\/prohoster.info\/en\/blog\/news\/sozdatel-llvm-razvivaet-novyj-yazyk-programmirovaniya-mojo","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-05-08T10:48:43+00:00","article:modified_time":"2023-05-08T14:10:08+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\/en\/wp-json\/wp\/v2\/posts\/108413","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=108413"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/108413\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/108414"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=108413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=108413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=108413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}