Open gitboy16 opened 1 year ago
I can confirm this MRE:
julia> VERSION
v"1.9.2"
(@v1.9) pkg> generate ~/tmp/MSort
Generating project MSort:
~/tmp/MSort/Project.toml
~/tmp/MSort/src/MSort.jl
shell> vim ~/tmp/MSort/src/MSort.jl # copy in the example
(@v1.9) pkg> activate ~/tmp/MSort
Activating project at `~/tmp/MSort`
(MSort) pkg> add PrecompileTools
Resolving package versions...
Updating `~/tmp/MSort/Project.toml`
[aea7be01] + PrecompileTools v1.2.0
Updating `~/tmp/MSort/Manifest.toml`
[aea7be01] + PrecompileTools v1.2.0
[21216c6a] + Preferences v1.4.1
[ade2ca70] + Dates
[de0858da] + Printf
[fa267f1f] + TOML v1.0.3
[4ec0a83e] + Unicode
Precompiling project...
1 dependency successfully precompiled in 1 seconds. 2 already precompiled.
julia> using MSort
julia> x = rand(64); @time MSort.quicksort(x);
0.001817 seconds (29 allocations: 2.047 KiB, 99.45% compilation time)
julia>
Hi, It seems as PrecompileTools does not "work" in the following case. By that I mean that compilatiin still hqppen before running the function. Please see below:
However if I replace
Vector{T}
byVector{Float64}
, and remove allT
in the code, then it works.Is that expected that compilation happen in the first version ? If yes, could we have PrecompileTools work with parametric type? If no, I suppose it is a bug?
Thank you