4 ms·
High performance numerical computing is one area that garbage collection doesn't really matter though, unlike real-time applications that needs consistency more
by ddragon 8y ago
High performance numerical computing is one area that garbage collection doesn't really matter though, unlike real-time applications that needs consistency more than raw speed. Some occasional milliseconds (or even seconds) long stop-the-world GC won't really affect anything in an hour long or days long simulation, training or calculation. Not to mention you don't really allocate that much in many of those applications, in ML for example is not unusual to allocate all tensors once and just update the values during the training loop (usually on GPUs or TPUs), so there won't be anything to even trigger GC.
And for Julia in particular, there isn't really a need for bindings over C/C++ (the whole purpose of the language is not requiring another language for performance). Many of the most popular libraries for numeric computing are 100% written Julia, including Flux.jl [1] for Machine Learning and DifferentialEquations.jl [2]. Plus even real-time applications can be done with careful programming, since Julia allows writing programs with either no or minimal allocations, for example [3].
[1] https://github.com/FluxML/Flux.jl https://github.com/FluxML/Flux.jl
[2] https://github.com/JuliaDiffEq/DifferentialEquations.jl https://github.com/JuliaDiffEq/DifferentialEquations.jl
[3] https://juliacomputing.com/case-studies/mit-robotics.html https://juliacomputing.com/case-studies/mit-robotics.html