3 ms·
Julia is solving many of the same problems as C++. GPU compute, HPC, high performance algebra kernels are all well within Julia's purview. It's not (at least ye
by adgjlsfhk1 4y ago
Julia is solving many of the same problems as C++. GPU compute, HPC, high performance algebra kernels are all well within Julia's purview. It's not (at least yet) good for things like writing OS kernels but there is a large amount of overlap with C++.
- programmer_dude 4y agoIsn't Julia a dynamically typed language?
- eigenspace 4y agoYes. So what?
- programmer_dude 4y agoThen it is not a replacement for C++. It's going to be slow.
- adgjlsfhk1 4y agoit's not. it uses type inference to infer types and llvm to compile down to native code. differentialequations.jl is often faster than the fastest C and Fortran solvers, and Octavian.jl often beats MKL at matrix multiplication.
- programmer_dude 4y agoType inference changes things. It's awesome that it can beat handwritten C and Fortran code.
- eigenspace 4y agoStatic types are not required for things like type inference and optimizing compilers. It's just that many dynamic languages are not written with performance in mind, and have semantics that make optimization impossible. Julia was designed from the ground up to have C level performance, and well written Julia code does that easily in throughput focused scenarios. Julia's intermediate representation which it compiles dynamic code down to is statically typed, and any dynamism just manifests itself as the compiler waiting until the types are resolved at runtime before running again and generating new specialized code. If your code is written so that the types are all inferrable, there's no pauses.
- timbit42 4y agoYes, but it's strongly typed, which is more important.
- programmer_dude 4y agoYes but C++ is strongly and statically typed. Julia is not even running in the same race as C++.
- pjmlp 4y agoWhile being written in C++, so it can't make C++ go away in those domains.
- adgjlsfhk1 4y agollvm is c++ but almost all of Julia is written in Julia. codegen and the subtyping algorithm are the two main things written in C/C++.
- pjmlp 4y agoIndeed, that doesn't change the matter that Julia depends on C++ until the day someone bootstraps the whole toolchain.