3 ms·
Indeed, you're totally right about that. That's the trick with Mojo, our goal is not to make dynamic python magically fast. Yes, we are quite a bit faster at
by chrislattner 3y ago
Indeed, you're totally right about that. That's the trick with Mojo, our goal is not to make dynamic python magically fast. Yes, we are quite a bit faster at dynamic code (because we have compiler instead of an interpreter) but that isn't by relying on a 'sufficiently smart' compiler to remove the dynamism, it is just because "compilers" instead of "interpreters".
The reason Mojo is way way faster than Python is because it give programmers control over static behavior and makes it super easy to adopt incrementally where it makes sense. The key payoff of this is that the compilation process is quite simple, there are no JITs required, you get predictable and controllable performance, and you still get dynamism where you ask for it.
Mojo doesn't aim to magically make Python code faster with no work (though it does accidentally do that a little bit), Mojo gives you control so you can care about performance where you want to. 80/20 rule and all that.
Mojo also has a more advanced ownership system than Rust or Swift, which is also pretty cool if you're into such things. Check out the programmer's manual here for more info:
https://docs.modular.com/mojo/ https://docs.modular.com/mojo/
-Chris Lattner @ Modular
- singularity2001 3y agoSince it's important to get important things right in the beginning: Please make Optional[T] as ergonomic as Swift and Kotlin with a simple '?'. Please use a general Vector pipeline instead of manual SIMD yuckness. Autotune was neat for the demo but should be hidden inside the compiler as quickly as possible. Please use 'import' to import python (and mojo dependencies with uppercase if necessary)
- chrislattner 3y agoI'm a fan of optional and other algebraic datatypes, you don't need to convince me. It's in our roadmap doc! :-) OTOH, Swift has way too much special purpose sugar which I'd prefer to reduce this time around, there are ways to have the best of both worlds - ergonomic and extensible.
- bobbylarrybobby 3y agoDoes this mean Mojo will have something like Rust’s Try trait? :D
- math_dandy 3y agoRemaining faithful to Python's syntax should certainly help avoid too much special purpose sugar. Most Python enthusiasts seem to be on low sugar diets.