NWCPP Language Panel

ted.neward@newardassociates.com | Blog: http://blogs.newardassociates.com | Github: tedneward | LinkedIn: tedneward

Mojo: An Overview

A very short overview

Mojo: An Overview

What is this?

"a pythonic language for blazing-fast CPU+GPU execution on the MAX Platform"

"Mojo is an innovative, high-performance programming language designed for writing systems-level code for AI workloads."

https://www.modular.com/mojo

"a programming language in the Python family that is currently under development. It is available both in browsers via Jupyter notebooks, and locally on Linux and macOS. Mojo aims to combine the usability of a high-level programming language, specifically Python, with the performance of a system programming language such as C++, Rust, and Zig."

https://en.wikipedia.org/wiki/Mojo_(programming_language)

Mojo: An Overview

What is this?

Mojo: In Brief

A very quick run

Mojo: In Brief

Overview

Mojo: In Brief

Memory-Safety Features

Mojo: In Brief

Thread-Safety Features

Mojo: In Brief

Performance

Mojo: In Brief

Development Ecosystem

Mojo: In Brief

Other considerations

C#: An Overview

What is this thing?

C#: An Overview

Language

C#: An Overview

Runtime/Execution Environment: CLR

Comparison code

C# using "raw" threads

public class RawThreads {
    public static void Go(Counter c) {
        const int THREADS = 100;
        const int INCS_PER_THREAD = 1000;

        List<Thread> threads = new List<Thread>();
        for (int i=0; i<THREADS; i++) {
            Thread t = new Thread(() => {
                for (int j=0; j<INCS_PER_THREAD; j++) {
                    c.Increment();
                }
            });
            threads.Add(t);
        }
        foreach (var thread in threads) {
            thread.Start();
        }
        foreach (var thread in threads) {
            thread.Join();
        }
    }
}

Comparison code

C# using implicit TAP

public class ImplicitTasks {
    public static void Go(Counter c) {
        const int THREADS = 100;
        const int INCS_PER_THREAD = 1000;

        Parallel.For(0, THREADS, i => {
            for (int j=0; j<INCS_PER_THREAD; j++) {
                c.Increment();
            }
        });
    }
}

C#: In Brief

A very quick run

C#: In Brief

Overview

C#: In Brief

Memory-Safety Features

C#: In Brief

Thread-Safety Features

C#: In Brief

Performance

C#: In Brief

Development Ecosystem

C#: In Brief

Other considerations

Credentials

Who is this guy?