Julia regularly outperforms C/C++/Fortran

A tweet from one of Julia’s core developers:

Read the original tweet (with the Julia ad banner), then read the response tweet: “something we deliberately don’t really use as a slogan”. Except everywhere, they do not use it anywhere.

3 Likes

Very true. Understandably, they regularly target Fortran, C, and C++. It is easy to target C (therefore C++ as well, since most C++ projects do include C code), because there are many things they can tell (and they do), such as you can easily write memory leaking code. So I think their primary target is Fortran, because if you know Fortran you immediately wonder what’s the need of Julia. I kind of understand why they do that, but “deliberately don’t really use as a slogan” is clear hypocrisy.

2 Likes

Is there some concrete small examples that can show Julia out performs Fortran?
Not to say that Julia cannot be faster than Fortran. But some concrete examples can be very useful.
If in some cases Julia is indeed faster than Fortran, I would like to know how does it achieve that, and how Fortran can improve.

One could also say that “C/C++/Fortran regularly outperforms Julia for problems when startup time matters”. Julia delay the whole compilation process until runtime which often works fine, but is problematic in many situations.

On a more serious note, I think Keno is quite accurate if you read the whole sequence of tweets:

Once you reach a certain level of performance, code generation quality differences basically go away. The same code, written in the same style will have basically the same perf across C/C++/Rust/Fortran/Julia etc.
At that point, other considerations like algorithmics and memory layout become the dominating perf question. Julia can help here, because it’s super easy to do extremely fancy algorithmic tricks that you just wouldn’t do in C/C++.

Essentially what Julia has to offer over C++/C/Fortran is state of the art language constructs for building code abstractions. This is indeed very powerful and I think the main downside of using e.g. Fortran.

However I find the lack of static typing and compile time analysis prohibiting. When I choose to use a language other than Fortran I choose one with more compile time checking, not less. I’d rather catch my own bugs than having my users report them to me!

I also don’t like the long startup durations and difficulties of packaging an application for distribution to users.

2 Likes

Should we bother? Fortran community is an elite niche and making it first- (or second- or third-) choice language for all is rather unlikely. Which does not mean we should not try to make it as popular as possible. And for Julia, best luck! In a few years somebody will design Natalie language and all the geeks will rush there and start tweeting How Natalie outperforms Julia

3 Likes

There was a previous thread on summation of trig functions, and I think there have been others.

1 Like

Agreed, except I consider “elite niche” a very good thing. Whenever I try something “mainstream” I usually start wondering how this thing became that popular - with very few exceptions, but exceptions just verify the rule. :laughing:

3 Likes

You are no exception in that :slight_smile: