struct
types for better performance and memory layout controlparallelize
function for easy multi-threading, potentially increasing speed by 2000x3fn
instead of def
, and explicit type annotations are required1. For example:
python# Mojo fn add(x: Int, y: Int) -> Int: return x + y