Making Julia as Fast as C++ (2019)
flow.byu.edu
Making Julia as Fast as C++ (2019)
1–10 of 64 posts
Re: Making Julia as Fast as C++ (2019)
#2Re: Making Julia as Fast as C++ (2019)
#3Re: Making Julia as Fast as C++ (2019)
#4Re: Making Julia as Fast as C++ (2019)
#5End result: code that is uglier and still much slower than C++. Kind of a shame.
Re: Making Julia as Fast as C++ (2019)
#6One could say that we can almost replicate the semantic of a C++ program, but writing in Julia. For example we can remove bounds checks in arrays or remove hidden memory allocations.
But the goal of a language for numerical computing is capturing the mathematical formulas using high level constructs closer to the original representation while compiling to efficient code.
Domain scientists want to play with the math and the formulas, not doing common subexpression elimination in their programs. Just curious to see how it evolves
Re: Making Julia as Fast as C++ (2019)
#7Punchline: rewrote the code to look almost identical to C++, hand-held the compiler by adding @-marks to disable safety checks, forced SIMD codegen and fastmath on. End result: code that is uglier and still much slower than C++. Kind of a shame.
Oh such a shame indeed! They didn’t even manage to produce better looking code at least?? Julia was looking great in 2019 but it was very buggy still so I stopped looking. Had hopes that by now it would be a good choice over C++ and Rust with similar performance.
Re: Making Julia as Fast as C++ (2019)
#8Very interesting post and I think this exposes the limitations of the Julia compiler. Note that an old version of the compiler is used (1.0.3 from 2019). One could say that we can almost replicate the semantic of a C++ program, but writing in Julia. For example we can remove bounds checks in arrays or remove hidden memory allocations. But the goal of a language for numerical computing is capturing the mathematical fo…
Re: Making Julia as Fast as C++ (2019)
#9Punchline: rewrote the code to look almost identical to C++, hand-held the compiler by adding @-marks to disable safety checks, forced SIMD codegen and fastmath on. End result: code that is uglier and still much slower than C++. Kind of a shame.
Re: Making Julia as Fast as C++ (2019)
#10Punchline: rewrote the code to look almost identical to C++, hand-held the compiler by adding @-marks to disable safety checks, forced SIMD codegen and fastmath on. End result: code that is uglier and still much slower than C++. Kind of a shame.
> code that is uglier and still much slower than C++. Oh such a shame indeed! They didn’t even manage to produce better looking code at least?? Julia was looking great in 2019 but it was very buggy still so I stopped looking. Had hopes that by now it would be a good choice over C++ and Rust with similar performance.
I have always seen it as a potential alternative to Java, and definitely better than Python.
My experience working in it professionally was that it was... fine. But the GC in it was not good under load and not competitive with Java's.