2 ms·
What's unsaid here, is that such construct could be optimized way more for speed than data classes because: - it's immutable - doesn't have methods so no over
by BiteCode_dev 3y ago
What's unsaid here, is that such construct could be optimized way more for speed than data classes because:
- it's immutable
- doesn't have methods so no overloaded operator or dynamic attribute/index accesss
- shape is known and is set in stone
That's why Mojo has them, and why they are the bread and butter in Rust.
It's one of the step in the direction of a faster Python.