Modular AI launches new programming language Mojo: a fusion of Python’s ease of use and C’s performance

Startup Modular AI recently launched a new programming language called Mojo, which has the ease of use of Python and the performance of C. According to the company, Mojo’s direct access to AI computing hardware far outperforms Python. On some specific algorithms, Mojo can even reach 35,000 times faster than Python.

Modular AI was co-founded in 2022 by Chris Lattner and Tim Davis, the founders of the Swift language, and their goal is to create a platform that can fundamentally improve the development, usability, scalability and computing of artificial intelligence. To achieve this, they developed the Mojo language for AI applications. The company believes that although Python is a powerful language and has a wide range of applications in artificial intelligence research, there are still certain problems with Python’s performance and scalability on large workloads and edge devices, which limits the application of Python in actual production environments.

The Mojo language is based on the latest compilation technology and has a type design, which makes the program run significantly faster. In addition, Mojo allows developers to define zero-cost abstractions and provides memory security similar to the Rust language. Mojo also introduces autotuning and compile-time post-program development, both of which automatically optimize program performance during compilation. Thanks to Modular’s high-performance runtime and full use of MLIR technology, Mojo can directly operate a variety of AI hardware, further improving computing performance. When it comes to algorithms like Mandelbrot, Mojo can even run 35,000 times faster than Python.