Current code path
evaluate_policy! currently:
- copies
cdp.interp.Phi into a dense matrix A
- loops over states and shocks
- subtracts
ckron([vec(evalbase(...)) ...]) * discount * w
- factorizes
A with lu
- solves with
ldiv!
Possible directions
- reduce temporary allocations from
evalbase, collect, and ckron
- use more workspaces during matrix assembly
- investigate whether the matrix assembly can be made more structured/in-place
(AI assisted (ChatGPT Pro 5.4) in drafting this issue)
Current code path
evaluate_policy!currently:cdp.interp.Phiinto a dense matrixAckron([vec(evalbase(...)) ...]) * discount * wAwithluldiv!Possible directions
evalbase,collect, andckron(AI assisted (ChatGPT Pro 5.4) in drafting this issue)