-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
latencyLatencyLatencyregressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous version
Milestone
Description
Edit: it looks like #41827 (which is a bug fix) introduced the performance regression.
Running the script below shows that demo_slow
takes about 30 seconds to compile in Julia 1.8-DEV (9a2e763) and 1.7.0-rc1 (9eade61) while it completes in a few tens of milliseconds in Julia 1.7.0-beta4.2 (642719e) and 1.6.
as_cfunction(f) = @cfunction($f, Cvoid, ())
function demo_fast()
as_cfunction() do
global GLOBAL = 1
return
end
end
function demo_slow()
x = 0
as_cfunction() do
global GLOBAL = x
return
end
end
@info "Calling `demo_fast`..."
@time demo_fast()
@info "Calling `demo_slow`..."
t0 = time_ns()
@time demo_slow()
@show (time_ns() - t0) / 1e9
include
ing the above script in @profile
suggests that Julia spends most of the time in gen_cfun_wrapper
(and _ZNK4llvm13AttributeList13hasAttributesEj
called from it).
Metadata
Metadata
Assignees
Labels
latencyLatencyLatencyregressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous version