Skip to content

Add a same-kind primitive fast path to IterativeEqualityStep. - #2304

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_989798955
Open

copybara-service[bot] wants to merge 1 commit into
masterfrom
test_989798955

Conversation

@copybara-service

Copy link
Copy Markdown

Add a same-kind primitive fast path to IterativeEqualityStep.

  • When attribute tracking is disabled and both operands have the same kind
    (string, int, uint, bool), IterativeEqualityStep::Evaluate compares them
    inline instead of dispatching through the generic ValueEqual path.

Note: the upstream suite improves the equality-heavy policy benchmarks by
4-6% (BM_PolicySymbolic*); benchmarks whose INSTRUCTIONS/op is unchanged
vary by +/-4% from code layout. Geomean -1.4%.

- When attribute tracking is disabled and both operands have the same kind
  (string, int, uint, bool), `IterativeEqualityStep::Evaluate` compares them
  inline instead of dispatching through the generic `ValueEqual` path.

Note: the upstream suite improves the equality-heavy policy benchmarks by
4-6% (BM_PolicySymbolic*); benchmarks whose INSTRUCTIONS/op is unchanged
vary by +/-4% from code layout. Geomean -1.4%.
PiperOrigin-RevId: 989798955
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants