Repository navigation
Precompile show, \, products, broadcast and concatenation of sparse Float64 arrays - #1103
ViralBShah wants to merge 1 commit into
Conversation
…se Float64 arrays Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@KristofferC Is it ok to include this in an stdlib (which is not in the system image)? |
TTFX: 3 robust regressions, 3 robust improvements.
DetailsJulia 1.14.0-DEV.3740 · Linux X64 · 4 blocks (ABBA)
Dependents (median change over blocks)
Dependents per block
A change is robust when every block clears the threshold (precompile 8%, load (cold) 10%, run (cold) 15%, load+run (warm) 15%), the samples of the two commits do not overlap, and the medians differ by at least the floor (precompile 0.25 s, load (cold) 0.1 s, run (cold) 0.05 s, load+run (warm) 0.05 s). Load and run are also judged with the GC off, and either counts. Over all packages whose base value is at least the floor, each metric's geometric mean must clear a threshold in every block (precompile 2%, load (cold) 2%, run (cold) 3%, load+run (warm) 3%). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1103 +/- ##
=======================================
Coverage 94.83% 94.83%
=======================================
Files 16 16
Lines 10252 10257 +5
=======================================
+ Hits 9722 9727 +5
Misses 530 530 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@IanButterworth Seems like TTFX is doing its job here. Pinging for you to take a look since I thought you may find it useful to see it in action. |
SparseArrays is not in the sysimage, and its package image holds almost no native code (a 56 KB
.so), so the first call of every common operation compiles:showof a matrix takes about 0.4 s andA\babout 0.6 s.Before (
main), first calls in a fresh session, Float64SparseMatrixCSCwithIntindices:.ji+.soshowA\bA*xmainAfter:
.ji+.soshowA\bA*xsrc/precompile.jlruns the common operations on small Float64 literals behindBase.generating_output(), the pattern Profile and Pkg use, so their native code goes into the package image; nothing runs at load. The solver calls are behindBase.USE_GPL_LIBS.The cost is 25 ms of load time, a package image about 7 MB larger, and about 4 s more to build it, which Julia's build and download carry too. Left out:
ComplexF64, which would take load to 229 ms and the image to 16 MB + 2.7 MB.🤖 Generated with Claude Code