AI development has a new programming language that is 35,000 times faster than Python

As we all know, Python is the most popular language in the field of AI and ML. If you look at the TIOBE list for the past few months or even years, Python has always occupied the top two positions on the list. With the recent popularity of AI and the application of AI in various industries, the popularity of Python is expected to further increase.

In addition to Python, Julia is also the programming language chosen by many developers. "Whether Julia will replace Python" is also a question that is often discussed by everyone.

Now, there is a new competitor in this field.

AI infrastructure company Modular AI recently announced a new programming language, Mojo, that combines the syntax of Python with the portability and performance of C, with the goal of making it ideal for AI research and production.

Mojo combines the ease of use of Python with the performance of C, unlocking unparalleled programmability of AI hardware and scalability of AI models. Plus, it's 35000 times faster than Python.

According to the developers of Mojo:

When we started Modular AI, we didn't set out to build a new programming language. However, when we were building our platform to unify the ML/AI infrastructure, we realized that programming the entire stack was too complex.

According to the developers, one of the main motivations behind building new programming languages ​​is that most modern programming systems rely on accelerators (such as GPUs) to operate and only support data loading, pre- and post-processing, and integration with external systems written in other languages Instead of "falling back" to the CPU when operating, Modular AI hopes to combine all of these functions into one language.

We see no reason why it can't be done in just one language. Thus, Mojo was born.

So what they want is an innovative, scalable programming model that can support accelerators and other heterogeneous systems that are prevalent in machine learning. This means that Modular AI intends to build a programming language with powerful compile-time metaprogramming, integrating adaptive compilation technology, caching throughout the compilation process, and other things that existing languages ​​do not support. This is where Mojo is headed.

Mojo's ability to leverage MLIR enables Mojo developers to leverage vectors, threads, and AI hardware units. According to tests, Mojo is 35000 times faster than Python.

An important reason why Python is popular and has become the most important programming language for AI is that it has a large number of libraries and a rich ecology. In order to take advantage of these Python libraries and be fully compatible with the Python ecosystem, according to Mojo's documentation, although Mojo has a completely new code base, it has not really started from scratch conceptually. Embracing Python can greatly simplify the Mojo design work, and most of the syntax is similar to Python.

For Python developers, the approach of Modular AI can also make developers quickly familiar with Mojo. At present, Mojo already supports many core features of Python, including async/await, error handling, Variadic, etc., but Mojo is still in a very early stage of development stage, Mojo doesn't even support classes yet.

Modular AI will also provide a migration tool in the future to provide very good compatibility for developers who want to transfer Python code to Mojo.

Developers can now be the first to try it out in Modular AI's JupyterHub-based Playground. Run through the tutorial and write your own Mojo code ( link ), Mojo will also remain open source in the future.

Guess you like

Origin www.oschina.net/news/239376/mojo-programming-language