Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

store-gateway: read series from bucket with io.Reader #4926

Merged

Conversation

dimitarvdimitrov
Copy link
Contributor

Context (partitioners)

When planning to do requests to the object storage the store-gateway uses a partitioner. The partitioner can extend the fetched ranges.

Problem

When we read a byte range for series, we store the whole range in a buffer. This may result in increased allocations because the whole range can be up to 8x the size of the actual series (our series estimation at present is 64K, the partitioner can extend ranges with up to 512K; 512/64=8). In addition to that the 64K estimation is a very pessimistic one in order to prevent refetches.

This means that in the average case of 512B per series we may fetch 640 times more data than we need for small requests ((2*64K + 512K)/(2*512) = 640). We keep all of this in buffers, which increases GC pressure and CPU usage.

Also see #4593 (comment)

What this PR does

Uses an io.Reader to read series data from the bucket, so we never hold everything in a buffer. It also introduces pooling for same bytes.

This PR introduces a reader uvarintSequenceReader which can keep track of its offset in a buffer and can read a uvarint from an io.Reader. I plan to introduce this reader in loadChunks as well to simplify the code there a bit.

Checklist

  • [n/a] Tests updated
  • [n/a] Documentation added
  • [n/a] CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@pracucci pracucci self-requested a review May 4, 2023 15:03
pkg/storegateway/partitioner.go Outdated Show resolved Hide resolved
pkg/storegateway/partitioner.go Outdated Show resolved Hide resolved
pkg/storegateway/partitioner.go Outdated Show resolved Hide resolved
pkg/storegateway/partitioner.go Outdated Show resolved Hide resolved
pkg/storegateway/partitioner.go Outdated Show resolved Hide resolved
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
pkg/storegateway/bucket_index_reader.go Outdated Show resolved Hide resolved
pkg/storegateway/bucket_index_reader.go Outdated Show resolved Hide resolved
pkg/storegateway/bucket_index_reader.go Show resolved Hide resolved
pkg/storegateway/bucket_index_reader.go Outdated Show resolved Hide resolved
pkg/storegateway/bucket_index_reader.go Outdated Show resolved Hide resolved
pkg/storegateway/bucket_index_reader.go Show resolved Hide resolved
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
@dimitarvdimitrov dimitarvdimitrov force-pushed the dimitar/st-gw/postings-reader-instead-of-buffer branch from 382a90f to 23a46a2 Compare May 4, 2023 18:35
@dimitarvdimitrov
Copy link
Contributor Author

Marco suggested using a buffered reader in place of the regular reader. I tried with sizes of 32Ki, 64Ki, 128Ki and 32Ki showed the best performance in the benchmarks we have. So I'm using a buffer with that. I also pooled the buffered reader which showed better results with some smaller benchmarks

base vs 32Ki
goos: darwin
goarch: arm64
pkg: github.com/grafana/mimir/pkg/storegateway
                                                                                                   │ before-2243ff36e.txt │          after-6ed5fd40b.txt          │
                                                                                                   │        sec/op        │    sec/op     vs base                 │
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X"-10                                            12.24µ ± ∞ ¹   13.90µ ± ∞ ¹        ~ (p=1.000 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j="foo"-10                                    23.77µ ± ∞ ¹   32.13µ ± ∞ ¹        ~ (p=0.730 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j!="foo"-10                                   32.91µ ± ∞ ¹   31.80µ ± ∞ ¹        ~ (p=0.190 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"XXX|YYY"-10                                     1.895µ ± ∞ ¹   1.918µ ± ∞ ¹        ~ (p=0.333 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"X.+"-10                                         1.857µ ± ∞ ¹   1.828µ ± ∞ ¹        ~ (p=0.683 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"X|Y|Z"-10                                       38.31µ ± ∞ ¹   31.29µ ± ∞ ¹  -18.34% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1"-10                                             1.267 ± ∞ ¹    1.228 ± ∞ ¹        ~ (p=0.190 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j="foo"-10                                     1.235 ± ∞ ¹    1.217 ± ∞ ¹        ~ (p=0.286 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n="1"-10                                     1.251 ± ∞ ¹    1.221 ± ∞ ¹        ~ (p=0.413 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j!="foo"-10                                    1.224 ± ∞ ¹    1.197 ± ∞ ¹   -2.19% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*"-10                                           3.767 ± ∞ ¹    3.858 ± ∞ ¹        ~ (p=0.190 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".+"-10                                           5.016 ± ∞ ¹    5.131 ± ∞ ¹   +2.30% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"^.+$",j=~"X.+"-10                               7.725m ± ∞ ¹   7.841m ± ∞ ¹        ~ (p=0.063 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~""-10                                             1.483 ± ∞ ¹    1.473 ± ∞ ¹        ~ (p=0.063 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!=""-10                                             5.011 ± ∞ ¹    5.123 ± ∞ ¹   +2.22% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",j="foo"-10                             1.235 ± ∞ ¹    1.205 ± ∞ ¹   -2.47% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",j="foo"-10                          23.62µ ± ∞ ¹   23.27µ ± ∞ ¹   -1.48% (p=0.032 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",i!="2",j="foo"-10                      1.315 ± ∞ ¹    1.210 ± ∞ ¹   -7.92% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!=""-10                                       2.530 ± ∞ ¹    2.454 ± ∞ ¹   -2.99% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j="foo"-10                               2.485 ± ∞ ¹    2.435 ± ∞ ¹   -2.03% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"X.+"-10                             7.026m ± ∞ ¹   7.160m ± ∞ ¹   +1.90% (p=0.032 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"XXX|YYY"-10                         15.23µ ± ∞ ¹   15.31µ ± ∞ ¹        ~ (p=1.000 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"X|Y|Z",j="foo"-10                         55.17µ ± ∞ ¹   55.70µ ± ∞ ¹        ~ (p=1.000 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",j="foo"-10                             2.527 ± ∞ ¹    2.543 ± ∞ ¹        ~ (p=0.905 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"1.+",j="foo"-10                           282.5m ± ∞ ¹   281.6m ± ∞ ¹        ~ (p=0.556 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!="2",j="foo"-10                      2.479 ± ∞ ¹    2.456 ± ∞ ¹   -0.95% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!~"2.*",j="foo"-10                    2.494 ± ∞ ¹    2.458 ± ∞ ¹   -1.41% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",i!~"^.*2.*$",j="foo"-10             24.05µ ± ∞ ¹   23.26µ ± ∞ ¹   -3.25% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"0xxx|1xxx|2xxx"-10                              301.9µ ± ∞ ¹   281.4µ ± ∞ ¹   -6.79% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"(0|1|2)xxx"-10                                  306.5µ ± ∞ ¹   280.1µ ± ∞ ¹   -8.61% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"[0-2]xxx"-10                                    297.7µ ± ∞ ¹   280.6µ ± ∞ ¹   -5.72% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!~[0-2]xxx-10                                       3.848 ± ∞ ¹    3.873 ± ∞ ¹        ~ (p=0.905 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*",_i!~[0-2]xxx-10                              3.772 ± ∞ ¹    3.875 ± ∞ ¹        ~ (p=0.190 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"<unique_prefix>.+"-10                           361.7µ ± ∞ ¹   352.7µ ± ∞ ¹   -2.49% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"<unique_prefix>.+"-10                     1.591m ± ∞ ¹   1.535m ± ∞ ¹   -3.50% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!~"<unique_prefix>.+"-10                      1.316 ± ∞ ¹    1.225 ± ∞ ¹   -6.93% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",p="foo",i=~"<unique_prefix>.+"-10           12.71m ± ∞ ¹   11.78m ± ∞ ¹   -7.33% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".+",i=~"<unique_prefix>.+"-10           41.23m ± ∞ ¹   40.71m ± ∞ ¹   -1.27% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".*",i=~"<unique_prefix>.+"-10           11.77m ± ∞ ¹   11.33m ± ∞ ¹        ~ (p=0.111 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".*",n=~".*",i=~"<unique_prefix>.+"-10           411.7µ ± ∞ ¹   381.5µ ± ∞ ¹   -7.33% (p=0.032 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".+",n=~".+",i=~"<unique_prefix>.+"-10           61.14m ± ∞ ¹   56.07m ± ∞ ¹   -8.29% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/p!=""-10                                             1.688 ± ∞ ¹    1.657 ± ∞ ¹   -1.80% (p=0.032 n=5+4)
geomean                                                                                                      17.88m         17.61m         -1.53%
¹ need >= 6 samples for confidence interval at level 0.95

                                                                                                   │ before-2243ff36e.txt │           after-6ed5fd40b.txt            │
                                                                                                   │         B/op         │     B/op       vs base                   │
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X"-10                                           2.230Ki ± ∞ ¹   2.230Ki ± ∞ ¹        ~ (p=1.444 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j="foo"-10                                   2.935Ki ± ∞ ¹   2.935Ki ± ∞ ¹        ~ (p=1.111 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j!="foo"-10                                  2.935Ki ± ∞ ¹   2.935Ki ± ∞ ¹        ~ (p=1.000 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"XXX|YYY"-10                                    1.852Ki ± ∞ ¹   1.852Ki ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"X.+"-10                                        1.797Ki ± ∞ ¹   1.797Ki ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"X|Y|Z"-10                                      2.917Ki ± ∞ ¹   2.917Ki ± ∞ ¹        ~ (p=0.571 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1"-10                                           399.9Mi ± ∞ ¹   169.1Mi ± ∞ ¹  -57.71% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j="foo"-10                                   346.6Mi ± ∞ ¹   116.9Mi ± ∞ ¹  -66.26% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n="1"-10                                   346.7Mi ± ∞ ¹   116.7Mi ± ∞ ¹  -66.33% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j!="foo"-10                                  346.4Mi ± ∞ ¹   117.1Mi ± ∞ ¹  -66.19% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*"-10                                         3.365Gi ± ∞ ¹   3.106Gi ± ∞ ¹   -7.68% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".+"-10                                         3.519Gi ± ∞ ¹   3.261Gi ± ∞ ¹   -7.33% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"^.+$",j=~"X.+"-10                              10.69Mi ± ∞ ¹   10.69Mi ± ∞ ¹        ~ (p=0.556 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~""-10                                           229.3Mi ± ∞ ¹   229.3Mi ± ∞ ¹        ~ (p=0.286 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!=""-10                                           3.519Gi ± ∞ ¹   3.260Gi ± ∞ ¹   -7.35% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",j="foo"-10                           349.9Mi ± ∞ ¹   120.1Mi ± ∞ ¹  -65.67% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",j="foo"-10                         3.106Ki ± ∞ ¹   3.106Ki ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",i!="2",j="foo"-10                    350.7Mi ± ∞ ¹   121.4Mi ± ∞ ¹  -65.39% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!=""-10                                     591.3Mi ± ∞ ¹   360.7Mi ± ∞ ¹  -39.00% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j="foo"-10                             538.5Mi ± ∞ ¹   308.6Mi ± ∞ ¹  -42.69% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"X.+"-10                            10.69Mi ± ∞ ¹   10.69Mi ± ∞ ¹        ~ (p=0.190 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"XXX|YYY"-10                        3.825Ki ± ∞ ¹   3.826Ki ± ∞ ¹        ~ (p=0.079 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"X|Y|Z",j="foo"-10                        5.266Ki ± ∞ ¹   5.266Ki ± ∞ ¹        ~ (p=1.032 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",j="foo"-10                           538.1Mi ± ∞ ¹   308.6Mi ± ∞ ¹  -42.65% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"1.+",j="foo"-10                          74.32Mi ± ∞ ¹   48.97Mi ± ∞ ¹  -34.11% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!="2",j="foo"-10                    539.3Mi ± ∞ ¹   309.7Mi ± ∞ ¹  -42.57% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!~"2.*",j="foo"-10                  519.8Mi ± ∞ ¹   316.0Mi ± ∞ ¹  -39.21% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",i!~"^.*2.*$",j="foo"-10            3.310Ki ± ∞ ¹   3.310Ki ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"0xxx|1xxx|2xxx"-10                             320.5Ki ± ∞ ¹   201.8Ki ± ∞ ¹  -37.04% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"(0|1|2)xxx"-10                                 320.1Ki ± ∞ ¹   201.3Ki ± ∞ ¹  -37.09% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"[0-2]xxx"-10                                   320.1Ki ± ∞ ¹   201.4Ki ± ∞ ¹  -37.09% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!~[0-2]xxx-10                                     3.362Gi ± ∞ ¹   3.103Gi ± ∞ ¹   -7.70% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*",_i!~[0-2]xxx-10                            3.365Gi ± ∞ ¹   3.106Gi ± ∞ ¹   -7.68% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"<unique_prefix>.+"-10                          1.807Mi ± ∞ ¹   1.773Mi ± ∞ ¹   -1.90% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"<unique_prefix>.+"-10                    3.025Mi ± ∞ ¹   2.989Mi ± ∞ ¹   -1.21% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!~"<unique_prefix>.+"-10                    401.3Mi ± ∞ ¹   171.2Mi ± ∞ ¹  -57.33% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",p="foo",i=~"<unique_prefix>.+"-10          20.18Mi ± ∞ ¹   20.15Mi ± ∞ ¹   -0.14% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".+",i=~"<unique_prefix>.+"-10          59.20Mi ± ∞ ¹   59.18Mi ± ∞ ¹   -0.04% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".*",i=~"<unique_prefix>.+"-10          14.05Mi ± ∞ ¹   14.02Mi ± ∞ ¹   -0.22% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".*",n=~".*",i=~"<unique_prefix>.+"-10          1.814Mi ± ∞ ¹   1.780Mi ± ∞ ¹   -1.87% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".+",n=~".+",i=~"<unique_prefix>.+"-10          77.58Mi ± ∞ ¹   77.54Mi ± ∞ ¹   -0.05% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/p!=""-10                                           914.8Mi ± ∞ ¹   678.8Mi ± ∞ ¹  -25.81% (p=0.016 n=5+4)
geomean                                                                                                     8.323Mi         6.208Mi        -25.41%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

                                                                                                   │ before-2243ff36e.txt │          after-6ed5fd40b.txt           │
                                                                                                   │      allocs/op       │  allocs/op    vs base                  │
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X"-10                                             36.00 ± ∞ ¹    36.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j="foo"-10                                     44.00 ± ∞ ¹    44.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j!="foo"-10                                    44.00 ± ∞ ¹    44.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"XXX|YYY"-10                                      31.00 ± ∞ ¹    31.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"X.+"-10                                          31.00 ± ∞ ¹    31.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"X|Y|Z"-10                                        46.00 ± ∞ ¹    46.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1"-10                                            1.410M ± ∞ ¹   1.410M ± ∞ ¹  +0.03% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j="foo"-10                                    1.004M ± ∞ ¹   1.004M ± ∞ ¹  +0.02% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n="1"-10                                    1.004M ± ∞ ¹   1.004M ± ∞ ¹  +0.02% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j!="foo"-10                                   1.004M ± ∞ ¹   1.005M ± ∞ ¹  +0.02% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*"-10                                          20.87M ± ∞ ¹   20.88M ± ∞ ¹  +0.04% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".+"-10                                          23.62M ± ∞ ¹   23.63M ± ∞ ¹  +0.04% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"^.+$",j=~"X.+"-10                               100.0k ± ∞ ¹   100.0k ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~""-10                                            2.750M ± ∞ ¹   2.750M ± ∞ ¹       ~ (p=0.286 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!=""-10                                            23.62M ± ∞ ¹   23.63M ± ∞ ¹  +0.04% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",j="foo"-10                            1.004M ± ∞ ¹   1.004M ± ∞ ¹  +0.02% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",j="foo"-10                           44.00 ± ∞ ¹    44.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",i!="2",j="foo"-10                     1.004M ± ∞ ¹   1.004M ± ∞ ¹  +0.03% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!=""-10                                      4.160M ± ∞ ¹   4.160M ± ∞ ¹  +0.01% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j="foo"-10                              3.754M ± ∞ ¹   3.754M ± ∞ ¹  +0.01% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"X.+"-10                             100.1k ± ∞ ¹   100.1k ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"XXX|YYY"-10                          61.00 ± ∞ ¹    61.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"X|Y|Z",j="foo"-10                          82.00 ± ∞ ¹    82.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",j="foo"-10                            3.754M ± ∞ ¹   3.754M ± ∞ ¹  +0.01% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"1.+",j="foo"-10                           417.3k ± ∞ ¹   417.4k ± ∞ ¹  +0.01% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!="2",j="foo"-10                     3.754M ± ∞ ¹   3.754M ± ∞ ¹  +0.01% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!~"2.*",j="foo"-10                   3.948M ± ∞ ¹   3.948M ± ∞ ¹  +0.00% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",i!~"^.*2.*$",j="foo"-10              44.00 ± ∞ ¹    44.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"0xxx|1xxx|2xxx"-10                               893.0 ± ∞ ¹    902.0 ± ∞ ¹  +1.01% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"(0|1|2)xxx"-10                                   892.0 ± ∞ ¹    901.0 ± ∞ ¹  +1.01% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"[0-2]xxx"-10                                     892.0 ± ∞ ¹    901.0 ± ∞ ¹  +1.01% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!~[0-2]xxx-10                                      20.87M ± ∞ ¹   20.88M ± ∞ ¹  +0.04% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*",_i!~[0-2]xxx-10                             20.87M ± ∞ ¹   20.88M ± ∞ ¹  +0.04% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"<unique_prefix>.+"-10                            375.0 ± ∞ ¹    381.0 ± ∞ ¹  +1.60% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"<unique_prefix>.+"-10                      261.0 ± ∞ ¹    267.0 ± ∞ ¹  +2.30% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!~"<unique_prefix>.+"-10                     1.410M ± ∞ ¹   1.411M ± ∞ ¹  +0.03% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",p="foo",i=~"<unique_prefix>.+"-10            305.0 ± ∞ ¹    312.0 ± ∞ ¹  +2.30% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".+",i=~"<unique_prefix>.+"-10           1.389k ± ∞ ¹   1.397k ± ∞ ¹  +0.58% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".*",i=~"<unique_prefix>.+"-10            320.0 ± ∞ ¹    327.0 ± ∞ ¹  +2.19% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".*",n=~".*",i=~"<unique_prefix>.+"-10            410.0 ± ∞ ¹    415.0 ± ∞ ¹  +1.22% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".+",n=~".+",i=~"<unique_prefix>.+"-10           1.528k ± ∞ ¹   1.533k ± ∞ ¹  +0.33% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/p!=""-10                                            4.649M ± ∞ ¹   4.651M ± ∞ ¹  +0.04% (p=0.016 n=5+4)
geomean                                                                                                      25.29k         25.37k        +0.33%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
32Ki vs 64Ki
goos: darwin
goarch: arm64
pkg: github.com/grafana/mimir/pkg/storegateway
                                                                                                   │ after-6ed5fd40b.txt │          after-3c1ac7569.txt           │
                                                                                                   │       sec/op        │    sec/op      vs base                 │
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X"-10                                           13.90µ ± ∞ ¹   12.20µ ±  ∞ ¹        ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j="foo"-10                                   32.13µ ± ∞ ¹   23.26µ ±  ∞ ¹  -27.60% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j!="foo"-10                                  31.80µ ± ∞ ¹   23.20µ ±  ∞ ¹  -27.04% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"XXX|YYY"-10                                    1.918µ ± ∞ ¹   1.864µ ±  ∞ ¹   -2.84% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"X.+"-10                                        1.828µ ± ∞ ¹   1.834µ ±  ∞ ¹        ~ (p=0.657 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"X|Y|Z"-10                                      31.29µ ± ∞ ¹   31.79µ ±  ∞ ¹   +1.61% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1"-10                                            1.228 ± ∞ ¹    1.268 ±  ∞ ¹        ~ (p=0.200 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j="foo"-10                                    1.217 ± ∞ ¹    1.231 ±  ∞ ¹        ~ (p=0.486 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n="1"-10                                    1.221 ± ∞ ¹    1.222 ±  ∞ ¹        ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j!="foo"-10                                   1.197 ± ∞ ¹    1.228 ±  ∞ ¹        ~ (p=0.057 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*"-10                                          3.858 ± ∞ ¹    3.858 ±  ∞ ¹        ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".+"-10                                          5.131 ± ∞ ¹    5.224 ±  ∞ ¹   +1.80% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"^.+$",j=~"X.+"-10                              7.841m ± ∞ ¹   7.853m ±  ∞ ¹        ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~""-10                                            1.473 ± ∞ ¹    1.491 ±  ∞ ¹   +1.24% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!=""-10                                            5.123 ± ∞ ¹    5.190 ±  ∞ ¹        ~ (p=0.114 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",j="foo"-10                            1.205 ± ∞ ¹    1.270 ±  ∞ ¹   +5.42% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",j="foo"-10                         23.27µ ± ∞ ¹   23.47µ ±  ∞ ¹        ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",i!="2",j="foo"-10                     1.210 ± ∞ ¹    1.240 ±  ∞ ¹   +2.41% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!=""-10                                      2.454 ± ∞ ¹    2.720 ±  ∞ ¹  +10.83% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j="foo"-10                              2.435 ± ∞ ¹    2.514 ±  ∞ ¹   +3.24% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"X.+"-10                            7.160m ± ∞ ¹   7.105m ±  ∞ ¹        ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"XXX|YYY"-10                        15.31µ ± ∞ ¹   15.28µ ±  ∞ ¹        ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"X|Y|Z",j="foo"-10                        55.70µ ± ∞ ¹   54.97µ ±  ∞ ¹        ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",j="foo"-10                            2.543 ± ∞ ¹    2.461 ±  ∞ ¹   -3.23% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"1.+",j="foo"-10                          281.6m ± ∞ ¹   280.8m ±  ∞ ¹        ~ (p=0.486 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!="2",j="foo"-10                     2.456 ± ∞ ¹    2.465 ±  ∞ ¹        ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!~"2.*",j="foo"-10                   2.458 ± ∞ ¹    2.480 ±  ∞ ¹   +0.89% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",i!~"^.*2.*$",j="foo"-10            23.26µ ± ∞ ¹   23.53µ ±  ∞ ¹   +1.15% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"0xxx|1xxx|2xxx"-10                             281.4µ ± ∞ ¹   302.7µ ±  ∞ ¹   +7.56% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"(0|1|2)xxx"-10                                 280.1µ ± ∞ ¹   302.7µ ±  ∞ ¹   +8.07% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"[0-2]xxx"-10                                   280.6µ ± ∞ ¹   300.3µ ±  ∞ ¹   +7.02% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!~[0-2]xxx-10                                      3.873 ± ∞ ¹    3.846 ±  ∞ ¹        ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*",_i!~[0-2]xxx-10                             3.875 ± ∞ ¹    3.862 ± 1%          ~ (p=0.808 n=4+8)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"<unique_prefix>.+"-10                          352.7µ ± ∞ ¹   365.5µ ±  ∞ ¹   +3.61% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"<unique_prefix>.+"-10                    1.535m ± ∞ ¹   1.564m ±  ∞ ¹   +1.91% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!~"<unique_prefix>.+"-10                     1.225 ± ∞ ¹    1.231 ±  ∞ ¹        ~ (p=0.057 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",p="foo",i=~"<unique_prefix>.+"-10          11.78m ± ∞ ¹   11.76m ±  ∞ ¹        ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".+",i=~"<unique_prefix>.+"-10          40.71m ± ∞ ¹   40.69m ±  ∞ ¹        ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".*",i=~"<unique_prefix>.+"-10          11.33m ± ∞ ¹   11.38m ±  ∞ ¹   +0.44% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".*",n=~".*",i=~"<unique_prefix>.+"-10          381.5µ ± ∞ ¹   389.3µ ±  ∞ ¹   +2.03% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".+",n=~".+",i=~"<unique_prefix>.+"-10          56.07m ± ∞ ¹   56.06m ±  ∞ ¹        ~ (p=0.486 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/p!=""-10                                            1.657 ± ∞ ¹    1.670 ±  ∞ ¹        ~ (p=0.200 n=4)
geomean                                                                                                     17.61m         17.54m          -0.43%
¹ need >= 6 samples for confidence interval at level 0.95

                                                                                                   │ after-6ed5fd40b.txt │            after-3c1ac7569.txt            │
                                                                                                   │        B/op         │      B/op       vs base                   │
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X"-10                                          2.230Ki ± ∞ ¹   2.230Ki ±  ∞ ¹        ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j="foo"-10                                  2.935Ki ± ∞ ¹   2.934Ki ±  ∞ ¹        ~ (p=0.429 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j!="foo"-10                                 2.935Ki ± ∞ ¹   2.935Ki ±  ∞ ¹        ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"XXX|YYY"-10                                   1.852Ki ± ∞ ¹   1.852Ki ±  ∞ ¹        ~ (p=1.000 n=4)   ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"X.+"-10                                       1.797Ki ± ∞ ¹   1.797Ki ±  ∞ ¹        ~ (p=1.000 n=4)   ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"X|Y|Z"-10                                     2.917Ki ± ∞ ¹   2.917Ki ±  ∞ ¹        ~ (p=0.657 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1"-10                                          169.1Mi ± ∞ ¹   170.6Mi ±  ∞ ¹   +0.87% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j="foo"-10                                  116.9Mi ± ∞ ¹   117.7Mi ±  ∞ ¹   +0.65% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n="1"-10                                  116.7Mi ± ∞ ¹   117.6Mi ±  ∞ ¹   +0.74% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j!="foo"-10                                 117.1Mi ± ∞ ¹   117.6Mi ±  ∞ ¹   +0.44% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*"-10                                        3.106Gi ± ∞ ¹   3.137Gi ±  ∞ ¹   +0.98% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".+"-10                                        3.261Gi ± ∞ ¹   3.290Gi ±  ∞ ¹   +0.91% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"^.+$",j=~"X.+"-10                             10.69Mi ± ∞ ¹   10.69Mi ±  ∞ ¹        ~ (p=0.743 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~""-10                                          229.3Mi ± ∞ ¹   229.3Mi ±  ∞ ¹        ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!=""-10                                          3.260Gi ± ∞ ¹   3.291Gi ±  ∞ ¹   +0.94% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",j="foo"-10                          120.1Mi ± ∞ ¹   120.5Mi ±  ∞ ¹   +0.32% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",j="foo"-10                        3.106Ki ± ∞ ¹   3.106Ki ±  ∞ ¹        ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",i!="2",j="foo"-10                   121.4Mi ± ∞ ¹   122.0Mi ±  ∞ ¹   +0.52% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!=""-10                                    360.7Mi ± ∞ ¹   361.7Mi ±  ∞ ¹   +0.28% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j="foo"-10                            308.6Mi ± ∞ ¹   309.1Mi ±  ∞ ¹   +0.15% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"X.+"-10                           10.69Mi ± ∞ ¹   10.69Mi ±  ∞ ¹        ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"XXX|YYY"-10                       3.826Ki ± ∞ ¹   3.826Ki ±  ∞ ¹        ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"X|Y|Z",j="foo"-10                       5.266Ki ± ∞ ¹   5.265Ki ±  ∞ ¹        ~ (p=0.486 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",j="foo"-10                          308.6Mi ± ∞ ¹   309.4Mi ±  ∞ ¹        ~ (p=0.057 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"1.+",j="foo"-10                         48.97Mi ± ∞ ¹   49.06Mi ±  ∞ ¹   +0.19% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!="2",j="foo"-10                   309.7Mi ± ∞ ¹   310.3Mi ±  ∞ ¹   +0.21% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!~"2.*",j="foo"-10                 316.0Mi ± ∞ ¹   316.4Mi ±  ∞ ¹   +0.15% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",i!~"^.*2.*$",j="foo"-10           3.310Ki ± ∞ ¹   3.310Ki ±  ∞ ¹        ~ (p=1.000 n=4)   ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"0xxx|1xxx|2xxx"-10                            201.8Ki ± ∞ ¹   299.6Ki ±  ∞ ¹  +48.46% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"(0|1|2)xxx"-10                                201.3Ki ± ∞ ¹   299.0Ki ±  ∞ ¹  +48.52% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"[0-2]xxx"-10                                  201.4Ki ± ∞ ¹   299.2Ki ±  ∞ ¹  +48.55% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!~[0-2]xxx-10                                    3.103Gi ± ∞ ¹   3.134Gi ±  ∞ ¹   +0.98% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*",_i!~[0-2]xxx-10                           3.106Gi ± ∞ ¹   3.137Gi ± 0%     +0.98% (p=0.004 n=4+8)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"<unique_prefix>.+"-10                         1.773Mi ± ∞ ¹   1.802Mi ±  ∞ ¹   +1.62% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"<unique_prefix>.+"-10                   2.989Mi ± ∞ ¹   3.020Mi ±  ∞ ¹   +1.04% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!~"<unique_prefix>.+"-10                   171.2Mi ± ∞ ¹   172.3Mi ±  ∞ ¹   +0.61% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",p="foo",i=~"<unique_prefix>.+"-10         20.15Mi ± ∞ ¹   20.19Mi ±  ∞ ¹   +0.16% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".+",i=~"<unique_prefix>.+"-10         59.18Mi ± ∞ ¹   59.21Mi ±  ∞ ¹   +0.05% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".*",i=~"<unique_prefix>.+"-10         14.02Mi ± ∞ ¹   14.05Mi ±  ∞ ¹   +0.21% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".*",n=~".*",i=~"<unique_prefix>.+"-10         1.780Mi ± ∞ ¹   1.810Mi ±  ∞ ¹   +1.66% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".+",n=~".+",i=~"<unique_prefix>.+"-10         77.54Mi ± ∞ ¹   77.57Mi ±  ∞ ¹   +0.04% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/p!=""-10                                          678.8Mi ± ∞ ¹   685.4Mi ±  ∞ ¹   +0.97% (p=0.029 n=4)
geomean                                                                                                    6.208Mi         6.410Mi          +3.25%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

                                                                                                   │ after-6ed5fd40b.txt │           after-3c1ac7569.txt           │
                                                                                                   │      allocs/op      │   allocs/op    vs base                  │
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X"-10                                            36.00 ± ∞ ¹    36.00 ±  ∞ ¹       ~ (p=1.000 n=4)   ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j="foo"-10                                    44.00 ± ∞ ¹    44.00 ±  ∞ ¹       ~ (p=1.000 n=4)   ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j!="foo"-10                                   44.00 ± ∞ ¹    44.00 ±  ∞ ¹       ~ (p=1.000 n=4)   ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"XXX|YYY"-10                                     31.00 ± ∞ ¹    31.00 ±  ∞ ¹       ~ (p=1.000 n=4)   ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"X.+"-10                                         31.00 ± ∞ ¹    31.00 ±  ∞ ¹       ~ (p=1.000 n=4)   ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"X|Y|Z"-10                                       46.00 ± ∞ ¹    46.00 ±  ∞ ¹       ~ (p=1.000 n=4)   ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1"-10                                           1.410M ± ∞ ¹   1.410M ±  ∞ ¹       ~ (p=0.086 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j="foo"-10                                   1.004M ± ∞ ¹   1.004M ±  ∞ ¹       ~ (p=0.486 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n="1"-10                                   1.004M ± ∞ ¹   1.004M ±  ∞ ¹       ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j!="foo"-10                                  1.005M ± ∞ ¹   1.005M ±  ∞ ¹       ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*"-10                                         20.88M ± ∞ ¹   20.88M ±  ∞ ¹       ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".+"-10                                         23.63M ± ∞ ¹   23.63M ±  ∞ ¹       ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"^.+$",j=~"X.+"-10                              100.0k ± ∞ ¹   100.0k ±  ∞ ¹       ~ (p=1.000 n=4)   ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~""-10                                           2.750M ± ∞ ¹   2.750M ±  ∞ ¹       ~ (p=0.743 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!=""-10                                           23.63M ± ∞ ¹   23.63M ±  ∞ ¹       ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",j="foo"-10                           1.004M ± ∞ ¹   1.004M ±  ∞ ¹       ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",j="foo"-10                          44.00 ± ∞ ¹    44.00 ±  ∞ ¹       ~ (p=1.000 n=4)   ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",i!="2",j="foo"-10                    1.004M ± ∞ ¹   1.004M ±  ∞ ¹       ~ (p=0.486 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!=""-10                                     4.160M ± ∞ ¹   4.160M ±  ∞ ¹       ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j="foo"-10                             3.754M ± ∞ ¹   3.754M ±  ∞ ¹       ~ (p=0.114 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"X.+"-10                            100.1k ± ∞ ¹   100.1k ±  ∞ ¹       ~ (p=1.000 n=4)   ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"XXX|YYY"-10                         61.00 ± ∞ ¹    61.00 ±  ∞ ¹       ~ (p=1.000 n=4)   ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"X|Y|Z",j="foo"-10                         82.00 ± ∞ ¹    82.00 ±  ∞ ¹       ~ (p=1.000 n=4)   ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",j="foo"-10                           3.754M ± ∞ ¹   3.754M ±  ∞ ¹       ~ (p=0.829 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"1.+",j="foo"-10                          417.4k ± ∞ ¹   417.4k ±  ∞ ¹       ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!="2",j="foo"-10                    3.754M ± ∞ ¹   3.754M ±  ∞ ¹       ~ (p=0.200 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!~"2.*",j="foo"-10                  3.948M ± ∞ ¹   3.948M ±  ∞ ¹       ~ (p=0.114 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",i!~"^.*2.*$",j="foo"-10             44.00 ± ∞ ¹    44.00 ±  ∞ ¹       ~ (p=1.000 n=4)   ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"0xxx|1xxx|2xxx"-10                              902.0 ± ∞ ¹    903.0 ±  ∞ ¹  +0.11% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"(0|1|2)xxx"-10                                  901.0 ± ∞ ¹    902.0 ±  ∞ ¹  +0.11% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"[0-2]xxx"-10                                    901.0 ± ∞ ¹    902.0 ±  ∞ ¹  +0.11% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!~[0-2]xxx-10                                     20.88M ± ∞ ¹   20.88M ±  ∞ ¹       ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*",_i!~[0-2]xxx-10                            20.88M ± ∞ ¹   20.88M ± 0%         ~ (p=0.808 n=4+8)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"<unique_prefix>.+"-10                           381.0 ± ∞ ¹    381.0 ±  ∞ ¹       ~ (p=1.000 n=4)   ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"<unique_prefix>.+"-10                     267.0 ± ∞ ¹    267.0 ±  ∞ ¹       ~ (p=1.000 n=4)   ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!~"<unique_prefix>.+"-10                    1.411M ± ∞ ¹   1.410M ±  ∞ ¹       ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",p="foo",i=~"<unique_prefix>.+"-10           312.0 ± ∞ ¹    312.0 ±  ∞ ¹       ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".+",i=~"<unique_prefix>.+"-10          1.397k ± ∞ ¹   1.397k ±  ∞ ¹       ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".*",i=~"<unique_prefix>.+"-10           327.0 ± ∞ ¹    326.5 ±  ∞ ¹       ~ (p=0.486 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".*",n=~".*",i=~"<unique_prefix>.+"-10           415.0 ± ∞ ¹    415.0 ±  ∞ ¹       ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".+",n=~".+",i=~"<unique_prefix>.+"-10          1.533k ± ∞ ¹   1.533k ±  ∞ ¹       ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/p!=""-10                                           4.651M ± ∞ ¹   4.651M ±  ∞ ¹       ~ (p=0.686 n=4)
geomean                                                                                                     25.37k         25.38k         +0.00%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
32Ki vs 128Ki
goos: darwin
goarch: arm64
pkg: github.com/grafana/mimir/pkg/storegateway
                                                                                                   │ after-6ed5fd40b.txt │         after-6413c4cf6.txt         │
                                                                                                   │       sec/op        │    sec/op     vs base               │
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X"-10                                           13.90µ ± ∞ ¹   11.99µ ± ∞ ¹        ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j="foo"-10                                   32.13µ ± ∞ ¹   33.16µ ± ∞ ¹        ~ (p=0.057 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j!="foo"-10                                  31.80µ ± ∞ ¹   32.14µ ± ∞ ¹        ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"XXX|YYY"-10                                    1.918µ ± ∞ ¹   1.912µ ± ∞ ¹        ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"X.+"-10                                        1.828µ ± ∞ ¹   1.866µ ± ∞ ¹        ~ (p=0.171 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"X|Y|Z"-10                                      31.29µ ± ∞ ¹   31.72µ ± ∞ ¹   +1.38% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1"-10                                            1.228 ± ∞ ¹    1.262 ± ∞ ¹        ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j="foo"-10                                    1.217 ± ∞ ¹    1.223 ± ∞ ¹        ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n="1"-10                                    1.221 ± ∞ ¹    1.212 ± ∞ ¹        ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j!="foo"-10                                   1.197 ± ∞ ¹    1.230 ± ∞ ¹        ~ (p=0.057 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*"-10                                          3.858 ± ∞ ¹    4.006 ± ∞ ¹   +3.83% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".+"-10                                          5.131 ± ∞ ¹    5.309 ± ∞ ¹   +3.46% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"^.+$",j=~"X.+"-10                              7.841m ± ∞ ¹   8.027m ± ∞ ¹        ~ (p=0.200 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~""-10                                            1.473 ± ∞ ¹    1.618 ± ∞ ¹   +9.87% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!=""-10                                            5.123 ± ∞ ¹    5.348 ± ∞ ¹   +4.40% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",j="foo"-10                            1.205 ± ∞ ¹    1.246 ± ∞ ¹   +3.39% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",j="foo"-10                         23.27µ ± ∞ ¹   23.80µ ± ∞ ¹   +2.29% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",i!="2",j="foo"-10                     1.210 ± ∞ ¹    1.237 ± ∞ ¹   +2.19% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!=""-10                                      2.454 ± ∞ ¹    2.497 ± ∞ ¹   +1.75% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j="foo"-10                              2.435 ± ∞ ¹    2.596 ± ∞ ¹   +6.62% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"X.+"-10                            7.160m ± ∞ ¹   7.621m ± ∞ ¹        ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"XXX|YYY"-10                        15.31µ ± ∞ ¹   15.58µ ± ∞ ¹        ~ (p=0.486 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"X|Y|Z",j="foo"-10                        55.70µ ± ∞ ¹   58.37µ ± ∞ ¹        ~ (p=0.486 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",j="foo"-10                            2.543 ± ∞ ¹    2.487 ± ∞ ¹        ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"1.+",j="foo"-10                          281.6m ± ∞ ¹   293.4m ± ∞ ¹        ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!="2",j="foo"-10                     2.456 ± ∞ ¹    2.516 ± ∞ ¹   +2.47% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!~"2.*",j="foo"-10                   2.458 ± ∞ ¹    2.549 ± ∞ ¹   +3.68% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",i!~"^.*2.*$",j="foo"-10            23.26µ ± ∞ ¹   23.58µ ± ∞ ¹   +1.36% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"0xxx|1xxx|2xxx"-10                             281.4µ ± ∞ ¹   328.8µ ± ∞ ¹  +16.86% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"(0|1|2)xxx"-10                                 280.1µ ± ∞ ¹   325.2µ ± ∞ ¹  +16.09% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"[0-2]xxx"-10                                   280.6µ ± ∞ ¹   325.4µ ± ∞ ¹  +15.94% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!~[0-2]xxx-10                                      3.873 ± ∞ ¹    3.897 ± ∞ ¹        ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*",_i!~[0-2]xxx-10                             3.875 ± ∞ ¹    3.895 ± ∞ ¹        ~ (p=0.200 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"<unique_prefix>.+"-10                          352.7µ ± ∞ ¹   365.3µ ± ∞ ¹   +3.56% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"<unique_prefix>.+"-10                    1.535m ± ∞ ¹   1.581m ± ∞ ¹   +2.97% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!~"<unique_prefix>.+"-10                     1.225 ± ∞ ¹    1.233 ± ∞ ¹   +0.70% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",p="foo",i=~"<unique_prefix>.+"-10          11.78m ± ∞ ¹   11.81m ± ∞ ¹        ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".+",i=~"<unique_prefix>.+"-10          40.71m ± ∞ ¹   40.66m ± ∞ ¹        ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".*",i=~"<unique_prefix>.+"-10          11.33m ± ∞ ¹   11.42m ± ∞ ¹   +0.78% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".*",n=~".*",i=~"<unique_prefix>.+"-10          381.5µ ± ∞ ¹   388.7µ ± ∞ ¹   +1.87% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".+",n=~".+",i=~"<unique_prefix>.+"-10          56.07m ± ∞ ¹   56.15m ± ∞ ¹        ~ (p=0.486 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/p!=""-10                                            1.657 ± ∞ ¹    1.668 ± ∞ ¹        ~ (p=0.486 n=4)
geomean                                                                                                     17.61m         18.10m         +2.80%
¹ need >= 6 samples for confidence interval at level 0.95

                                                                                                   │ after-6ed5fd40b.txt │           after-6413c4cf6.txt           │
                                                                                                   │        B/op         │     B/op       vs base                  │
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X"-10                                          2.230Ki ± ∞ ¹   2.230Ki ± ∞ ¹         ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j="foo"-10                                  2.935Ki ± ∞ ¹   2.935Ki ± ∞ ¹         ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j!="foo"-10                                 2.935Ki ± ∞ ¹   2.934Ki ± ∞ ¹         ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"XXX|YYY"-10                                   1.852Ki ± ∞ ¹   1.852Ki ± ∞ ¹         ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"X.+"-10                                       1.797Ki ± ∞ ¹   1.797Ki ± ∞ ¹         ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"X|Y|Z"-10                                     2.917Ki ± ∞ ¹   2.917Ki ± ∞ ¹         ~ (p=0.486 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1"-10                                          169.1Mi ± ∞ ¹   173.2Mi ± ∞ ¹    +2.44% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j="foo"-10                                  116.9Mi ± ∞ ¹   118.7Mi ± ∞ ¹    +1.51% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n="1"-10                                  116.7Mi ± ∞ ¹   118.7Mi ± ∞ ¹    +1.70% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j!="foo"-10                                 117.1Mi ± ∞ ¹   118.9Mi ± ∞ ¹    +1.49% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*"-10                                        3.106Gi ± ∞ ¹   3.198Gi ± ∞ ¹    +2.94% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".+"-10                                        3.261Gi ± ∞ ¹   3.352Gi ± ∞ ¹    +2.80% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"^.+$",j=~"X.+"-10                             10.69Mi ± ∞ ¹   10.69Mi ± ∞ ¹         ~ (p=0.114 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~""-10                                          229.3Mi ± ∞ ¹   229.3Mi ± ∞ ¹         ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!=""-10                                          3.260Gi ± ∞ ¹   3.352Gi ± ∞ ¹    +2.82% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",j="foo"-10                          120.1Mi ± ∞ ¹   121.9Mi ± ∞ ¹    +1.46% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",j="foo"-10                        3.106Ki ± ∞ ¹   3.106Ki ± ∞ ¹         ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",i!="2",j="foo"-10                   121.4Mi ± ∞ ¹   123.1Mi ± ∞ ¹    +1.44% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!=""-10                                    360.7Mi ± ∞ ¹   364.4Mi ± ∞ ¹    +1.04% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j="foo"-10                            308.6Mi ± ∞ ¹   310.3Mi ± ∞ ¹    +0.56% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"X.+"-10                           10.69Mi ± ∞ ¹   10.69Mi ± ∞ ¹         ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"XXX|YYY"-10                       3.826Ki ± ∞ ¹   3.826Ki ± ∞ ¹         ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"X|Y|Z",j="foo"-10                       5.266Ki ± ∞ ¹   5.265Ki ± ∞ ¹         ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",j="foo"-10                          308.6Mi ± ∞ ¹   310.4Mi ± ∞ ¹    +0.57% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"1.+",j="foo"-10                         48.97Mi ± ∞ ¹   49.24Mi ± ∞ ¹    +0.56% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!="2",j="foo"-10                   309.7Mi ± ∞ ¹   311.7Mi ± ∞ ¹    +0.65% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!~"2.*",j="foo"-10                 316.0Mi ± ∞ ¹   317.5Mi ± ∞ ¹    +0.49% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",i!~"^.*2.*$",j="foo"-10           3.310Ki ± ∞ ¹   3.310Ki ± ∞ ¹         ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"0xxx|1xxx|2xxx"-10                            201.8Ki ± ∞ ¹   493.5Ki ± ∞ ¹  +144.54% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"(0|1|2)xxx"-10                                201.3Ki ± ∞ ¹   493.0Ki ± ∞ ¹  +144.87% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"[0-2]xxx"-10                                  201.4Ki ± ∞ ¹   493.2Ki ± ∞ ¹  +144.91% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!~[0-2]xxx-10                                    3.103Gi ± ∞ ¹   3.195Gi ± ∞ ¹    +2.96% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*",_i!~[0-2]xxx-10                           3.106Gi ± ∞ ¹   3.198Gi ± ∞ ¹    +2.96% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"<unique_prefix>.+"-10                         1.773Mi ± ∞ ¹   1.864Mi ± ∞ ¹    +5.15% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"<unique_prefix>.+"-10                   2.989Mi ± ∞ ¹   3.082Mi ± ∞ ¹    +3.14% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!~"<unique_prefix>.+"-10                   171.2Mi ± ∞ ¹   174.5Mi ± ∞ ¹    +1.92% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",p="foo",i=~"<unique_prefix>.+"-10         20.15Mi ± ∞ ¹   20.25Mi ± ∞ ¹    +0.47% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".+",i=~"<unique_prefix>.+"-10         59.18Mi ± ∞ ¹   59.27Mi ± ∞ ¹    +0.16% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".*",i=~"<unique_prefix>.+"-10         14.02Mi ± ∞ ¹   14.12Mi ± ∞ ¹    +0.67% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".*",n=~".*",i=~"<unique_prefix>.+"-10         1.780Mi ± ∞ ¹   1.872Mi ± ∞ ¹    +5.15% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".+",n=~".+",i=~"<unique_prefix>.+"-10         77.54Mi ± ∞ ¹   77.63Mi ± ∞ ¹    +0.12% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/p!=""-10                                          678.8Mi ± ∞ ¹   697.9Mi ± ∞ ¹    +2.82% (p=0.029 n=4)
geomean                                                                                                    6.208Mi         6.693Mi          +7.81%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

                                                                                                   │ after-6ed5fd40b.txt │         after-6413c4cf6.txt          │
                                                                                                   │      allocs/op      │  allocs/op    vs base                │
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X"-10                                            36.00 ± ∞ ¹    36.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j="foo"-10                                    44.00 ± ∞ ¹    44.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j!="foo"-10                                   44.00 ± ∞ ¹    44.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"XXX|YYY"-10                                     31.00 ± ∞ ¹    31.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"X.+"-10                                         31.00 ± ∞ ¹    31.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"X|Y|Z"-10                                       46.00 ± ∞ ¹    46.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1"-10                                           1.410M ± ∞ ¹   1.410M ± ∞ ¹       ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j="foo"-10                                   1.004M ± ∞ ¹   1.004M ± ∞ ¹       ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n="1"-10                                   1.004M ± ∞ ¹   1.004M ± ∞ ¹       ~ (p=0.543 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j!="foo"-10                                  1.005M ± ∞ ¹   1.005M ± ∞ ¹       ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*"-10                                         20.88M ± ∞ ¹   20.88M ± ∞ ¹       ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".+"-10                                         23.63M ± ∞ ¹   23.63M ± ∞ ¹       ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"^.+$",j=~"X.+"-10                              100.0k ± ∞ ¹   100.0k ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~""-10                                           2.750M ± ∞ ¹   2.750M ± ∞ ¹       ~ (p=0.743 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!=""-10                                           23.63M ± ∞ ¹   23.63M ± ∞ ¹       ~ (p=0.486 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",j="foo"-10                           1.004M ± ∞ ¹   1.004M ± ∞ ¹       ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",j="foo"-10                          44.00 ± ∞ ¹    44.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",i!="2",j="foo"-10                    1.004M ± ∞ ¹   1.004M ± ∞ ¹       ~ (p=0.057 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!=""-10                                     4.160M ± ∞ ¹   4.160M ± ∞ ¹       ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j="foo"-10                             3.754M ± ∞ ¹   3.754M ± ∞ ¹       ~ (p=0.400 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"X.+"-10                            100.1k ± ∞ ¹   100.1k ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"XXX|YYY"-10                         61.00 ± ∞ ¹    61.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"X|Y|Z",j="foo"-10                         82.00 ± ∞ ¹    82.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",j="foo"-10                           3.754M ± ∞ ¹   3.754M ± ∞ ¹       ~ (p=0.457 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"1.+",j="foo"-10                          417.4k ± ∞ ¹   417.3k ± ∞ ¹  -0.00% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!="2",j="foo"-10                    3.754M ± ∞ ¹   3.754M ± ∞ ¹       ~ (p=0.486 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!~"2.*",j="foo"-10                  3.948M ± ∞ ¹   3.948M ± ∞ ¹       ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",i!~"^.*2.*$",j="foo"-10             44.00 ± ∞ ¹    44.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"0xxx|1xxx|2xxx"-10                              902.0 ± ∞ ¹    904.0 ± ∞ ¹  +0.22% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"(0|1|2)xxx"-10                                  901.0 ± ∞ ¹    903.0 ± ∞ ¹  +0.22% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"[0-2]xxx"-10                                    901.0 ± ∞ ¹    903.0 ± ∞ ¹  +0.22% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!~[0-2]xxx-10                                     20.88M ± ∞ ¹   20.88M ± ∞ ¹       ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*",_i!~[0-2]xxx-10                            20.88M ± ∞ ¹   20.88M ± ∞ ¹       ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"<unique_prefix>.+"-10                           381.0 ± ∞ ¹    381.0 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"<unique_prefix>.+"-10                     267.0 ± ∞ ¹    267.0 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!~"<unique_prefix>.+"-10                    1.411M ± ∞ ¹   1.411M ± ∞ ¹       ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",p="foo",i=~"<unique_prefix>.+"-10           312.0 ± ∞ ¹    312.0 ± ∞ ¹       ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".+",i=~"<unique_prefix>.+"-10          1.397k ± ∞ ¹   1.396k ± ∞ ¹       ~ (p=0.143 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".*",i=~"<unique_prefix>.+"-10           327.0 ± ∞ ¹    327.0 ± ∞ ¹       ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".*",n=~".*",i=~"<unique_prefix>.+"-10           415.0 ± ∞ ¹    415.0 ± ∞ ¹       ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".+",n=~".+",i=~"<unique_prefix>.+"-10          1.533k ± ∞ ¹   1.532k ± ∞ ¹       ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/p!=""-10                                           4.651M ± ∞ ¹   4.651M ± ∞ ¹       ~ (p=0.343 n=4)
geomean                                                                                                     25.37k         25.38k        +0.01%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
32Ki unpooled vs pooled
goos: darwin
goarch: arm64
pkg: github.com/grafana/mimir/pkg/storegateway
                                                                                                   │ after-6ed5fd40b.txt │         after-8e7626872.txt         │
                                                                                                   │       sec/op        │    sec/op     vs base               │
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X"-10                                           13.90µ ± ∞ ¹   12.04µ ± ∞ ¹        ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j="foo"-10                                   32.13µ ± ∞ ¹   23.12µ ± ∞ ¹  -28.05% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j!="foo"-10                                  31.80µ ± ∞ ¹   23.08µ ± ∞ ¹  -27.42% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"XXX|YYY"-10                                    1.918µ ± ∞ ¹   1.859µ ± ∞ ¹   -3.08% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"X.+"-10                                        1.828µ ± ∞ ¹   1.829µ ± ∞ ¹        ~ (p=0.629 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"X|Y|Z"-10                                      31.29µ ± ∞ ¹   31.47µ ± ∞ ¹   +0.59% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1"-10                                            1.228 ± ∞ ¹    1.306 ± ∞ ¹        ~ (p=0.057 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j="foo"-10                                    1.217 ± ∞ ¹    1.218 ± ∞ ¹        ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n="1"-10                                    1.221 ± ∞ ¹    1.230 ± ∞ ¹        ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j!="foo"-10                                   1.197 ± ∞ ¹    1.222 ± ∞ ¹        ~ (p=0.114 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*"-10                                          3.858 ± ∞ ¹    3.913 ± ∞ ¹        ~ (p=0.486 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".+"-10                                          5.131 ± ∞ ¹    5.244 ± ∞ ¹        ~ (p=0.114 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"^.+$",j=~"X.+"-10                              7.841m ± ∞ ¹   8.175m ± ∞ ¹   +4.26% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~""-10                                            1.473 ± ∞ ¹    1.517 ± ∞ ¹   +2.97% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!=""-10                                            5.123 ± ∞ ¹    5.254 ± ∞ ¹   +2.56% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",j="foo"-10                            1.205 ± ∞ ¹    1.228 ± ∞ ¹   +1.89% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",j="foo"-10                         23.27µ ± ∞ ¹   23.80µ ± ∞ ¹   +2.32% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",i!="2",j="foo"-10                     1.210 ± ∞ ¹    1.239 ± ∞ ¹   +2.36% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!=""-10                                      2.454 ± ∞ ¹    2.559 ± ∞ ¹   +4.25% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j="foo"-10                              2.435 ± ∞ ¹    2.596 ± ∞ ¹   +6.64% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"X.+"-10                            7.160m ± ∞ ¹   7.168m ± ∞ ¹        ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"XXX|YYY"-10                        15.31µ ± ∞ ¹   15.66µ ± ∞ ¹        ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"X|Y|Z",j="foo"-10                        55.70µ ± ∞ ¹   55.51µ ± ∞ ¹        ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",j="foo"-10                            2.543 ± ∞ ¹    2.535 ± ∞ ¹        ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"1.+",j="foo"-10                          281.6m ± ∞ ¹   291.7m ± ∞ ¹        ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!="2",j="foo"-10                     2.456 ± ∞ ¹    2.511 ± ∞ ¹   +2.27% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!~"2.*",j="foo"-10                   2.458 ± ∞ ¹    2.597 ± ∞ ¹   +5.63% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",i!~"^.*2.*$",j="foo"-10            23.26µ ± ∞ ¹   23.73µ ± ∞ ¹   +1.99% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"0xxx|1xxx|2xxx"-10                             281.4µ ± ∞ ¹   255.3µ ± ∞ ¹   -9.29% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"(0|1|2)xxx"-10                                 280.1µ ± ∞ ¹   270.7µ ± ∞ ¹   -3.37% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"[0-2]xxx"-10                                   280.6µ ± ∞ ¹   257.0µ ± ∞ ¹        ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!~[0-2]xxx-10                                      3.873 ± ∞ ¹    4.009 ± ∞ ¹   +3.52% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*",_i!~[0-2]xxx-10                             3.875 ± ∞ ¹    4.076 ± ∞ ¹   +5.18% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"<unique_prefix>.+"-10                          352.7µ ± ∞ ¹   374.5µ ± ∞ ¹        ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"<unique_prefix>.+"-10                    1.535m ± ∞ ¹   1.585m ± ∞ ¹   +3.22% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!~"<unique_prefix>.+"-10                     1.225 ± ∞ ¹    1.267 ± ∞ ¹   +3.43% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",p="foo",i=~"<unique_prefix>.+"-10          11.78m ± ∞ ¹   11.95m ± ∞ ¹        ~ (p=0.114 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".+",i=~"<unique_prefix>.+"-10          40.71m ± ∞ ¹   41.14m ± ∞ ¹   +1.05% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".*",i=~"<unique_prefix>.+"-10          11.33m ± ∞ ¹   11.47m ± ∞ ¹        ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".*",n=~".*",i=~"<unique_prefix>.+"-10          381.5µ ± ∞ ¹   390.0µ ± ∞ ¹        ~ (p=0.057 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".+",n=~".+",i=~"<unique_prefix>.+"-10          56.07m ± ∞ ¹   59.52m ± ∞ ¹   +6.16% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/p!=""-10                                            1.657 ± ∞ ¹    1.714 ± ∞ ¹        ~ (p=0.057 n=4)
geomean                                                                                                     17.61m         17.56m         -0.31%
¹ need >= 6 samples for confidence interval at level 0.95

                                                                                                   │ after-6ed5fd40b.txt │          after-8e7626872.txt           │
                                                                                                   │        B/op         │     B/op       vs base                 │
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X"-10                                          2.230Ki ± ∞ ¹   2.230Ki ± ∞ ¹        ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j="foo"-10                                  2.935Ki ± ∞ ¹   2.934Ki ± ∞ ¹        ~ (p=0.429 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j!="foo"-10                                 2.935Ki ± ∞ ¹   2.934Ki ± ∞ ¹        ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"XXX|YYY"-10                                   1.852Ki ± ∞ ¹   1.852Ki ± ∞ ¹        ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"X.+"-10                                       1.797Ki ± ∞ ¹   1.797Ki ± ∞ ¹        ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"X|Y|Z"-10                                     2.917Ki ± ∞ ¹   2.918Ki ± ∞ ¹        ~ (p=0.371 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1"-10                                          169.1Mi ± ∞ ¹   168.3Mi ± ∞ ¹   -0.49% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j="foo"-10                                  116.9Mi ± ∞ ¹   116.5Mi ± ∞ ¹        ~ (p=0.114 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n="1"-10                                  116.7Mi ± ∞ ¹   116.6Mi ± ∞ ¹        ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j!="foo"-10                                 117.1Mi ± ∞ ¹   116.8Mi ± ∞ ¹        ~ (p=0.114 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*"-10                                        3.106Gi ± ∞ ¹   3.076Gi ± ∞ ¹   -0.97% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".+"-10                                        3.261Gi ± ∞ ¹   3.230Gi ± ∞ ¹   -0.94% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"^.+$",j=~"X.+"-10                             10.69Mi ± ∞ ¹   10.69Mi ± ∞ ¹        ~ (p=0.114 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~""-10                                          229.3Mi ± ∞ ¹   229.3Mi ± ∞ ¹        ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!=""-10                                          3.260Gi ± ∞ ¹   3.230Gi ± ∞ ¹   -0.93% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",j="foo"-10                          120.1Mi ± ∞ ¹   119.7Mi ± ∞ ¹   -0.36% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",j="foo"-10                        3.106Ki ± ∞ ¹   3.106Ki ± ∞ ¹        ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",i!="2",j="foo"-10                   121.4Mi ± ∞ ¹   121.2Mi ± ∞ ¹        ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!=""-10                                    360.7Mi ± ∞ ¹   359.6Mi ± ∞ ¹   -0.29% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j="foo"-10                            308.6Mi ± ∞ ¹   308.1Mi ± ∞ ¹        ~ (p=0.057 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"X.+"-10                           10.69Mi ± ∞ ¹   10.69Mi ± ∞ ¹        ~ (p=0.686 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"XXX|YYY"-10                       3.826Ki ± ∞ ¹   3.826Ki ± ∞ ¹        ~ (p=1.000 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"X|Y|Z",j="foo"-10                       5.266Ki ± ∞ ¹   5.266Ki ± ∞ ¹        ~ (p=0.629 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",j="foo"-10                          308.6Mi ± ∞ ¹   308.3Mi ± ∞ ¹        ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"1.+",j="foo"-10                         48.97Mi ± ∞ ¹   48.93Mi ± ∞ ¹   -0.08% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!="2",j="foo"-10                   309.7Mi ± ∞ ¹   309.3Mi ± ∞ ¹   -0.13% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!~"2.*",j="foo"-10                 316.0Mi ± ∞ ¹   315.4Mi ± ∞ ¹   -0.17% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",i!~"^.*2.*$",j="foo"-10           3.310Ki ± ∞ ¹   3.310Ki ± ∞ ¹        ~ (p=0.429 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"0xxx|1xxx|2xxx"-10                            201.8Ki ± ∞ ¹   105.3Ki ± ∞ ¹  -47.80% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"(0|1|2)xxx"-10                                201.3Ki ± ∞ ¹   105.2Ki ± ∞ ¹  -47.74% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"[0-2]xxx"-10                                  201.4Ki ± ∞ ¹   105.3Ki ± ∞ ¹  -47.73% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!~[0-2]xxx-10                                    3.103Gi ± ∞ ¹   3.073Gi ± ∞ ¹   -0.97% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*",_i!~[0-2]xxx-10                           3.106Gi ± ∞ ¹   3.076Gi ± ∞ ¹   -0.97% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"<unique_prefix>.+"-10                         1.773Mi ± ∞ ¹   1.747Mi ± ∞ ¹   -1.47% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"<unique_prefix>.+"-10                   2.989Mi ± ∞ ¹   2.961Mi ± ∞ ¹   -0.91% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!~"<unique_prefix>.+"-10                   171.2Mi ± ∞ ¹   170.4Mi ± ∞ ¹   -0.52% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",p="foo",i=~"<unique_prefix>.+"-10         20.15Mi ± ∞ ¹   20.14Mi ± ∞ ¹   -0.06% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".+",i=~"<unique_prefix>.+"-10         59.18Mi ± ∞ ¹   59.18Mi ± ∞ ¹        ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".*",i=~"<unique_prefix>.+"-10         14.02Mi ± ∞ ¹   14.01Mi ± ∞ ¹   -0.09% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".*",n=~".*",i=~"<unique_prefix>.+"-10         1.780Mi ± ∞ ¹   1.753Mi ± ∞ ¹   -1.52% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".+",n=~".+",i=~"<unique_prefix>.+"-10         77.54Mi ± ∞ ¹   77.53Mi ± ∞ ¹        ~ (p=0.057 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/p!=""-10                                          678.8Mi ± ∞ ¹   672.9Mi ± ∞ ¹   -0.86% (p=0.029 n=4)
geomean                                                                                                    6.208Mi         5.908Mi         -4.83%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

                                                                                                   │ after-6ed5fd40b.txt │         after-8e7626872.txt          │
                                                                                                   │      allocs/op      │  allocs/op    vs base                │
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X"-10                                            36.00 ± ∞ ¹    36.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j="foo"-10                                    44.00 ± ∞ ¹    44.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j!="foo"-10                                   44.00 ± ∞ ¹    44.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"XXX|YYY"-10                                     31.00 ± ∞ ¹    31.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"X.+"-10                                         31.00 ± ∞ ¹    31.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"X|Y|Z"-10                                       46.00 ± ∞ ¹    46.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1"-10                                           1.410M ± ∞ ¹   1.410M ± ∞ ¹       ~ (p=0.057 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j="foo"-10                                   1.004M ± ∞ ¹   1.004M ± ∞ ¹       ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n="1"-10                                   1.004M ± ∞ ¹   1.004M ± ∞ ¹       ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j!="foo"-10                                  1.005M ± ∞ ¹   1.005M ± ∞ ¹       ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*"-10                                         20.88M ± ∞ ¹   20.88M ± ∞ ¹  -0.01% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".+"-10                                         23.63M ± ∞ ¹   23.63M ± ∞ ¹  -0.01% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"^.+$",j=~"X.+"-10                              100.0k ± ∞ ¹   100.0k ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~""-10                                           2.750M ± ∞ ¹   2.750M ± ∞ ¹       ~ (p=0.914 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!=""-10                                           23.63M ± ∞ ¹   23.63M ± ∞ ¹  -0.01% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",j="foo"-10                           1.004M ± ∞ ¹   1.004M ± ∞ ¹       ~ (p=0.514 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",j="foo"-10                          44.00 ± ∞ ¹    44.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",i!="2",j="foo"-10                    1.004M ± ∞ ¹   1.004M ± ∞ ¹       ~ (p=0.486 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!=""-10                                     4.160M ± ∞ ¹   4.160M ± ∞ ¹       ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j="foo"-10                             3.754M ± ∞ ¹   3.754M ± ∞ ¹       ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"X.+"-10                            100.1k ± ∞ ¹   100.1k ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"XXX|YYY"-10                         61.00 ± ∞ ¹    61.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"X|Y|Z",j="foo"-10                         82.00 ± ∞ ¹    82.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",j="foo"-10                           3.754M ± ∞ ¹   3.754M ± ∞ ¹       ~ (p=0.800 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"1.+",j="foo"-10                          417.4k ± ∞ ¹   417.4k ± ∞ ¹       ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!="2",j="foo"-10                    3.754M ± ∞ ¹   3.754M ± ∞ ¹       ~ (p=0.343 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!~"2.*",j="foo"-10                  3.948M ± ∞ ¹   3.948M ± ∞ ¹       ~ (p=0.886 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",i!~"^.*2.*$",j="foo"-10             44.00 ± ∞ ¹    44.00 ± ∞ ¹       ~ (p=1.000 n=4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"0xxx|1xxx|2xxx"-10                              902.0 ± ∞ ¹    896.0 ± ∞ ¹  -0.67% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"(0|1|2)xxx"-10                                  901.0 ± ∞ ¹    895.0 ± ∞ ¹  -0.67% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"[0-2]xxx"-10                                    901.0 ± ∞ ¹    895.0 ± ∞ ¹  -0.67% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!~[0-2]xxx-10                                     20.88M ± ∞ ¹   20.88M ± ∞ ¹  -0.01% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*",_i!~[0-2]xxx-10                            20.88M ± ∞ ¹   20.88M ± ∞ ¹  -0.01% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"<unique_prefix>.+"-10                           381.0 ± ∞ ¹    380.0 ± ∞ ¹  -0.26% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"<unique_prefix>.+"-10                     267.0 ± ∞ ¹    266.0 ± ∞ ¹  -0.37% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!~"<unique_prefix>.+"-10                    1.411M ± ∞ ¹   1.410M ± ∞ ¹       ~ (p=0.114 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",p="foo",i=~"<unique_prefix>.+"-10           312.0 ± ∞ ¹    313.0 ± ∞ ¹  +0.32% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".+",i=~"<unique_prefix>.+"-10          1.397k ± ∞ ¹   1.399k ± ∞ ¹       ~ (p=0.057 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".*",i=~"<unique_prefix>.+"-10           327.0 ± ∞ ¹    328.0 ± ∞ ¹       ~ (p=0.514 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".*",n=~".*",i=~"<unique_prefix>.+"-10           415.0 ± ∞ ¹    414.0 ± ∞ ¹  -0.24% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".+",n=~".+",i=~"<unique_prefix>.+"-10          1.533k ± ∞ ¹   1.536k ± ∞ ¹  +0.16% (p=0.029 n=4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/p!=""-10                                           4.651M ± ∞ ¹   4.651M ± ∞ ¹  -0.01% (p=0.029 n=4)
geomean                                                                                                     25.37k         25.36k        -0.05%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

@dimitarvdimitrov
Copy link
Contributor Author

i had to remove series pooling because of the race condition with the index cache (which is also not detected by the race detector in tests 😬 )

With that the final benchmarks are below. Allocated bytes are down, but allocated objects are up.

base vs 32Ki pooled buffer
goos: darwin
goarch: arm64
pkg: github.com/grafana/mimir/pkg/storegateway
                                                                                                   │ before-2243ff36e.txt │          after-c1b1d4f7a.txt          │
                                                                                                   │        sec/op        │    sec/op     vs base                 │
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X"-10                                            12.24µ ± ∞ ¹   12.29µ ± ∞ ¹        ~ (p=0.413 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j="foo"-10                                    23.77µ ± ∞ ¹   23.75µ ± ∞ ¹        ~ (p=1.000 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j!="foo"-10                                   32.91µ ± ∞ ¹   25.43µ ± ∞ ¹        ~ (p=0.190 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"XXX|YYY"-10                                     1.895µ ± ∞ ¹   1.867µ ± ∞ ¹        ~ (p=0.730 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"X.+"-10                                         1.857µ ± ∞ ¹   1.828µ ± ∞ ¹        ~ (p=0.556 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"X|Y|Z"-10                                       38.31µ ± ∞ ¹   31.65µ ± ∞ ¹  -17.38% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1"-10                                             1.267 ± ∞ ¹    1.234 ± ∞ ¹   -2.60% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j="foo"-10                                     1.235 ± ∞ ¹    1.214 ± ∞ ¹   -1.69% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n="1"-10                                     1.251 ± ∞ ¹    1.213 ± ∞ ¹   -3.00% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j!="foo"-10                                    1.224 ± ∞ ¹    1.202 ± ∞ ¹   -1.77% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*"-10                                           3.767 ± ∞ ¹    3.852 ± ∞ ¹        ~ (p=0.111 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".+"-10                                           5.016 ± ∞ ¹    5.168 ± ∞ ¹   +3.04% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"^.+$",j=~"X.+"-10                               7.725m ± ∞ ¹   7.840m ± ∞ ¹   +1.49% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~""-10                                             1.483 ± ∞ ¹    1.482 ± ∞ ¹        ~ (p=0.730 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!=""-10                                             5.011 ± ∞ ¹    5.177 ± ∞ ¹   +3.31% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",j="foo"-10                             1.235 ± ∞ ¹    1.216 ± ∞ ¹   -1.53% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",j="foo"-10                          23.62µ ± ∞ ¹   23.36µ ± ∞ ¹   -1.07% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",i!="2",j="foo"-10                      1.315 ± ∞ ¹    1.225 ± ∞ ¹   -6.80% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!=""-10                                       2.530 ± ∞ ¹    2.475 ± ∞ ¹   -2.17% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j="foo"-10                               2.485 ± ∞ ¹    2.447 ± ∞ ¹   -1.52% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"X.+"-10                             7.026m ± ∞ ¹   7.081m ± ∞ ¹   +0.77% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"XXX|YYY"-10                         15.23µ ± ∞ ¹   15.26µ ± ∞ ¹        ~ (p=1.000 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"X|Y|Z",j="foo"-10                         55.17µ ± ∞ ¹   54.90µ ± ∞ ¹        ~ (p=0.905 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",j="foo"-10                             2.527 ± ∞ ¹    2.454 ± ∞ ¹   -2.87% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"1.+",j="foo"-10                           282.5m ± ∞ ¹   278.7m ± ∞ ¹   -1.35% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!="2",j="foo"-10                      2.479 ± ∞ ¹    2.460 ± ∞ ¹   -0.76% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!~"2.*",j="foo"-10                    2.494 ± ∞ ¹    2.461 ± ∞ ¹   -1.29% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",i!~"^.*2.*$",j="foo"-10             24.05µ ± ∞ ¹   23.48µ ± ∞ ¹        ~ (p=0.063 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"0xxx|1xxx|2xxx"-10                              301.9µ ± ∞ ¹   260.6µ ± ∞ ¹  -13.69% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"(0|1|2)xxx"-10                                  306.5µ ± ∞ ¹   258.7µ ± ∞ ¹  -15.59% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"[0-2]xxx"-10                                    297.7µ ± ∞ ¹   258.8µ ± ∞ ¹  -13.05% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!~[0-2]xxx-10                                       3.848 ± ∞ ¹    3.878 ± ∞ ¹        ~ (p=0.413 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*",_i!~[0-2]xxx-10                              3.772 ± ∞ ¹    3.944 ± ∞ ¹        ~ (p=0.063 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"<unique_prefix>.+"-10                           361.7µ ± ∞ ¹   345.0µ ± ∞ ¹   -4.63% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"<unique_prefix>.+"-10                     1.591m ± ∞ ¹   1.516m ± ∞ ¹   -4.70% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!~"<unique_prefix>.+"-10                      1.316 ± ∞ ¹    1.235 ± ∞ ¹   -6.11% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",p="foo",i=~"<unique_prefix>.+"-10           12.71m ± ∞ ¹   11.86m ± ∞ ¹        ~ (p=0.063 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".+",i=~"<unique_prefix>.+"-10           41.23m ± ∞ ¹   40.72m ± ∞ ¹   -1.23% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".*",i=~"<unique_prefix>.+"-10           11.77m ± ∞ ¹   11.45m ± ∞ ¹        ~ (p=0.190 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".*",n=~".*",i=~"<unique_prefix>.+"-10           411.7µ ± ∞ ¹   364.0µ ± ∞ ¹  -11.59% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".+",n=~".+",i=~"<unique_prefix>.+"-10           61.14m ± ∞ ¹   56.40m ± ∞ ¹   -7.76% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/p!=""-10                                             1.688 ± ∞ ¹    1.652 ± ∞ ¹   -2.13% (p=0.016 n=5+4)
geomean                                                                                                      17.88m         17.22m         -3.70%
¹ need >= 6 samples for confidence interval at level 0.95

                                                                                                   │ before-2243ff36e.txt │           after-c1b1d4f7a.txt            │
                                                                                                   │         B/op         │     B/op       vs base                   │
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X"-10                                           2.230Ki ± ∞ ¹   2.230Ki ± ∞ ¹        ~ (p=0.889 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j="foo"-10                                   2.935Ki ± ∞ ¹   2.935Ki ± ∞ ¹        ~ (p=0.556 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j!="foo"-10                                  2.935Ki ± ∞ ¹   2.934Ki ± ∞ ¹        ~ (p=0.714 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"XXX|YYY"-10                                    1.852Ki ± ∞ ¹   1.852Ki ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"X.+"-10                                        1.797Ki ± ∞ ¹   1.797Ki ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"X|Y|Z"-10                                      2.917Ki ± ∞ ¹   2.918Ki ± ∞ ¹        ~ (p=0.714 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1"-10                                           399.9Mi ± ∞ ¹   174.2Mi ± ∞ ¹  -56.45% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j="foo"-10                                   346.6Mi ± ∞ ¹   119.2Mi ± ∞ ¹  -65.60% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n="1"-10                                   346.7Mi ± ∞ ¹   119.3Mi ± ∞ ¹  -65.59% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j!="foo"-10                                  346.4Mi ± ∞ ¹   119.3Mi ± ∞ ¹  -65.55% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*"-10                                         3.365Gi ± ∞ ¹   3.226Gi ± ∞ ¹   -4.14% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".+"-10                                         3.519Gi ± ∞ ¹   3.378Gi ± ∞ ¹   -3.98% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"^.+$",j=~"X.+"-10                              10.69Mi ± ∞ ¹   10.69Mi ± ∞ ¹        ~ (p=0.730 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~""-10                                           229.3Mi ± ∞ ¹   229.3Mi ± ∞ ¹        ~ (p=0.968 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!=""-10                                           3.519Gi ± ∞ ¹   3.379Gi ± ∞ ¹   -3.98% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",j="foo"-10                           349.9Mi ± ∞ ¹   122.4Mi ± ∞ ¹  -65.00% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",j="foo"-10                         3.106Ki ± ∞ ¹   3.106Ki ± ∞ ¹    0.00% (n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",i!="2",j="foo"-10                    350.7Mi ± ∞ ¹   123.7Mi ± ∞ ¹  -64.73% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!=""-10                                     591.3Mi ± ∞ ¹   365.4Mi ± ∞ ¹  -38.21% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j="foo"-10                             538.5Mi ± ∞ ¹   310.9Mi ± ∞ ¹  -42.27% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"X.+"-10                            10.69Mi ± ∞ ¹   10.69Mi ± ∞ ¹        ~ (p=0.286 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"XXX|YYY"-10                        3.825Ki ± ∞ ¹   3.826Ki ± ∞ ¹        ~ (p=0.333 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"X|Y|Z",j="foo"-10                        5.266Ki ± ∞ ¹   5.266Ki ± ∞ ¹        ~ (p=0.714 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",j="foo"-10                           538.1Mi ± ∞ ¹   310.9Mi ± ∞ ¹  -42.23% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"1.+",j="foo"-10                          74.32Mi ± ∞ ¹   49.11Mi ± ∞ ¹  -33.91% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!="2",j="foo"-10                    539.3Mi ± ∞ ¹   312.2Mi ± ∞ ¹  -42.12% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!~"2.*",j="foo"-10                  519.8Mi ± ∞ ¹   317.7Mi ± ∞ ¹  -38.87% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",i!~"^.*2.*$",j="foo"-10            3.310Ki ± ∞ ¹   3.310Ki ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"0xxx|1xxx|2xxx"-10                             320.5Ki ± ∞ ¹   110.1Ki ± ∞ ¹  -65.66% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"(0|1|2)xxx"-10                                 320.1Ki ± ∞ ¹   109.7Ki ± ∞ ¹  -65.72% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"[0-2]xxx"-10                                   320.1Ki ± ∞ ¹   109.8Ki ± ∞ ¹  -65.69% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!~[0-2]xxx-10                                     3.362Gi ± ∞ ¹   3.222Gi ± ∞ ¹   -4.17% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*",_i!~[0-2]xxx-10                            3.365Gi ± ∞ ¹   3.225Gi ± ∞ ¹   -4.15% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"<unique_prefix>.+"-10                          1.807Mi ± ∞ ¹   1.743Mi ± ∞ ¹   -3.55% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"<unique_prefix>.+"-10                    3.025Mi ± ∞ ¹   2.959Mi ± ∞ ¹   -2.19% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!~"<unique_prefix>.+"-10                    401.3Mi ± ∞ ¹   175.9Mi ± ∞ ¹  -56.16% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",p="foo",i=~"<unique_prefix>.+"-10          20.18Mi ± ∞ ¹   20.13Mi ± ∞ ¹   -0.25% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".+",i=~"<unique_prefix>.+"-10          59.20Mi ± ∞ ¹   59.16Mi ± ∞ ¹   -0.07% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".*",i=~"<unique_prefix>.+"-10          14.05Mi ± ∞ ¹   14.00Mi ± ∞ ¹   -0.38% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".*",n=~".*",i=~"<unique_prefix>.+"-10          1.814Mi ± ∞ ¹   1.750Mi ± ∞ ¹   -3.52% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".+",n=~".+",i=~"<unique_prefix>.+"-10          77.58Mi ± ∞ ¹   77.51Mi ± ∞ ¹   -0.08% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/p!=""-10                                           914.8Mi ± ∞ ¹   702.7Mi ± ∞ ¹  -23.19% (p=0.016 n=5+4)
geomean                                                                                                     8.323Mi         5.997Mi        -27.94%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

                                                                                                   │ before-2243ff36e.txt │           after-c1b1d4f7a.txt           │
                                                                                                   │      allocs/op       │  allocs/op    vs base                   │
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X"-10                                             36.00 ± ∞ ¹    36.00 ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j="foo"-10                                     44.00 ± ∞ ¹    44.00 ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j!="foo"-10                                    44.00 ± ∞ ¹    44.00 ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"XXX|YYY"-10                                      31.00 ± ∞ ¹    31.00 ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"X.+"-10                                          31.00 ± ∞ ¹    31.00 ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"X|Y|Z"-10                                        46.00 ± ∞ ¹    46.00 ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1"-10                                            1.410M ± ∞ ¹   1.610M ± ∞ ¹  +14.19% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j="foo"-10                                    1.004M ± ∞ ¹   1.104M ± ∞ ¹   +9.96% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n="1"-10                                    1.004M ± ∞ ¹   1.104M ± ∞ ¹   +9.96% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j!="foo"-10                                   1.004M ± ∞ ¹   1.104M ± ∞ ¹   +9.96% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*"-10                                          20.87M ± ∞ ¹   25.87M ± ∞ ¹  +23.96% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".+"-10                                          23.62M ± ∞ ¹   28.62M ± ∞ ¹  +21.17% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"^.+$",j=~"X.+"-10                               100.0k ± ∞ ¹   100.0k ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~""-10                                            2.750M ± ∞ ¹   2.750M ± ∞ ¹        ~ (p=0.444 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!=""-10                                            23.62M ± ∞ ¹   28.62M ± ∞ ¹  +21.17% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",j="foo"-10                            1.004M ± ∞ ¹   1.104M ± ∞ ¹   +9.97% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",j="foo"-10                           44.00 ± ∞ ¹    44.00 ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",i!="2",j="foo"-10                     1.004M ± ∞ ¹   1.104M ± ∞ ¹   +9.97% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!=""-10                                      4.160M ± ∞ ¹   4.360M ± ∞ ¹   +4.81% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j="foo"-10                              3.754M ± ∞ ¹   3.854M ± ∞ ¹   +2.66% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"X.+"-10                             100.1k ± ∞ ¹   100.1k ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"XXX|YYY"-10                          61.00 ± ∞ ¹    61.00 ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"X|Y|Z",j="foo"-10                          82.00 ± ∞ ¹    82.00 ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",j="foo"-10                            3.754M ± ∞ ¹   3.854M ± ∞ ¹   +2.67% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"1.+",j="foo"-10                           417.3k ± ∞ ¹   428.4k ± ∞ ¹   +2.66% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!="2",j="foo"-10                     3.754M ± ∞ ¹   3.854M ± ∞ ¹   +2.66% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!~"2.*",j="foo"-10                   3.948M ± ∞ ¹   4.037M ± ∞ ¹   +2.25% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",i!~"^.*2.*$",j="foo"-10              44.00 ± ∞ ¹    44.00 ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"0xxx|1xxx|2xxx"-10                               893.0 ± ∞ ¹   1042.0 ± ∞ ¹  +16.69% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"(0|1|2)xxx"-10                                   892.0 ± ∞ ¹   1041.0 ± ∞ ¹  +16.70% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"[0-2]xxx"-10                                     892.0 ± ∞ ¹   1041.0 ± ∞ ¹  +16.70% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!~[0-2]xxx-10                                      20.87M ± ∞ ¹   25.87M ± ∞ ¹  +23.96% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*",_i!~[0-2]xxx-10                             20.87M ± ∞ ¹   25.87M ± ∞ ¹  +23.96% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"<unique_prefix>.+"-10                            375.0 ± ∞ ¹    427.0 ± ∞ ¹  +13.87% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"<unique_prefix>.+"-10                      261.0 ± ∞ ¹    265.0 ± ∞ ¹   +1.53% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!~"<unique_prefix>.+"-10                     1.410M ± ∞ ¹   1.610M ± ∞ ¹  +14.18% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",p="foo",i=~"<unique_prefix>.+"-10            305.0 ± ∞ ¹    318.5 ± ∞ ¹   +4.43% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".+",i=~"<unique_prefix>.+"-10           1.389k ± ∞ ¹   1.414k ± ∞ ¹   +1.80% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".*",i=~"<unique_prefix>.+"-10            320.0 ± ∞ ¹    343.5 ± ∞ ¹   +7.34% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".*",n=~".*",i=~"<unique_prefix>.+"-10            410.0 ± ∞ ¹    461.0 ± ∞ ¹  +12.44% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".+",n=~".+",i=~"<unique_prefix>.+"-10           1.528k ± ∞ ¹   1.579k ± ∞ ¹   +3.34% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/p!=""-10                                            4.649M ± ∞ ¹   5.650M ± ∞ ¹  +21.51% (p=0.016 n=5+4)
geomean                                                                                                      25.29k         27.18k         +7.48%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

one idea to reduce allocated objects is to still use a slab pool, but never release it - let the GC collect it after the cache is done with it

Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
@dimitarvdimitrov dimitarvdimitrov force-pushed the dimitar/st-gw/postings-reader-instead-of-buffer branch from 2cf6bd7 to 567977b Compare May 4, 2023 19:01
@dimitarvdimitrov
Copy link
Contributor Author

I did that and we're also back to the status quo in terms of allocated objects

base vs with unreleased pool
goos: darwin
goarch: arm64
pkg: github.com/grafana/mimir/pkg/storegateway
                                                                                                   │ before-2243ff36e.txt │          after-0c0acc813.txt          │
                                                                                                   │        sec/op        │    sec/op     vs base                 │
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X"-10                                            12.24µ ± ∞ ¹   12.18µ ± ∞ ¹        ~ (p=0.556 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j="foo"-10                                    23.77µ ± ∞ ¹   24.85µ ± ∞ ¹        ~ (p=0.730 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j!="foo"-10                                   32.91µ ± ∞ ¹   23.28µ ± ∞ ¹  -29.27% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"XXX|YYY"-10                                     1.895µ ± ∞ ¹   1.863µ ± ∞ ¹        ~ (p=0.111 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"X.+"-10                                         1.857µ ± ∞ ¹   1.826µ ± ∞ ¹        ~ (p=0.111 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"X|Y|Z"-10                                       38.31µ ± ∞ ¹   31.79µ ± ∞ ¹        ~ (p=0.190 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1"-10                                             1.267 ± ∞ ¹    1.245 ± ∞ ¹   -1.75% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j="foo"-10                                     1.235 ± ∞ ¹    1.239 ± ∞ ¹        ~ (p=1.000 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n="1"-10                                     1.251 ± ∞ ¹    1.210 ± ∞ ¹   -3.28% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j!="foo"-10                                    1.224 ± ∞ ¹    1.209 ± ∞ ¹   -1.25% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*"-10                                           3.767 ± ∞ ¹    3.832 ± ∞ ¹        ~ (p=0.111 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".+"-10                                           5.016 ± ∞ ¹    5.147 ± ∞ ¹   +2.61% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"^.+$",j=~"X.+"-10                               7.725m ± ∞ ¹   7.855m ± ∞ ¹   +1.68% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~""-10                                             1.483 ± ∞ ¹    1.484 ± ∞ ¹        ~ (p=0.556 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!=""-10                                             5.011 ± ∞ ¹    5.153 ± ∞ ¹   +2.83% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",j="foo"-10                             1.235 ± ∞ ¹    1.241 ± ∞ ¹        ~ (p=0.286 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",j="foo"-10                          23.62µ ± ∞ ¹   24.85µ ± ∞ ¹        ~ (p=0.190 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",i!="2",j="foo"-10                      1.315 ± ∞ ¹    1.337 ± ∞ ¹        ~ (p=0.413 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!=""-10                                       2.530 ± ∞ ¹    2.557 ± ∞ ¹        ~ (p=0.413 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j="foo"-10                               2.485 ± ∞ ¹    2.549 ± ∞ ¹   +2.56% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"X.+"-10                             7.026m ± ∞ ¹   7.484m ± ∞ ¹   +6.51% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"XXX|YYY"-10                         15.23µ ± ∞ ¹   15.37µ ± ∞ ¹        ~ (p=0.063 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"X|Y|Z",j="foo"-10                         55.17µ ± ∞ ¹   55.18µ ± ∞ ¹        ~ (p=1.000 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",j="foo"-10                             2.527 ± ∞ ¹    2.500 ± ∞ ¹        ~ (p=0.286 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"1.+",j="foo"-10                           282.5m ± ∞ ¹   282.9m ± ∞ ¹        ~ (p=0.905 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!="2",j="foo"-10                      2.479 ± ∞ ¹    2.551 ± ∞ ¹        ~ (p=0.111 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!~"2.*",j="foo"-10                    2.494 ± ∞ ¹    2.475 ± ∞ ¹        ~ (p=0.111 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",i!~"^.*2.*$",j="foo"-10             24.05µ ± ∞ ¹   23.60µ ± ∞ ¹        ~ (p=0.905 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"0xxx|1xxx|2xxx"-10                              301.9µ ± ∞ ¹   271.4µ ± ∞ ¹  -10.09% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"(0|1|2)xxx"-10                                  306.5µ ± ∞ ¹   271.0µ ± ∞ ¹  -11.56% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"[0-2]xxx"-10                                    297.7µ ± ∞ ¹   270.7µ ± ∞ ¹   -9.04% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!~[0-2]xxx-10                                       3.848 ± ∞ ¹    4.330 ± ∞ ¹  +12.53% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*",_i!~[0-2]xxx-10                              3.772 ± ∞ ¹    4.215 ± ∞ ¹  +11.74% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"<unique_prefix>.+"-10                           361.7µ ± ∞ ¹   338.3µ ± ∞ ¹   -6.49% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"<unique_prefix>.+"-10                     1.591m ± ∞ ¹   1.535m ± ∞ ¹   -3.50% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!~"<unique_prefix>.+"-10                      1.316 ± ∞ ¹    1.242 ± ∞ ¹   -5.61% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",p="foo",i=~"<unique_prefix>.+"-10           12.71m ± ∞ ¹   12.05m ± ∞ ¹        ~ (p=0.730 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".+",i=~"<unique_prefix>.+"-10           41.23m ± ∞ ¹   41.66m ± ∞ ¹        ~ (p=0.111 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".*",i=~"<unique_prefix>.+"-10           11.77m ± ∞ ¹   11.67m ± ∞ ¹        ~ (p=0.905 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".*",n=~".*",i=~"<unique_prefix>.+"-10           411.7µ ± ∞ ¹   363.3µ ± ∞ ¹  -11.76% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".+",n=~".+",i=~"<unique_prefix>.+"-10           61.14m ± ∞ ¹   56.57m ± ∞ ¹   -7.47% (p=0.032 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/p!=""-10                                             1.688 ± ∞ ¹    1.735 ± ∞ ¹        ~ (p=0.111 n=5+4)
geomean                                                                                                      17.88m         17.54m         -1.91%
¹ need >= 6 samples for confidence interval at level 0.95

                                                                                                   │ before-2243ff36e.txt │           after-0c0acc813.txt            │
                                                                                                   │         B/op         │     B/op       vs base                   │
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X"-10                                           2.230Ki ± ∞ ¹   2.230Ki ± ∞ ¹        ~ (p=0.889 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j="foo"-10                                   2.935Ki ± ∞ ¹   2.935Ki ± ∞ ¹        ~ (p=0.556 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j!="foo"-10                                  2.935Ki ± ∞ ¹   2.935Ki ± ∞ ¹        ~ (p=1.000 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"XXX|YYY"-10                                    1.852Ki ± ∞ ¹   1.852Ki ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"X.+"-10                                        1.797Ki ± ∞ ¹   1.797Ki ± ∞ ¹        ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"X|Y|Z"-10                                      2.917Ki ± ∞ ¹   2.918Ki ± ∞ ¹        ~ (p=0.714 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1"-10                                           399.9Mi ± ∞ ¹   174.3Mi ± ∞ ¹  -56.41% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j="foo"-10                                   346.6Mi ± ∞ ¹   119.4Mi ± ∞ ¹  -65.56% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n="1"-10                                   346.7Mi ± ∞ ¹   119.3Mi ± ∞ ¹  -65.59% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j!="foo"-10                                  346.4Mi ± ∞ ¹   119.5Mi ± ∞ ¹  -65.49% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*"-10                                         3.365Gi ± ∞ ¹   3.228Gi ± ∞ ¹   -4.05% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".+"-10                                         3.519Gi ± ∞ ¹   3.382Gi ± ∞ ¹   -3.87% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"^.+$",j=~"X.+"-10                              10.69Mi ± ∞ ¹   10.69Mi ± ∞ ¹        ~ (p=0.190 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~""-10                                           229.3Mi ± ∞ ¹   229.3Mi ± ∞ ¹        ~ (p=0.683 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!=""-10                                           3.519Gi ± ∞ ¹   3.383Gi ± ∞ ¹   -3.86% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",j="foo"-10                           349.9Mi ± ∞ ¹   122.4Mi ± ∞ ¹  -65.02% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",j="foo"-10                         3.106Ki ± ∞ ¹   3.106Ki ± ∞ ¹        ~ (p=1.000 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",i!="2",j="foo"-10                    350.7Mi ± ∞ ¹   123.8Mi ± ∞ ¹  -64.70% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!=""-10                                     591.3Mi ± ∞ ¹   365.8Mi ± ∞ ¹  -38.14% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j="foo"-10                             538.5Mi ± ∞ ¹   310.9Mi ± ∞ ¹  -42.27% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"X.+"-10                            10.69Mi ± ∞ ¹   10.69Mi ± ∞ ¹        ~ (p=0.111 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"XXX|YYY"-10                        3.825Ki ± ∞ ¹   3.826Ki ± ∞ ¹        ~ (p=0.079 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"X|Y|Z",j="foo"-10                        5.266Ki ± ∞ ¹   5.265Ki ± ∞ ¹        ~ (p=0.651 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",j="foo"-10                           538.1Mi ± ∞ ¹   310.9Mi ± ∞ ¹  -42.22% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"1.+",j="foo"-10                          74.32Mi ± ∞ ¹   49.14Mi ± ∞ ¹  -33.88% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!="2",j="foo"-10                    539.3Mi ± ∞ ¹   312.4Mi ± ∞ ¹  -42.08% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!~"2.*",j="foo"-10                  519.8Mi ± ∞ ¹   318.0Mi ± ∞ ¹  -38.83% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",i!~"^.*2.*$",j="foo"-10            3.310Ki ± ∞ ¹   3.310Ki ± ∞ ¹        ~ (p=0.333 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"0xxx|1xxx|2xxx"-10                             320.5Ki ± ∞ ¹   154.6Ki ± ∞ ¹  -51.76% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"(0|1|2)xxx"-10                                 320.1Ki ± ∞ ¹   153.8Ki ± ∞ ¹  -51.94% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"[0-2]xxx"-10                                   320.1Ki ± ∞ ¹   154.1Ki ± ∞ ¹  -51.85% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!~[0-2]xxx-10                                     3.362Gi ± ∞ ¹   3.225Gi ± ∞ ¹   -4.07% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*",_i!~[0-2]xxx-10                            3.365Gi ± ∞ ¹   3.228Gi ± ∞ ¹   -4.06% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"<unique_prefix>.+"-10                          1.807Mi ± ∞ ¹   1.759Mi ± ∞ ¹   -2.65% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"<unique_prefix>.+"-10                    3.025Mi ± ∞ ¹   2.975Mi ± ∞ ¹   -1.64% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!~"<unique_prefix>.+"-10                    401.3Mi ± ∞ ¹   176.1Mi ± ∞ ¹  -56.13% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",p="foo",i=~"<unique_prefix>.+"-10          20.18Mi ± ∞ ¹   20.15Mi ± ∞ ¹   -0.16% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".+",i=~"<unique_prefix>.+"-10          59.20Mi ± ∞ ¹   59.18Mi ± ∞ ¹   -0.05% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".*",i=~"<unique_prefix>.+"-10          14.05Mi ± ∞ ¹   14.02Mi ± ∞ ¹   -0.27% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".*",n=~".*",i=~"<unique_prefix>.+"-10          1.814Mi ± ∞ ¹   1.766Mi ± ∞ ¹   -2.67% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".+",n=~".+",i=~"<unique_prefix>.+"-10          77.58Mi ± ∞ ¹   77.52Mi ± ∞ ¹   -0.07% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/p!=""-10                                           914.8Mi ± ∞ ¹   704.0Mi ± ∞ ¹  -23.04% (p=0.016 n=5+4)
geomean                                                                                                     8.323Mi         6.150Mi        -26.10%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

                                                                                                   │ before-2243ff36e.txt │          after-0c0acc813.txt           │
                                                                                                   │      allocs/op       │  allocs/op    vs base                  │
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X"-10                                             36.00 ± ∞ ¹    36.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j="foo"-10                                     44.00 ± ∞ ¹    44.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",j!="foo"-10                                    44.00 ± ∞ ¹    44.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"XXX|YYY"-10                                      31.00 ± ∞ ¹    31.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~"X.+"-10                                          31.00 ± ∞ ¹    31.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"X|Y|Z"-10                                        46.00 ± ∞ ¹    46.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1"-10                                            1.410M ± ∞ ¹   1.411M ± ∞ ¹  +0.07% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j="foo"-10                                    1.004M ± ∞ ¹   1.004M ± ∞ ¹  +0.05% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n="1"-10                                    1.004M ± ∞ ¹   1.004M ± ∞ ¹  +0.05% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",j!="foo"-10                                   1.004M ± ∞ ¹   1.005M ± ∞ ¹  +0.05% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*"-10                                          20.87M ± ∞ ¹   20.89M ± ∞ ¹  +0.11% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".+"-10                                          23.62M ± ∞ ¹   23.64M ± ∞ ¹  +0.10% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"^.+$",j=~"X.+"-10                               100.0k ± ∞ ¹   100.0k ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~""-10                                            2.750M ± ∞ ¹   2.750M ± ∞ ¹       ~ (p=0.619 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!=""-10                                            23.62M ± ∞ ¹   23.64M ± ∞ ¹  +0.10% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",j="foo"-10                            1.004M ± ∞ ¹   1.004M ± ∞ ¹  +0.05% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",j="foo"-10                           44.00 ± ∞ ¹    44.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".*",i!="2",j="foo"-10                     1.004M ± ∞ ¹   1.004M ± ∞ ¹  +0.06% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!=""-10                                      4.160M ± ∞ ¹   4.161M ± ∞ ¹  +0.02% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j="foo"-10                              3.754M ± ∞ ¹   3.754M ± ∞ ¹  +0.01% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"X.+"-10                             100.1k ± ∞ ¹   100.1k ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!="",j=~"XXX|YYY"-10                          61.00 ± ∞ ¹    61.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"X|Y|Z",j="foo"-10                          82.00 ± ∞ ¹    82.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",j="foo"-10                            3.754M ± ∞ ¹   3.754M ± ∞ ¹  +0.01% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"1.+",j="foo"-10                           417.3k ± ∞ ¹   417.4k ± ∞ ¹  +0.02% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!="2",j="foo"-10                     3.754M ± ∞ ¹   3.754M ± ∞ ¹  +0.01% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~".+",i!~"2.*",j="foo"-10                   3.948M ± ∞ ¹   3.948M ± ∞ ¹  +0.01% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="X",i=~"^.+$",i!~"^.*2.*$",j="foo"-10              44.00 ± ∞ ¹    44.00 ± ∞ ¹       ~ (p=1.000 n=5+4) ²
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"0xxx|1xxx|2xxx"-10                               893.0 ± ∞ ¹    899.0 ± ∞ ¹  +0.67% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"(0|1|2)xxx"-10                                   892.0 ± ∞ ¹    898.0 ± ∞ ¹  +0.67% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"[0-2]xxx"-10                                     892.0 ± ∞ ¹    898.0 ± ∞ ¹  +0.67% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i!~[0-2]xxx-10                                      20.87M ± ∞ ¹   20.89M ± ∞ ¹  +0.11% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~".*",_i!~[0-2]xxx-10                             20.87M ± ∞ ¹   20.89M ± ∞ ¹  +0.12% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/i=~"<unique_prefix>.+"-10                            375.0 ± ∞ ¹    379.0 ± ∞ ¹  +1.07% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i=~"<unique_prefix>.+"-10                      261.0 ± ∞ ¹    265.0 ± ∞ ¹  +1.53% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/n="1",i!~"<unique_prefix>.+"-10                     1.410M ± ∞ ¹   1.411M ± ∞ ¹  +0.07% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",p="foo",i=~"<unique_prefix>.+"-10            305.0 ± ∞ ¹    312.0 ± ∞ ¹  +2.30% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".+",i=~"<unique_prefix>.+"-10           1.389k ± ∞ ¹   1.397k ± ∞ ¹  +0.54% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j="foo",n=~".*",i=~"<unique_prefix>.+"-10            320.0 ± ∞ ¹    326.0 ± ∞ ¹  +1.88% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".*",n=~".*",i=~"<unique_prefix>.+"-10            410.0 ± ∞ ¹    413.0 ± ∞ ¹  +0.73% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/j=~".+",n=~".+",i=~"<unique_prefix>.+"-10           1.528k ± ∞ ¹   1.532k ± ∞ ¹  +0.23% (p=0.016 n=5+4)
OpenBlockSeriesChunkRefsSetsIterator/without_index_cache/p!=""-10                                            4.649M ± ∞ ¹   4.654M ± ∞ ¹  +0.10% (p=0.016 n=5+4)
geomean                                                                                                      25.29k         25.36k        +0.27%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

@pracucci
Copy link
Collaborator

pracucci commented May 5, 2023

i had to remove series pooling because of the race condition with the index cache (which is also not detected by the race detector in tests 😬 )

I suspect the race isn't detected because the cache implementation used in tests is not async.

Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! The logic LGTM. I left few last comments, but none of them is a blocker.

pkg/storegateway/bucket_index_reader.go Outdated Show resolved Hide resolved
offsetReader.Reset(start, reader)
defer offsetReader.Reset(0, nil) // don't retain the underlying reader

bytesPool := pool.NewSlabPool[byte](seriesBytesSlicePool, seriesBytesSlabSize)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we should back it with a sync.Pool. Why not just passing an implementation of pool.Interface which returns nil from the Get() and does nothing in the Put()? It's very similar to pool.NoopBytes. We could just call it pool.NilBytes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I called it NoopPool, since it doesn't have to be only bytes; I experimented with doing this for labels too.

pkg/storegateway/bucket_index_reader.go Outdated Show resolved Hide resolved
Comment on lines 693 to 694
// We don't track refetches in a lot of detail because they are rare
return
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this. Why not tracking the other stats for refetches too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think recording time spent fetching is incorrect if we record it twice, but the rest make sense (fetched series & fetched series size)

pkg/storegateway/partitioner.go Outdated Show resolved Hide resolved
pkg/storegateway/partitioner.go Outdated Show resolved Hide resolved
pkg/storegateway/bucket_index_reader.go Outdated Show resolved Hide resolved
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
@pracucci
Copy link
Collaborator

pracucci commented May 5, 2023

LGTM, thanks!

@dimitarvdimitrov dimitarvdimitrov merged commit 14080d0 into main May 5, 2023
@dimitarvdimitrov dimitarvdimitrov deleted the dimitar/st-gw/postings-reader-instead-of-buffer branch May 5, 2023 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants