Hacker News new | ask | show | jobs
by tastyminerals 2143 days ago
Julia is fast but not faster and very memory hungry. If you care about squeezing every bit of performance you generally go to C++. If you too lazy for C++ you go D. Hence to me, Julia is an odd tool. Interesting but more as a language with some cool scientific libs that Python might not yet have.
3 comments

This is what I meant when I stated

> It's amazing to realize that writing down the first thing that comes to your head is usually like 80% as fast as a good, performant implementation. (As someone who has done a decent amount of work in performance engineering for embedded platforms, I really enjoy squeezing out the last drop of performance from most programs, but doing this for every single first-pass at a program, like in Python, is rather annoying if this is what is needed to get a usable implementation.)

Yes, Julia is not necessarily faster than a good C implementation (that doesn't leak, etc), but, like Python, what would be a 300-line C implementation, where one has to somewhat carefully manage typing and the abstraction is really rather complicated for something that is mathematically simple, we can usually write 20 lines of very performant Julia that is 95% as fast.

Attempting to do something relatively similar in Python is often slow enough that giving a practical implementation essentially needs to be coded in C and interfaced with Python, where we return (again!) back to the same problem we had before: writing a 300+ line C file for something that should be rather simple, mathematically speaking.

Another important consideration is library development. As someone developing a large library, when we were previously developing in C++ we would encounter large barriers where some design goal we had either couldn't be done in the language in a practical sense or would require hours of tweaking things like template constraints to work correctly. Our users also had such a hard time extending our library's features they usually gave up and just waited for us to add features for them.

Now that we're developing in Julia we can realize our designs as we envisioned them with very little code. Features like multiple dispatch have been a lifesaver for us. And we are getting performance that is quite close to C++. Now we're looking forward to using features like composable multithreading.

One could wonder "why not use python?" but for performance reasons one ends up with the 'two-language problem' which we wanted to avoid.

I don't see D get the eco-system that Julia has managed to gather so far, many renowned institutions are already publishing papers using Julia.

Other than Mir, there is very little to choose from.

True, the D numeric ecosystem cannot be compared to Julia's and I would pick Julia if I was a scientist of course. Notice, I was talking about performance though.
Performance is meaningless if there isn't a library ecosystem to use it.
It is but it speaks a lot about the quality of language design, language defaults and the algorithms in standard library.
Which is also meaningless if the eco-system doesn't grow as much as the competition.

D users put the language into a pedestal of language design, but that isn't what grows an eco-system, getting new users and libraries does.

I used to love the language, but so many mistakes have been made during the last 10 years, that it will hardly recover unless some company champions it, Swift/Kotlin style.

I agree. However, I wish more people valued solid foundations over tooling because no tooling is worth building on "good-enough" basis. If that ever was true we would have never had the situation when we desperately seek for alternatives and create numerous solutions each coming with its baggage of gotchas like "yeah, but you need to use this PackageCompiler library to make it faster".

So after reading the release notes about 6 sec. of start-up times and people keep complaining about warm-ups, I am smirking about how Julia is a dynamic language when compiling & executing a script written in a static language other than let's say Scala/Rust/C++ can be comparable or even faster in some situations.