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
perf(core): targeting rule matching 2.7–4.6 % slower than 0.1.31 #72
In the dedicated-host Linux A/B for 0.2.0 (scripts/release-benchmarks/v0.2.0-linux.sh, v0.1.31 33b9d5f vs candidate ca3dcc7, 6-CPU workstation, 5-round core rerun), rule matching in the Rust core is measurably slower:
Benchmark (median of runs)
v0.1.31
0.2.0
Ratio [95 % CI]
Core targeting, 1 rule
79.9 ns
82.1 ns
1.027 [1.014, 1.041]
Core targeting, 10 rules
228.4 ns
238.8 ns
1.046 [1.031, 1.055]
Both results are inside the 10 % release threshold and were accepted for 0.2.0. The cost does not show in the Node SDK (the N-API boundary dominates) or in any server metric. The likely source is the 0.2.0 evaluator refactor that made evaluation generic over a trace recorder for explain(). This has not been confirmed.
Acceptance criteria
Root cause identified (e.g. profile evaluate_variant with and without the trace recorder) and written up in this issue.
On the same harness and host class, both targeting benchmarks have a ratio vs v0.1.31 whose 95 % CI upper bound is ≤ 1.010 (that is, no measurable slowdown above 1 %).
No other core, Node, snapshot or SSE benchmark regresses by more than 1 % (CI upper bound).
explain() output is unchanged: shared evaluation vectors (sdks/conformance/vectors/evaluation.json) pass in core, Node, Python and OpenFeature.
Partially resolved in 0.2.1, so this stays open (moved to v0.2.2).
What 0.2.1 fixes (#102): the root cause is understood and fixed. Since 0.2.0 the generic evaluator is instantiated twice (plain evaluation and explain()), so rule_matches gained a second caller and the compiler stopped inlining it into the rule loop. That cost a function call per rule. It is now #[inline(always)], as the code behaved in 0.1.31. Evaluation results are unchanged.
What remains: qualifying the result on the dedicated Linux benchmark host. Local (macOS) measurements are too noisy for the 1 % gate. With 10 rules the result is level with 0.1.31 within noise; the 1-rule case still reads about 3 % behind 0.1.31 locally, and prerequisite_chain_5 about 2 % behind 0.2.0. Every case is inside the 10 % release threshold. The maintainer waived dedicated-host qualification for 0.2.1.
To close: a controlled A/B on the dedicated host (final vs v0.1.31 and vs v0.2.0, targeting and prerequisite-chain benchmarks) showing the targeting cases within the gate.
Activity
Merge pull request #102 from checkgate-sh/perf/v0.2.1-core
akosidencio commentedon Nov 30, 2026
Partially resolved in 0.2.1, so this stays open (moved to v0.2.2).
What 0.2.1 fixes (#102): the root cause is understood and fixed. Since 0.2.0 the generic evaluator is instantiated twice (plain evaluation and
explain()), sorule_matchesgained a second caller and the compiler stopped inlining it into the rule loop. That cost a function call per rule. It is now#[inline(always)], as the code behaved in 0.1.31. Evaluation results are unchanged.What remains: qualifying the result on the dedicated Linux benchmark host. Local (macOS) measurements are too noisy for the 1 % gate. With 10 rules the result is level with 0.1.31 within noise; the 1-rule case still reads about 3 % behind 0.1.31 locally, and
prerequisite_chain_5about 2 % behind 0.2.0. Every case is inside the 10 % release threshold. The maintainer waived dedicated-host qualification for 0.2.1.To close: a controlled A/B on the dedicated host (final vs v0.1.31 and vs v0.2.0, targeting and prerequisite-chain benchmarks) showing the targeting cases within the gate.