Speed up K-Means clustering by porting Python implementation to Mojo🔥

Опубликовано: 29 Январь 2025
на канале: Modular
3,607
137

In this video we'll share a step-by-step guide to porting kmeans clustering from Python+NumPy to pure Mojo for huge (250x) speedup! How? Mojo is Pythonic in syntax and makes it easy to write fast vectorized and parallelized code!

Code referenced in video: https://github.com/modularml/devrel-e...

Blog post referenced in video: https://www.modular.com/blog/fast-k-m...

Chapters:
00:00 Introduction
01:06 What is k-means clustering?
05:06 High-level differences between Python and Mojo implementations of K-Means
06:53 Python and Mojo implementation: A walkthrough in VSCode
20:16 Benchmark results

Join our Community! 🚀
Discord -   / discord  
Github - https://github.com/modularml/mojo
X (aka Twitter) - https://x.com/modular