9 ms·
I'd like to see how Mojo performs here
by fhn 12d ago
I'd like to see how Mojo performs here
- cmontella 11d agohttps://raw.githubusercontent.com/mech-lang/mech/codex/pypy-ekf-mega-chart/benchmarks/archive/compute/parallel-ekf/charts/parallel-ekf-cross-language-checked.svg https://raw.githubusercontent.com/mech-lang/mech/codex/pypy-... I added PyPy and Mojo. PyPy performs valiantly compared to Cpython -- even better than LuaJIT. I'm sure someone skilled at writing it could do an even better job. I measured 3 Mojo implementations. The first is a dynamic implementation, it performs like a typical dynamic language. Then when you use Mojo's SIMD intrinsics you can get compiled-tier performance in line with Futhark, Julia, Rust etc. Then if you use their Max toolchain you can compile Mojo directly to Metal, with performance at the top of the stack (for the amount of money Qualcomm paid they'd better be there!). The Rust / Mech version was rewritten to put it back on top, but the unchecked test is about equal. Basically if a toolchain can emit direct Metal code there's nothing preventing equal performance it seems, so the magic is in the compiler. Although there is some abstraction overhead depending on how you get there e.g. going wgpu->Metal has a penalty over going directly to Metal. The big disclaimer again is that all of these measurements should be taken as lower bounds for one algorithm on one machine. I'm sure expert performance engineers could do better.