Hi!
I’m new here and maybe I’m not doing it the right way, if so I’m sorry for my ignorance.
So I’m interested in precompiling and trimming a Julia program to decrease the startup time and avoid compilation during execution. I’m working on porting a widely used (both in academy and industry) C++ discrete event simulation kernel (omnet++) for communication network simulation and it’s largest model library (INET framework) to Julia. I’m actually one of the core developers of them. I have a number of good reasons to try to make this work in Julia but that’s for another day.
I already have a working simulation kernel and some simpler simulation models already ported. I’m ok with working from the repl and the dynamic compilation works beautifully. The simulations run with speed comparable to c++, sometimes even faster. But it’s not always the case that the user wants to use the repl. So I used the PackageCompiler.jl and juliac (1.13) to get a precompiled and trimmed version of the simulator for a specific model.
I faced several difficulties along the way (like dealing with abstract types which have many concrete implementations). I can already make a precompiled image that is fast when executed, but it’s unnecessarily large and so it takes too much time to initialize. I could also make a trimmed executable (although I had to modify the trimmer for this to avoid comlicating the program) which is small enough (6MB instead of 600MB) but it’s almost 2 times slower then the version running in the repl. Remember, I’m trying to get close to C++ performance here.
I wonder why that would be the case? Isn’t trim supposed to reduce size while keeping performance?
There are many details to this issue and I don’t want to go into them right here. So my question is this: what is the right place to find people who can help me reach my goal?
Thanks,
levy