Why Julia is so much slower than Python? Invitation to Euler Project

Well, taking into account that, in Julia, one can look into the implementation of each function, probably, you are right.

Sure, you can look into previous implementations to learn lessons from them, but if you have special knowledge about your problem, such as “this custom array type only contains ones”, then you can write unbeatably-fast maximum and minimum functions (and sum and so on) that look nothing like the ‘built-in’ versions.

2 Likes

Issue solved: https://github.com/JuliaLang/julia/pull/37075. This function goes from 55 µs on Julia 1.5 to 1.6 μs on master, so a 35x speedup or so. No deep language changes required :grin:

5 Likes