Rough investigation: Open-source solver time and memory penalties
#25
Hi Antti-L - yes, I think that the way demo.jl is re-running "include" statements forces Julia to re-compile the code each time. I suspect something similar will likely be the case where eval is being used. I was just profiling the second run of a function into which I'd splatted in all of Olex's code: https://github.com/willcattoneeca/TIMES....e.jl#L1192
The typical pattern is to bundle different bits of functionality as functions (or custom types) in modules that can then be precompiled, but I think even precompiled module code requires JIT compilation the first time it executes - implying that in Julia it would be more efficient to run scenarios in batches rather than one at a time, etc.

Edit - Actually, it looks like there is a solution available to avoid that slow first execution as well:
https://github.com/JuliaLang/PackageCompiler.jl
Reply


Messages In This Thread
RE: Rough investigation: Open-source solver time and memory penalties - by willcattoneeca - 10-09-2024, 03:24 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)