Closed
Description
Since the merge of the awesome pkgimage support, @time occasionally shows more than 100% compilation time, which obviously is nonsensical.
Noticed first here: #47184 (comment)
A misguided documentation pull request was submitted here: #47980
MWE that does not require installing packages:
On the nightly just after merging the pkgimages PR
julia> double(x::Real) = 2x
calldouble(container) = double(container[1])
calldouble2(container) = calldouble(container)
calldouble2 (generic function with 1 method)
julia> @time @eval calldouble([1.0])
0.015989 seconds (9.68 k allocations: 636.003 KiB, 41.47% compilation time)
2.0
julia> @time @eval calldouble2(1.0)
0.012463 seconds (3.53 k allocations: 250.709 KiB, 111.08% compilation time)
2.0
julia> versioninfo()
Julia Version 1.10.0-DEV.204
Commit a2db90fe8d9 (2022-12-27 13:46 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 16 × AMD Ryzen 7 1700 Eight-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, znver1)
Threads: 8 on 16 virtual cores
On 1.8.0
julia> double(x::Real) = 2x
calldouble(container) = double(container[1])
calldouble2(container) = calldouble(container)
calldouble2 (generic function with 1 method)
julia> @time @eval calldouble([1.0])
0.012558 seconds (7.12 k allocations: 412.803 KiB, 42.40% compilation time)
2.0
julia> @time @eval calldouble2(1.0)
0.008551 seconds (3.41 k allocations: 208.565 KiB, 95.67% compilation time)
2.0
julia> versioninfo()
Julia Version 1.8.0
Commit 5544a0fab76 (2022-08-17 13:38 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 16 × AMD Ryzen 7 1700 Eight-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, znver1)
Threads: 8 on 16 virtual cores