Hacker News new | past | comments | ask | show | jobs | submit login

The reason Julia should be able to do this is that it uses LLVM to generate machine code "just ahead of time". As such, (at least for type stable code), it should be possible to save the code we generate. The main place where static AOT matters for Julia isn't full applications, but libraries. Being able to generate static libraries would allow Julia to replace C++ and Fortran much more fully in places like python libraries. Furthermore, this capability is likely crucial in getting major further improvement in time to first plot. Currently `@time DifferentialEquations` takes about 11 seconds on my computer, but if more of the code could be statically compiled at precompile time, that could be reduced dramatically.



This is true for many functions, but afaik the llvm code is only generated for a function paired with the types of the arguments that it was called with. Since Julia functions are for the most part 'generic' and work with a wide range of argument types, you would have to restrict the compiled binary or library to a specific set of argument types. Some functions also have type instability and can't be made into pure llvm.


This is the first time I see my confusion so clearly addressed! Thanks, this makes total sense now!


> The main place where static AOT matters for Julia isn't full applications, but libraries.

That depends on the use case. With improvements in static compilation, julia could probably be a good application language. Game development would be an interesting market.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: