Skip to content

Conversation

@tmcgroul
Copy link
Collaborator

@tmcgroul tmcgroul commented Feb 7, 2026

measurements before patch:

Timer precision: 41 ns
sqd_query                            fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ scan                                            │               │               │               │         │
   ╰─ array_predicate                              │               │               │               │         │
      ╰─ bench                                     │               │               │               │         │
         ├─ primitive_list_contains  82.54 ns      │ 20.74 µs      │ 82.54 ns      │ 295.7 ns      │ 100     │ 100
         ╰─ string_list_contains     144 ns        │ 159.6 ns      │ 146.6 ns      │ 146.9 ns      │ 100     │ 3200

measurements after patch:

Timer precision: 41 ns
sqd_query                            fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ scan                                            │               │               │               │         │
   ╰─ array_predicate                              │               │               │               │         │
      ╰─ bench                                     │               │               │               │         │
         ├─ primitive_list_contains  40.26 ns      │ 26.83 µs      │ 41.26 ns      │ 319.5 ns      │ 100     │ 100
         ╰─ string_list_contains     40.26 ns      │ 10.54 µs      │ 82.26 ns      │ 168.5 ns      │ 100     │ 100

@tmcgroul tmcgroul requested a review from kalabukdima February 7, 2026 02:06
@eldargab
Copy link
Collaborator

eldargab commented Feb 7, 2026

What happens when there are 1000 values in the predicate or more?

The correct way to optimize this stuff is to use different structures depending on a given amount of values.

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.

2 participants