-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Compilation time grows quickly with size of functions #16434
Comments
fwiw, runtime performance of that function will also be poor due to the size of the function. Modern processors are much faster at doing loops than long straight-line code. |
Might be related to #6685. The time seems to be in type inference, perhaps mostly |
That would be great! In the meantime, I have been experimenting with splitting up the code.
and then creates functions to operate on a subset of the variables of the type at a time (100 variables and 100 statements at a time). It generates and compiles a function that will operate on the last 100 variables in this case: module BigFunction5
Time for compiling the function that operates on the last 100 variables grows substantially with the size of the type
Time for compiling the function that operates on the first 100 variables stays constant when the type grows, on the other hand. Could this behavior be related? |
fix #16434, superlinear compiler run time on large functions
Consider the following code,
which creates functions like
and records the compilation time as a function of the number of computations
n
.The result I got was (with an 81 days old Julia 0.5)
ie it seems that the compilation time scales at least quadratically with the size of the function. Reducing the amount of optimization with
julia -O0
orjulia -O1
doesn't seem to help either.Is there anything that can be done about this?
The text was updated successfully, but these errors were encountered: