Skip to content

perf: Match IN conditions against lists without building sets - #359

Draft
khvn26 wants to merge 1 commit into
perf/05-jsonpath-namesfrom
perf/06-in-list
Draft

khvn26 wants to merge 1 commit into
perf/05-jsonpath-namesfrom
perf/06-in-list

Conversation

@khvn26

@khvn26 khvn26 commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

A list IN condition value was collected into a set of strings on every evaluation, because lists cannot be cached. It is now scanned instead, which is about 2× faster at any length (~230 → ~110 ns for one value, ~4.5 → ~2.6 µs for 100). Results are unchanged, and a new test checks them for strings, numbers, floats, booleans and empty lists.

Effect: about 6% on identity evaluation with released SDKs and 1,000 identity overrides, whose segments match identifiers against lists.

Part of a stack of local evaluation performance PRs; see #353 for the stack and combined results. perf/all holds the whole stack for benchmarking.

A list IN condition value was collected into a set of strings on every
evaluation, as lists cannot be cached. It is now scanned instead, which
is about 2x faster at any length. Results are unchanged, and are now
covered by a test.
@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant