mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-08-06 04:21:33 +00:00
docs(agents): link zero-alloc invariant to performance tiers
Point invariant 1 readers at `architecture_layers.md` for the tiered split between numeric kernels, warmed assembly drivers, and flexible IO/UI code.
This commit is contained in:
@@ -176,7 +176,11 @@ These are non-negotiable. Tests and code analysis enforce them.
|
||||
`test/assemblers/test_dof_based_zero_alloc.jl` asserts
|
||||
`@allocated assemble!(...) == 0` and `0` GC allocation sites in the
|
||||
optimized LLVM IR. Don't introduce `Dict`, `Vector{Any}`, untyped
|
||||
closures, or `Vector` literals inside loops.
|
||||
closures, or `Vector` literals inside loops. For the intended split
|
||||
between tier 1 numeric kernels (always C-speed, no heap churn in
|
||||
loops), tier 2 warmed assembly drivers (setup may allocate), and tier 3
|
||||
IO/UI convenience code where flexible containers are acceptable, see
|
||||
`docs/src/developer/architecture_layers.md` (section Performance tiers).
|
||||
2. Type stability everywhere on the hot path.
|
||||
`Base.promote_op(assemble!, ...) === Nothing` and the inferred
|
||||
types must be concrete. Use `NamedTuple` (typed), `NTuple`, and
|
||||
|
||||
Reference in New Issue
Block a user