dhoegh / BuildExecutable.jl

Build a standalone executables from a Julia script
Other
156 stars 21 forks source link

BuildExecutable use-case question #40

Open GravityAssisted opened 7 years ago

GravityAssisted commented 7 years ago

Thanks for making this package.

I am relatively new to Julia and am trying to get rid of the JIT overhead in my application.

Is it true, if I use BuildExecutable and upon using the executable, I should get no JIT overhead ? So basically mimic a 2nd time call to the script (like we do for benchmarking) ?

thanks!

amellnik commented 7 years ago

I'm pretty sure you will still have the JIT overhead based on the discussion here, but @dhoegh can confirm.

GravityAssisted commented 7 years ago

@amellnik Thanks, does that mean that BuildExecutable does not do a static compilation ? I am trying to see how I can remove the JIT overhead from my application. I don't use any dynamic features like (@eval) etc.

amellnik commented 7 years ago

That's my understanding -- see for example @ChrisRackauckas's post here. All this package does is bundle julia along with the script in an executable.

dhoegh commented 7 years ago

Yes that's correct and hence it will still require jit compilation of the methods. But technically you could get rid of the jit, by ensuring all functions in a module is precompiled with the correct arguments and having type stable functions, but that's true for any module with precompilation on.

GravityAssisted commented 7 years ago

@amellnik , @dhoegh Thanks, I see. What do you guys think about this post from @vtjnash ? It lays out a way to achieve static compilation, but looks little daunting.

ChrisRackauckas commented 7 years ago

@amellnik , @dhoegh Thanks, I see. What do you guys think about this post from @vtjnash ? It lays out a way to achieve static compilation, but looks little daunting.

Yeah, static compilation works (in many cases), and you can follow that to do it. What we really need is someone to make a package that makes static compilation easier. That just requiring really figuring out how to do it, and automating some of the steps. Since it's all nicely laid out in one giant blog post, the "hard" work is already done, and icing shouldn't be too hard.

jpfairbanks commented 7 years ago

I just found this package based on @ChrisRackauckas's discourse post and I have a question about usage. So the use case I have is to bundle a julia script into an EXE that users on Windows can use "without installing anything" I don't know the exact definition of "without installing anything" on windows. But I know that using an administrator account to modify some system files definitely won't fly. It doesn't matter if the julia runtime and LLVM come with that EXE, either way it satisfies the constraints.

Will BuildExecutible.jl work for such a use case? Namely, make an EXE that you can run with a double click without an Admin account?