Skip to content

Instantly share code, notes, and snippets.

View mstepien's full-sized avatar

Martin mstepien

View GitHub Profile
@eugeneyan
eugeneyan / mandelbrot-mojo.md
Last active April 4, 2024 15:52
Benchmarking Mojo vs. Python on Mandelbrot sets

Mandelbrot in Mojo with Python plots

Not only Mojo is great for writing high-performance code, but it also allows us to leverage huge Python ecosystem of libraries and tools. With seamless Python interoperability, Mojo can use Python for what it's good at, especially GUIs, without sacrificing performance in critical code. Let's take the classic Mandelbrot set algorithm and implement it in Mojo.

We'll introduce a Complex type and use it in our implementation.

Mandelbrot in python