Live data from Hacker News

Julia and Mojo Mandelbrot Benchmark

discourse.julialang.org

41–50 of 168 posts

Re: Julia and Mojo Mandelbrot Benchmark

#41
post #31
post #6

Whilst the Julia version currently beats Mojo, I fully expect both to approach basically the same performance with enough tinkering, and for that performance to be on par with C or Fortran. A more interesting question is which version is more elegant, ‘obvious’ and maintainable. (Deeply familiar with both, but money is on Julia).

IMO the reason Julia gets to be this fast is because of LLVM, and the guy who created LLVM is also the creator of Mojo so there is something to be said about that

My understanding is that Julia gets to be this fast because the language design was optimized for performance from the beginning, by clever use of its type hierarchy and multiple dispatch for compilation into very specific and efficient machine code (plus a thousand other little optimizations like constant propagation, auto-vectorization, etc.)

LLVM helps with its own optimizations, but more and more of those optimizations are being moved to the Julia side nowadays (since the language has more semantic understanding of the code and can do better optimizations). I believe the main thing LLVM helps with is portability across many platforms, without having to write individual backends for each one.

Re: Julia and Mojo Mandelbrot Benchmark

#42

It is still fascinating that lisp languages lost to python for AI and data processing and now pretty much everything else. In a perfect world , we would be using lisp or lisp like languages for everything

What do you mean by lisp-like?

If you mean “primarily uses S-expressions” then I guess I dont really see why that’s so important to you.

If you mean a language that is semantically similar to lisps and learned a lot of the important lessons that Lisp taught the programming world, I think Julia is one of the Lispiest languages in this space right now.

The syntax may not be S-expression based on the surface, but our Exprs are actually essentially just S-espressions so writing syntactic macros is very easy. The language is about as dynamic as is possible without major performance concessions, and is very heavily influenced by a lot of design ideas from the CLOS, with some features missing but also some cool features CLOS doesnt have.

Re: Julia and Mojo Mandelbrot Benchmark

#43

It is still fascinating that lisp languages lost to python for AI and data processing and now pretty much everything else. In a perfect world , we would be using lisp or lisp like languages for everything

For reference:

Julia is basically a Lisp under the hood. From playing around with it, it seems like the REPL experience is up there too.

Re: Julia and Mojo Mandelbrot Benchmark

#44

Mojo released an example of their new language which will mean readability and simplicity compared to the Python implementation will surely have been a requirement… I get someone within Modular doing some horrific looking low-level Mojo stuff could get it much quicker.

> Mojo released an example of their new language which will mean readability and simplicity compared to the Python implementation will surely have been a requirement…

Did you read the Mojo code? It’s very messy and low-level dealing with explicit SIMD intrinsics and such.

Re: Julia and Mojo Mandelbrot Benchmark

#45
post #27

Earlier quoted context omitted.

Not if you want to avoid condescending "I cannot look at the Python code my eyes hurt" comments. Good to know the Julia community hasn't made any progress in that regard, though.

[flagged]

Personally insulting someone because they pointed out something negative about the community kind of supports what I said.

Re: Julia and Mojo Mandelbrot Benchmark

#46
post #4

In my opinion, the issue that will make more of a difference in the long run is Mojo's first-class support for AoT compiled binaries (as well as JIT compilation). Julia's poor AoT support (with small binaries) is a major Achilles heel. I really wish that the Julia developers had taken that more seriously earlier on.

I think in the long run the real difference will be if mojo gets accepted into industry usage given it initially looks like it is closer to python. Julia has struggled getting wider industry adoption and mojo is currently selling itself as minimal uplift from existing python which will help the sell in industry.

Re: Julia and Mojo Mandelbrot Benchmark

#47

It is still fascinating that lisp languages lost to python for AI and data processing and now pretty much everything else. In a perfect world , we would be using lisp or lisp like languages for everything

What do you mean by lisp-like? If you mean “primarily uses S-expressions” then I guess I dont really see why that’s so important to you. If you mean a language that is semantically similar to lisps and learned a lot of the important lessons that Lisp taught the programming world, I think Julia is one of the Lispiest languages in this space right now. The syntax may not be S-expression based on the surface, but our Ex…

I think the point the GP is making is that Julia (and other lisps) lost in this space.

Re: Julia and Mojo Mandelbrot Benchmark

#48

there are so many fractal benchmarks floating around, but i’ve never seen any cool interactive fractal applications, eg interactive visualizations that smoothly redraw changes over time, or respond to input. has anyone seen programs like that?

Look at Taichi at Github. This library for Python seems not very popular and unaware. Maybe, because it is a Chinese development, but Taichi is simple and compiles directly down to kernels on CUDA, GPU, Metal, Vulkan and has batteries included. Beats the fastest Mojo implementation of the Mandelbrot set about 260 times faster. https://github.com/taichi-dev/taichi

Re: Julia and Mojo Mandelbrot Benchmark

#49
post #13

As long as you can copy and paste Python code to Mojo and it is 1:1 compatible with all your existing libraries and is hundreds of times faster than Python, that is much better than wasting time rewriting it in another language that is 8x faster than Mojo (in its first release) with hand-optimizations from Julia language experts. I expect Mojo's first release to be fast enough that it would get the Python folks using…

> The least amount of effort to get something done much faster wins by default. And then you’re stuck with a proprietary language “subscribe to download”? Not sure it’s the least amount of effort honestly.

It's only closed-source for now, with plans to open-source the language when it's more finalized - similar to LLVM early on. Not sure if it says so explicitly on their website somewhere, but Chris Lattner has stated that several times

Re: Julia and Mojo Mandelbrot Benchmark

#50

It is still fascinating that lisp languages lost to python for AI and data processing and now pretty much everything else. In a perfect world , we would be using lisp or lisp like languages for everything

What do you mean by lisp-like? If you mean “primarily uses S-expressions” then I guess I dont really see why that’s so important to you. If you mean a language that is semantically similar to lisps and learned a lot of the important lessons that Lisp taught the programming world, I think Julia is one of the Lispiest languages in this space right now. The syntax may not be S-expression based on the surface, but our Ex…

I certainly consider Julia to be a Lisp, and I’m pretty sure that’s what the person you responded meant, too. His point remains true: Julia appears to have little chance of overtaking Python, except in some tiny niche areas. And even in these niche areas, I fear that Julia will end up losing to Mojo.

I really hope I am wrong. I love Julia and would like to see it succeed everywhere, but it doesn’t seem to be happening.

Post reply on HN