

Why Does Julia Work So Well?
source link: https://www.tuicool.com/articles/hit/YFF3eqE
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Why Does Julia Work So Well?
There is an obvious reason to choose Julia:
it's faster than other scripting languages, allowing you to have the rapid development of Python/MATLAB/R while producing code that is as fast as C/Fortran
Newcomers to Julia might be a little wary of that statement.
- Why not just make other scripting languages faster? If Julia can do it, why can't others?
- How do you interpert Julia benchmarks to confirm this? (This is surprisingly difficult for many!)
- That sounds like it violates the No-Free-Lunch heuristic. Is there really nothing lost?
Many people believe Julia is fast because it is Just-In-Time (JIT) compiled (i.e. every statement is run using compiled functions which are either compiled right before they are used, or cached compilations from before). This leads to questions about what Julia gives over JIT'd implementations of Python/R (and MATLAB by default uses a JIT). These JIT compilers have been optimized for far longer than Julia, so why should we be crazy and believe that somehow Julia quickly out-optimized all of them? However, that is a complete misunderstanding of Julia. What I want show, in a very visual way, is that Julia is fast because of its design decisions. The core design decision, type-stability through specialization via multiple-dispatch is what allows Julia to be very easy for a compiler to make into efficient code, but also allow the code to be very concise and "look like a scripting language". This will lead to some very clear performance gains.
But what we will see in this example is that Julia does not always act like other scripting languages. There are some "lunches lost" that we will have to understand. Understanding how this design decision effects the way you must code is crucial to producing efficient Julia code.
To see the difference, we only need to go as far as basic math.
Recommend
-
12
I’m speaking at Let’s sketch tech! in San Francisco in December. I’ve been thinking about what to talk about (the mechanics of making zines? how comics skills are different from drawing ski...
-
6
Day 12: Why Julia likes Julia Firstly, I will never get tired of the fact that Julia is called Julia. It is the best. It however makes it really hard to search for email with “Julia” in them in my inbox.
-
10
What is the Lisk Codec and How Well Does it Perform?June 21st 2021 new story5
-
7
Where Does NoSQL work well? It seems not too long ago that NoSQL was the hottest thing on the market. MongoDB was leading the cha...
-
4
Why you probably don't need Julia's "value type"? Many newcomers of the Julia language feel confused about the value type described in the
-
9
Why is it so hard to buy things that work well?I'm trying some experimental tiers on Patreon to see if I can get to substack-like...
-
9
Why I no longer recommend Julia Why I no longer recommend Julia For many years I used the Julia programming language for transforming, cleaning, analyzing, and visualizi...
-
3
Ruby Weekly Issue 608 « Prev
-
7
Why I still recommend Julia 2022-06-25 Yuri Vishnevsky wrote that he no longer recommends Julia. This caused lengthy discussions at
-
3
Siri Remote does not work well since IOS 16 update D
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK