Why is julia slowest here?

I tried to convince my friend that Julia is faster than python, he googled it and found this(above), why is it that python is faster than Julia, and even JS. Is it something with code, or version?

1 Like
6 Likes

It’s not a proper language comparison. It consists of a single short piece of code, which also ignores all good practice for writing code. It just shows that if you don’t know a language, you can write slow code in that language :person_shrugging:

10 Likes

For a little bit of context, this repo includes startup time, which wouldn’t be a major problem, except that after putting the code in a function, the entire program takes 133 ms, and the startup of Julia takes 106ms. It’s true that this means Julia may not be the best choice for repeatedly launching very short running scripts, but that often isn’t the metric you care about.

2 Likes

For added amusement, Rust is way slower than Go.

That’s unexpected …