-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[julia] Use package for the wrapper to speed up compilation #1259
Comments
So if it's user-code independent caching, yes we definitely can do it during installation. But we'll have to save it to a read-only directory on the installation path in |
That is sensible. We could be cute and just install it into the stdlib location. So @partouf is an after_stage_script like Line 10 in f7d9fb5
|
Is there a way to access the source of compiler-explorer/compiler-explorer within the staging process? It would probably make sense to vendor the source there since the output of it is coupled to the compiler invocation there. Or is the |
they are independent, but you could curl But for Julia nightly the script will run every night when it's being re-installed, just not for the fixed versions |
Thank you so much for the explanations! A start to address this issue is in #1264. |
I created a small Julia package,
CompilerExplorer.jl
, which simply replicates what the Julia wrapper in Compiler Explorer currently does. The code in that wrapper would simply becomeThe significant advantage is that when Julia code is saved into a package, it can cache some precompile code (and from Julia v1.9 onwards also native code), which can significantly improve runtime performance for the first run, as the methods called don't need to be JIT-compiled (or not as much extensively). Note that here I'm talking about the compilation of the functions calling the compiler infrastructure to eventually compile the code the user inputs in Compiler Explorer, that code will of course still have to be compiled regularly, but at least that'd be where most of the time will be spent.
As an example, for the default example code for the Julia language, in my local Compiler Explorer instance I get runtime going down from ~1800 ms with the current version of the wrapper
to ~400 ms with using the package
Using this package would also make testing easier for us for all versions, and hopefully avoid silly mistakes like compiler-explorer/compiler-explorer#5927 (comment).
I'm happy to make a PR to make this happen, but I want to understand whether this would be effective in the production version of Compiler Explorer. If we install this package during the installation of the Julia toolchain here, can we cache its precompiled code? By default Julia stores it in the
~/.julia/compiled
directory, but the location can be changed with the environment variableJULIA_DEPOT_PATH
, to accommodate whatever caching infrastructure is used here.CC: @vchuravy
The text was updated successfully, but these errors were encountered: