fnands.com

Translating Cython to Mojo, a first attempt

fnands · 87 points · 33 comments · 10月6日 · 打开原文

评论

5 条预览评论 · 正在加载完整讨论
hyperbovine10月7日

In my niche corner of scientific computing it feels like Cython has largely been replaced by Numba and CFFI, or just Julia. Last I checked it still needed setup.py which is a bit of a deal breaker in 2025.

adsharma10月6日

A more interesting path is to keep dbscan_inner in pure python with type annotations and then use py2many --mojo=1 dbscan_inner.py to translate.

RossBencina10月7日

Very interesting. I'm currently trading off whether to use Mojo or C++/pybind to accelerate simulations that combine matrix operations with fine-grained scalar calculations. I only recently learned that pybind + cppimport offers the integrated compile-on-import experience available in Mojo.

pjmlp10月7日

> I think moving a lot of scikit-learn’s more computationally intensive code to Mojo could be an interesting project. Only if you want to lose access to Windows users, as it is a low priority for Mojo development.

jononor10月8日

Mojo is not open source, so how can it be realistic to use it in scikit-learn? We spent decades getting out of the clutches of Mathworks, Microsoft, etc. Why are people eager to go back that way?