Closed8
PrecompileTools.jlを使ってみる
https://github.com/JuliaArrays/StaticArrays.jl/pull/1187 をmergeしたいが、私がご利益を分かっていないので理解したい
JuliaCon2022より関連動画
とりあえずBasicBSpline.jlに導入して実験してみる
スラド(?)にujimushi氏による記事を発見。zennのような技術記事投稿サイトに投稿しない理由が謎だが、参考になるかも
初回実行めっちゃ高速化できてワロタ
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
coverage取れてるのは結構なことだけど、どのタイミングで検知されてるのか謎
当初の目的だったStaticArrays.jlのPRも確認できたのでmergeしました。以前の_precompile_()
とか謎だったので、その辺りが整備されたのは嬉しい
このスクラップは2023/10/28にクローズされました