4 ms·
The beauty of Julia is in its design as a language. This is what gives people hope that the tooling and ecosystem will emerge -- they all seem easier to develop
by celrod 8y ago
The beauty of Julia is in its design as a language. This is what gives people hope that the tooling and ecosystem will emerge -- they all seem easier to develop in Julia than in other languages, thanks to multiple dispatch, the type system, and powerful metaprogramming abilities.
As far as fast bare metal languages go, you can write extremely general optimized matrix multiplication libraries in Julia. For matrices that fit in the L2 cache, I achieved performance similar to Intel MKL, but with far more generic code.
https://discourse.julialang.org/t/we-can-write-an-optimized-blas-library-in-pure-julia-please-skip-op-and-jump-to-post-4/11634/4?u=elrod https://discourse.julialang.org/t/we-can-write-an-optimized-...
Writing a kernel in C means using SIMD intrinsics, where function names and types differ for every vector size, and then different numbers/sets of calls for each kernel (you'd want several sizes per architecture). Compare this to Julia, where parametric typing and multiple dispatch mean you only need one set of functions, and using an @generated function will generate whatever kernels you happen to need at compile time.
Looking into the future, awesome projects like Cassete speak to the potential of what's possible:
https://github.com/jrevels/Cassette.jl https://github.com/jrevels/Cassette.jl
Cassete promises to let you do anything from getting automatic differentiation for arbitrary Julia code, even if it is strictly typed and buried in a chain of dependencies of the library you're using and written by someone who never imagined the idea of autodiff, to injecting custom compiler passes.
Also, while I haven't tried it yet, many seem to like:
https://github.com/timholy/Rebugger.jl https://github.com/timholy/Rebugger.jl
Julia is more promise than practice right now, but that's largely because of just how much it promises. I (and many others) think it has done a great job delivering so far.
That's why there's excitement, and why many are starting to embrace it.
- marmaduke 8y ago> Writing a kernel in C means using SIMD intrinsics, where function names and types differ for every vector size, and then different numbers/sets of calls for each kernel (you'd want several sizes per architecture) This is not true for any recent, competent compiler. I can write a template function in C++ code with a regular loop over arrays and it gets vectorized withSIMD instructions automatically according to architecture. Sure, it’s not JIT but it still never requires intrinsics
- pjmlp 8y agoSure you can, but when one weights the language complexities and opportunities for unsafe code/UB, Julia certainly wins in productivity.
- marmaduke 8y agoIf you can deploy that runtime maybe. How well does Julia work when you need to ship a static library?
- pjmlp 8y agoAs far as I know, Julia only allows for dynamic libraries. https://github.com/JuliaLang/PackageCompiler.jl https://github.com/JuliaLang/PackageCompiler.jl Which really for me they are good enough, I don't remember the last time I cared about producing a .a/.lib file for delivery.
- ChrisRackauckas 8y agoIt can make static libraries. There are some old blog posts on how it can be done. No one has packaged it up though, and it will always be limited to chosen specializations of course.
- dnautics 8y agoUse a container. I recommend singularity, works great with julia. Shipped a single binary, deployed on a supercompute center, ran 20 batches over 500 nodes, 16 cores per node, no problem.