Closed8

# PrecompileTools.jlを使ってみる

Hyrodium

スラド(?)にujimushi氏による記事を発見。zennのような技術記事投稿サイトに投稿しない理由が謎だが、参考になるかも

Hyrodium

6.380801 seconds → 0.000400 seconds

Before this PR

``````julia> using BasicBSpline

julia> P = BSplineSpace{3}(KnotVector(1:12))
BSplineSpace{3, Int64, KnotVector{Int64}}(KnotVector([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]))

julia> @time changebasis_I(P,P)
6.380801 seconds (7.65 M allocations: 497.300 MiB, 2.12% gc time, 100.00% compilation time)
8×8 SparseArrays.SparseMatrixCSC{Float64, Int32} with 8 stored entries:
1.0   ⋅    ⋅    ⋅    ⋅    ⋅    ⋅    ⋅
⋅   1.0   ⋅    ⋅    ⋅    ⋅    ⋅    ⋅
⋅    ⋅   1.0   ⋅    ⋅    ⋅    ⋅    ⋅
⋅    ⋅    ⋅   1.0   ⋅    ⋅    ⋅    ⋅
⋅    ⋅    ⋅    ⋅   1.0   ⋅    ⋅    ⋅
⋅    ⋅    ⋅    ⋅    ⋅   1.0   ⋅    ⋅
⋅    ⋅    ⋅    ⋅    ⋅    ⋅   1.0   ⋅
⋅    ⋅    ⋅    ⋅    ⋅    ⋅    ⋅   1.0
``````

After this PR

``````julia> using BasicBSpline

julia> P = BSplineSpace{3}(KnotVector(1:12))
BSplineSpace{3, Int64, KnotVector{Int64}}(KnotVector([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]))

julia> @time changebasis_I(P,P)
0.000400 seconds (2.73 k allocations: 249.469 KiB)
8×8 SparseArrays.SparseMatrixCSC{Float64, Int32} with 8 stored entries:
1.0   ⋅    ⋅    ⋅    ⋅    ⋅    ⋅    ⋅
⋅   1.0   ⋅    ⋅    ⋅    ⋅    ⋅    ⋅
⋅    ⋅   1.0   ⋅    ⋅    ⋅    ⋅    ⋅
⋅    ⋅    ⋅   1.0   ⋅    ⋅    ⋅    ⋅
⋅    ⋅    ⋅    ⋅   1.0   ⋅    ⋅    ⋅
⋅    ⋅    ⋅    ⋅    ⋅   1.0   ⋅    ⋅
⋅    ⋅    ⋅    ⋅    ⋅    ⋅   1.0   ⋅
⋅    ⋅    ⋅    ⋅    ⋅    ⋅    ⋅   1.0
``````
Hyrodium

coverage取れてるのは結構なことだけど、どのタイミングで検知されてるのか謎

Hyrodium

このスクラップは2023/10/28にクローズされました