Live data from Hacker News

How Mojo gets a speedup over Python – Part 2

modular.com

51–60 of 66 posts

Re: How Mojo gets a speedup over Python – Part 2

#51
post #31

Earlier quoted context omitted.

Have you played with Mojo? It really doesn’t feel high level. I feel like JAX has been eating Julia’s lunch lately, making me think that there’s a real market for a small functional differentiable programming language with good Python interop - like a more polished Dex or Futhark.

> Have you played with Mojo? Yes. > It really doesn’t feel high level. Does Python “feel high level”? Mojo is a proper superset of Python. Particular functions may deal with low-level machine features, that is unavoidable when extracting maximum performance from hardware. Mojo is pursuing some innovative ideas there, such as autotuning and adaptive compilation. As I said in a different post, I don’t think Mojo’s main…

> Mojo is a proper superset of Python.

Isn't it more that the plan is someday Mojo may be a proper superset of Python, but right now it is far from it? I just tried opening up the Mojo playground, copy/pasted the very first little example function from the official Python tutorial (see https://docs.python.org/3/tutorial/controlflow.html#defining...) and Mojo outputs a bunch of errors.

With Cython, our goal was to make it a proper superset of Python, and it was really difficult, but we got close.

Re: How Mojo gets a speedup over Python – Part 2

#52
Mojo needs to demonstrate Hugging Face's AI libraries with Mojo acceleration. Nothing else will have the kind of impact that would have.

Throw a half dozen engineers at it, develop a deployment plan for SD XL, profit.

You'll get a ton of open source developers working on improving the Mojo versions even further once you release it, researchers developing extensions, etc. GO TO WHERE THE DEVELOPERS ARE.

Stable Diffusion is crazy compute heavy, so if Mojo is what it's purported to be, it should be possible to get speedups.

Re: How Mojo gets a speedup over Python – Part 2

#53

I'm really interested in Mojo not for its AI applications, but as an alternative to Julia for high performance computing. Like Julia, Mojo is also attempting to solve the two-language problem, but I like that Mojo is coming at it from a Python perspective rather than trying to create new syntax. For better or for worse, Python is absolutely dominating in the field of scientific computing, and I don't see that changin…

They already failed once with Swift for Tensorflow, so I am currently curious if there will be some lessons learned from that effort.

For the time being, my chips are still on the Julia horse.

Re: How Mojo gets a speedup over Python – Part 2

#55
post #33
post #26

Earlier quoted context omitted.

Totally, just trying to understand why this is a $100MM of VC money investment. Is the market that big for this? (Honest question)

I feel like there’s 100m of VC money here because it’s Chris Lattner’s company and he’s the best compilers person in the world right now.

One of, yes.

Not the best, and already has failures like Swift for Tensorflow.

Re: How Mojo gets a speedup over Python – Part 2

#56

They lost me with the emoji for file extension. That’s not a world I want to live in.

This, while being an apparently superfluous complaint, would be important for eventual enterprise adoption.

Other languages have failed for less visible reasons.

Re: How Mojo gets a speedup over Python – Part 2

#57
post #53

I'm really interested in Mojo not for its AI applications, but as an alternative to Julia for high performance computing. Like Julia, Mojo is also attempting to solve the two-language problem, but I like that Mojo is coming at it from a Python perspective rather than trying to create new syntax. For better or for worse, Python is absolutely dominating in the field of scientific computing, and I don't see that changin…

They already failed once with Swift for Tensorflow, so I am currently curious if there will be some lessons learned from that effort. For the time being, my chips are still on the Julia horse.

I’m a huge Julia fan, you can take a look at my posting history. I love Julia’s syntax, and some of its language ideas.

…BUT…

For my personal tastes, Mojo’s lack of garbage collection, Rust-like memory safety, and attention to ahead-of-time compilation put it way ahead. The vast pool of Python developers who can easily pick it up if interested is a big plus.

Julia is aimed at a somewhat different space, but there’s also a huge overlap.

Let’s hope for good interoperability between the two, it seems fairly straightforward…

Re: How Mojo gets a speedup over Python – Part 2

#58
post #53

Earlier quoted context omitted.

They already failed once with Swift for Tensorflow, so I am currently curious if there will be some lessons learned from that effort. For the time being, my chips are still on the Julia horse.

I’m a huge Julia fan, you can take a look at my posting history. I love Julia’s syntax, and some of its language ideas. …BUT… For my personal tastes, Mojo’s lack of garbage collection, Rust-like memory safety, and attention to ahead-of-time compilation put it way ahead. The vast pool of Python developers who can easily pick it up if interested is a big plus. Julia is aimed at a somewhat different space, but there’s a…

Lets see how it plays out, given that they are focused only on AI workloads, and somehow those VCs want their money back, which doesn't appeal to everyone.

I acknowledge that there is finally pressure in the Python community to tackle down performance, but don't see Mojo being the solution unless there is something that it will make it go wild.

Right now, I see that more likely with Facebook, NVidia, Intel and Microsoft efforts.

Re: How Mojo gets a speedup over Python – Part 2

#59
post #33
post #26

Earlier quoted context omitted.

Totally, just trying to understand why this is a $100MM of VC money investment. Is the market that big for this? (Honest question)

I feel like there’s 100m of VC money here because it’s Chris Lattner’s company and he’s the best compilers person in the world right now.

Most famous in Silicon Valley, maybe?

Kotlin is similar to Swift but arguably compiles much faster despite a suboptimal initial architecture, and avoids weird language/compiler specific problems never before seen, like expressions that time out whilst compiling.

Graal is similar to LLVM but can compile a far larger range of languages, is actually used for both JIT and AOT compilation (does anyone use llvm jit in prod?), and has many innovations LLVM never could have even tried to have.

So it's not really clear that he's the best compiler person in the world. More like, the people doing the other stuff aren't in California so don't get the same level of attention.

Re: How Mojo gets a speedup over Python – Part 2

#60
post #3

Earlier quoted context omitted.

Getting >10x speed up isn’t exciting enough for many people? I’ll take it. This is all pretty impressive if I can take my unmodified (slightly modified?) Python code and get that sort of improvement.

> This is all pretty impressive if I can take my unmodified (slightly modified?) Python code and get that sort of improvement. it'll never work as smoothly as they advertise. just hands down, beyond a shadow of a doubt, their claims about supporting "unmodified" Python code are startup hype. how do i know? i could give you a bunch of technical reasons about Python as a language and CPython as the de facto implementat…

It's not 10x but GraalPy can speed up unmodified Python by 3.4x on average:

https://www.graalvm.org/python/

And they've not been going at it that long. A few years at most.

Post reply on HN