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
* refactor(attrs): apply #[inline] / #[cold]+#[inline(never)] per rules (#339)
- `#[inline]` on hot-path public entry points and small accessors in
`strategies/*`, `pnl/*`, `greeks/utils`, `pricing/{payoff,utils}`,
`risk/span`, `volatility/utils`, etc. following the audit in
`rules/global_rules.md` §Compiler Attributes.
- `#[inline(never)]` on large / rarely-taken constructors such as
`CustomStrategy::new` and other multi-arg builders that the optimiser
has no business inlining.
- `#[cold] #[inline(never)]` on every error constructor across `error/*`
(`DecimalError::{overflow, arithmetic_error, conversion_error,
out_of_bounds, invalid_precision, invalid_value}`,
`PricingError::{method_error, simulation_error, invalid_engine,
other, unsupported_option_type, non_finite}`, and the equivalents in
`greeks`, `volatility`, `simulation`, `strategies`, `options`,
`position`, `probability`, `chains`, `curves`, `surfaces`, `trade`)
so panic / error paths don't pollute the inlining budget of the
happy path.
`#[inline(always)]` intentionally _not_ added here: the rules require
a Criterion benchmark demonstrating the win first. That audit is
tracked by the benchmark work on numeric kernels and will land in a
follow-up PR.
Closes#339
* refactor(attrs): #[inline] on AdjustmentConfig builder chain
0 commit comments