Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

Compilation #8

Open
SimonDanisch opened this issue May 6, 2021 · 0 comments
Open

Compilation #8

SimonDanisch opened this issue May 6, 2021 · 0 comments

Comments

@SimonDanisch
Copy link
Member

Just realized, I should have this live here, before my comments about the compile times findings die in slack.
Findings:
Some very small functions from other packages make up the majority of the compile times. Those functions are also used by the current Makie. So, I plan to make a couple of small improvements to those packages to introduce "compiler fast paths".
This should also speed up Makie's ttfp, but of course will have a smaller impact on the total compilation...
I guess we'll simply need to just slowly rewrite dependencies to rely less on crazy type inference, or make sure that it's at least cached in the precompile stage.
Everyone could join this effort... It's mainly subtle things like Mat4f0(I) calling a huge chain of helper functions to determine what to do, while the task is to simply create a diagonal matrix. To fix this, one can write a non generic fallback that just deals with this case and is instant to compile 😉
Or this line accounted for almost 0.4s compilation times, since ColorTypes goes through crazy hoops to figure out how to convert generic colorants to a specific color.
Here is a list of the current biggest offenders, found out by running this: https://github.com/JuliaPlots/MakieCore.jl/blob/master/test/runtests.jl#L14
Thanks a lot to @tim Holy to put a ton of work into these tools, and also putting a lot of time into kickstarting Makie compile time improvements 🙂

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant