You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stop memoizing the unconstrained forward cause repertoire
`intrinsic_information` is called once per (direction, mechanism, purview), so
reaching this cache needs the same pair evaluated twice, which does not happen
within an analysis: it accumulated 30,625 entries and served zero hits over a
175-mechanism scoped sweep. The work it depends on, `forward_cause_repertoire`,
is memoized in its own right; what remains is a mean, an allocation, and a
fill, worth about 4us against the 0.7us a lookup costs — and that margin stays
flat as mechanisms grow, since the purview sets it. Results stay read-only, now
frozen in the function body rather than by the memoizing decorator.
Its effect-direction counterpart keeps its cache: that one averages a forward
effect repertoire over every mechanism state, so a hit is worth 10x a lookup at
a one-unit mechanism and 99x at three, growing with mechanism size. Dropping
both measured 2.4% faster and 107 MiB smaller on a scoped sweep; dropping the
cause side alone takes about half of that with no case where a hit was worth
keeping.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qi3MYsc3afQMxoWZZo2tEL
0 commit comments