Home Machine Learning A Fast Introduction to Mojo — a Superset of Python That Is Tremendous Quick | by Lynn Kwong | Jan, 2024

A Fast Introduction to Mojo — a Superset of Python That Is Tremendous Quick | by Lynn Kwong | Jan, 2024

0
A Fast Introduction to Mojo — a Superset of Python That Is Tremendous Quick | by Lynn Kwong | Jan, 2024

[ad_1]

Be taught a brand new sibling language of Python for AI

Picture by 51581 on Pixabay

There’s a model new language referred to as Mojo that appeared in 2023 and have become very eye-catching shortly. It was created by Chris Lattner, the unique architect of the Swift programming language. Mojo is designed to be a superset of Python. The syntax is similar to Python and thus very pleasant to Python builders.

Mojo is a compiled language and is magnitudes sooner than Python. It’s particularly optimized for ML/AI-related calculations and thus will be attention-grabbing and useful to study for widespread Python builders.

On this publish, we are going to introduce the very fundamentals of Mojo and examine them with their counterparts in Python. I’m certain you can be shocked by its syntax and effectivity when put next with Python.

Why Mojo

Mojo is presently a proprietary programming language developed by the AI firm Modular, whose purpose is to construct an extensible and unified AI platform that removes complexity and provides flexibility and velocity to AI improvement. And Mojo is the brand new language developed for this platform to unravel the AI infrastructure scaling and acceleration points. It’s the first programming language constructed with MLIR, a compiler infrastructure that’s perfect for heterogeneous {hardware} together with trendy CPUs and GPUs. In a nutshell, Mojo is a brand new language for AI.

Mojo and Python

Mojo is designed to be a superset (or superior model) of Python, just like how TypeScript is a superset of JavaScript which is a superb enhancement to JavaScript. Subsequently, it will likely be very simple for Python builders to get began with Mojo.

Python is a dominant language in ML/AI and plenty of different fields, particularly in data-related ones. Nonetheless, Python suffers from poor low-level efficiency and world interpreter lock (GIL) for concurrency. These points have lengthy been a headache subject for Python builders and are the embarrassing purpose why folks say Python is sluggish and never concurrent. They’re additionally an necessary proven fact that limits the event of Python and what makes Python find yourself as a glue language the place all core functionalities are developed in different extra…

[ad_2]