Skip to content

Commit f36f342

Browse files
Do not call rand during sysimage precompilation (#56227)
This change by itself doesn't do anything significant on `master`, but when backported to the v1.11 branch it'll address #56177. However it'd be great if someone could tell _why_ this fixes that issue, because it looks very unrelated. --------- Co-authored-by: Ian Butterworth <[email protected]>
1 parent 82b1506 commit f36f342

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

contrib/generate_precompile.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ for match = Base._methods(+, (Int, Int), -1, Base.get_world_counter())
183183
# interactive startup uses this
184184
write(IOBuffer(), "")
185185
186-
# not critical, but helps hide unrelated compilation from @time when using --trace-compile
187-
foo() = rand(2,2) * rand(2,2)
188-
@time foo()
189-
@time foo()
186+
# Not critical, but helps hide unrelated compilation from @time when using --trace-compile.
187+
f55729() = Base.Experimental.@force_compile
188+
@time @eval f55729()
189+
@time @eval f55729()
190190
191191
break # only actually need to do this once
192192
end

0 commit comments

Comments
 (0)