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
{{ message }}
Repository navigation
Commit d4da6e1
Browse filesBrowse the repository at this point in the historyBrowse files
A value cached on a node is the value under the settings in force
Evaled, InnerSimplified, DomainCondition, a matrix's determinant, inverse,
adjugate, rank, eigenvalues and echelon forms, and an interval's numeric
ends were kept as first computed and answered under any settings after,
on any thread; Evaled alone noted the precision. 1/3 - 0.33333333333333333333
evaluated inside a zero range of 1e-10 was 0 afterwards at the defaults,
where it is 3.3E-21.
Every setting's stack now lives in one immutable SettingsState.State,
made once per path of scopes from the defaults, so the scopes the library
opens on every call reach the same state each time and a balanced open and
close puts back the very state it replaced. A setting reads its value from
it; Snapshot and StillHolds become one reference comparison. A flow holds
one Scope per scope open, with its own id, so a scope is released by its id
alone: disposing twice, or a stale copy after the same scope reopened, does
nothing, and a scope closed out of order replays the ones above it. States
one scope away are held weakly, each keeping the one it was reached from, so
scopes of values that differ on every call are collected once nothing is
open or cached under them, and at most 32 entries of one setting are kept. The caches
above are SettingsDependent<T>: a value computed at the defaults is held as
it is, a value computed in a scope with its state, and the last two states
are kept, so a node asked in turn under Solve's settings and its analytical
solver's is not recomputed at every turn. Entity gets a copy constructor so
that a `with` copy keeps the structural caches and not the values.
TryDowncast now simplifies the root it does not replace outside the 1e-7
zero range it guesses a rational with.
Kernel benchmark against master on one machine: allocation lower on
Derivate (-4.1%), EvalPolynomialFresh (-3.5%), SimplifyEasy (-3.4%) and
SimplifyHard (-5.1%), from the evaluation cache no longer allocating at the
defaults; SolveEasy +9.0%, from the residual check evaluating its roots with
downcasting off rather than reading values cached with it on.
Part of #2479
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments