Skip to content

Conversation

bboreham
Copy link
Member

@bboreham bboreham commented Jun 6, 2025

[Update: the performance improvement got done #16797; this is now a refactor]

Binary operations generally involve matching left-hand series against right-hand series, for which we had the prepSeries function pre-computing signatures.

The genesis of this refactor is that I didn't understand what was going on in #9577, so I tried to simplify the code leading up to it.

Along the way, some other functions got extracted from rangeEval, and an annotation merge got hoisted.

VectorAnd, VectorOr and VectorUnless now return nil Annotations so they can be used directly as the evaluation function; VectorscalarBinop should also return Annotations but I'll leave that for another PR.

Further work:

  • There are now just four uses of rangeEval: two taking no expressions, one taking one, and one for function calls. Probably there are benefits to making each case less generic.
  • rangeEvalBinOp could compute series matches (via a map) once, and then use them over and over at each time step. This is not trivial as the same LHS can match different RHS as series come and go, but I think it will be a big win for large queries.
  • rangeEvalBinOp could implement the intended optimisation from Optimise VectorAnd for step invariant expression #9577 where one or other side is time-invariant.
benchmark results

(go test -timeout 50m -count=6 -run xxx -bench RangeQuery ./promql)

goos: linux
goarch: amd64
pkg: github.com/prometheus/prometheus/promql
cpu: Intel(R) Core(TM) i7-14700K
                                                                                                          │ 11c49151b.txt │           375727e5b.txt            │
                                                                                                          │    sec/op     │   sec/op     vs base               │
RangeQuery/expr=a_one,steps=1-28                                                                              5.417µ ± 1%   5.390µ ± 0%        ~ (p=0.061 n=6)
RangeQuery/expr=a_one,steps=1000-28                                                                           27.27µ ± 6%   28.71µ ± 1%   +5.28% (p=0.041 n=6)
RangeQuery/expr=a_hundred,steps=1-28                                                                          132.4µ ± 1%   144.5µ ± 1%   +9.18% (p=0.002 n=6)
RangeQuery/expr=a_hundred,steps=1000-28                                                                       2.251m ± 0%   2.455m ± 0%   +9.07% (p=0.002 n=6)
RangeQuery/expr=rate(a_one[1m]),steps=1-28                                                                    7.035µ ± 4%   7.324µ ± 1%        ~ (p=0.065 n=6)
RangeQuery/expr=rate(a_one[1m]),steps=1000-28                                                                 71.94µ ± 1%   71.34µ ± 1%   -0.83% (p=0.043 n=6)
RangeQuery/expr=rate(a_hundred[1m]),steps=1-28                                                                170.3µ ± 5%   169.8µ ± 1%        ~ (p=0.699 n=6)
RangeQuery/expr=rate(a_hundred[1m]),steps=1000-28                                                             7.075m ± 0%   7.006m ± 1%   -0.98% (p=0.002 n=6)
RangeQuery/expr=rate(a_one[1m]),steps=10000-28                                                                717.4µ ± 1%   719.9µ ± 1%   +0.35% (p=0.041 n=6)
RangeQuery/expr=rate(a_hundred[1m]),steps=10000-28                                                            76.16m ± 0%   76.47m ± 1%   +0.42% (p=0.009 n=6)
RangeQuery/expr=rate(sparse[1m]),steps=10000-28                                                               3.847m ± 0%   3.928m ± 1%   +2.09% (p=0.002 n=6)
RangeQuery/expr=double_exponential_smoothing(a_one[1d],_0.3,_0.3),steps=1-28                                  363.5µ ± 1%   361.8µ ± 1%        ~ (p=0.240 n=6)
RangeQuery/expr=double_exponential_smoothing(a_one[1d],_0.3,_0.3),steps=1000-28                               32.86m ± 0%   32.83m ± 0%        ~ (p=0.310 n=6)
RangeQuery/expr=double_exponential_smoothing(a_hundred[1d],_0.3,_0.3),steps=1-28                              26.17m ± 0%   25.76m ± 1%   -1.57% (p=0.002 n=6)
RangeQuery/expr=double_exponential_smoothing(a_hundred[1d],_0.3,_0.3),steps=1000-28                            3.267 ± 0%    3.265 ± 1%        ~ (p=0.699 n=6)
RangeQuery/expr=changes(a_one[1d]),steps=1-28                                                                 326.1µ ± 0%   324.2µ ± 1%        ~ (p=0.132 n=6)
RangeQuery/expr=changes(a_one[1d]),steps=1000-28                                                              36.12m ± 0%   36.16m ± 0%        ~ (p=0.937 n=6)
RangeQuery/expr=changes(a_hundred[1d]),steps=1-28                                                             26.71m ± 0%   26.53m ± 0%   -0.67% (p=0.009 n=6)
RangeQuery/expr=changes(a_hundred[1d]),steps=1000-28                                                           3.588 ± 0%    4.056 ± 0%  +13.03% (p=0.002 n=6)
RangeQuery/expr=rate(a_one[1d]),steps=1-28                                                                    264.4µ ± 1%   262.5µ ± 0%   -0.71% (p=0.002 n=6)
RangeQuery/expr=rate(a_one[1d]),steps=1000-28                                                                 6.298m ± 1%   6.257m ± 2%        ~ (p=0.180 n=6)
RangeQuery/expr=rate(a_hundred[1d]),steps=1-28                                                                20.93m ± 1%   20.69m ± 1%   -1.16% (p=0.002 n=6)
RangeQuery/expr=rate(a_hundred[1d]),steps=1000-28                                                             615.8m ± 1%   616.8m ± 1%        ~ (p=0.485 n=6)
RangeQuery/expr=absent_over_time(a_one[1d]),steps=1-28                                                        258.7µ ± 0%   256.5µ ± 0%   -0.86% (p=0.002 n=6)
RangeQuery/expr=absent_over_time(a_one[1d]),steps=1000-28                                                     3.583m ± 0%   3.571m ± 0%   -0.33% (p=0.002 n=6)
RangeQuery/expr=absent_over_time(a_hundred[1d]),steps=1-28                                                    20.27m ± 1%   19.88m ± 0%   -1.95% (p=0.002 n=6)
RangeQuery/expr=absent_over_time(a_hundred[1d]),steps=1000-28                                                 350.2m ± 0%   350.7m ± 1%        ~ (p=0.485 n=6)
RangeQuery/expr=-a_one,steps=1-28                                                                             6.087µ ± 1%   6.116µ ± 1%        ~ (p=0.818 n=6)
RangeQuery/expr=-a_one,steps=1000-28                                                                          29.77µ ± 0%   29.90µ ± 0%   +0.43% (p=0.041 n=6)
RangeQuery/expr=-a_hundred,steps=1-28                                                                         145.1µ ± 1%   145.4µ ± 0%        ~ (p=0.818 n=6)
RangeQuery/expr=-a_hundred,steps=1000-28                                                                      2.497m ± 0%   2.509m ± 1%        ~ (p=0.065 n=6)
RangeQuery/expr=a_one_-_b_one,steps=1-28                                                                      10.62µ ± 1%   10.56µ ± 1%        ~ (p=0.065 n=6)
RangeQuery/expr=a_one_-_b_one,steps=1000-28                                                                   194.0µ ± 0%   187.0µ ± 1%   -3.62% (p=0.002 n=6)
RangeQuery/expr=a_hundred_-_b_hundred,steps=1-28                                                              350.5µ ± 1%   351.7µ ± 1%        ~ (p=0.485 n=6)
RangeQuery/expr=a_hundred_-_b_hundred,steps=1000-28                                                           16.33m ± 1%   16.47m ± 1%   +0.84% (p=0.041 n=6)
RangeQuery/expr=a_one_-_b_one,steps=10000-28                                                                  1.955m ± 0%   1.883m ± 0%   -3.67% (p=0.002 n=6)
RangeQuery/expr=a_hundred_-_b_hundred,steps=10000-28                                                          174.2m ± 1%   176.7m ± 1%   +1.43% (p=0.002 n=6)
RangeQuery/expr=a_one_and_b_one{l=~'.*[0-4]$'},steps=1-28                                                     15.66µ ± 1%   15.92µ ± 1%   +1.70% (p=0.002 n=6)
RangeQuery/expr=a_one_and_b_one{l=~'.*[0-4]$'},steps=1000-28                                                  67.52µ ± 0%   69.55µ ± 0%   +3.01% (p=0.002 n=6)
RangeQuery/expr=a_hundred_and_b_hundred{l=~'.*[0-4]$'},steps=1-28                                             253.1µ ± 1%   254.1µ ± 1%        ~ (p=0.132 n=6)
RangeQuery/expr=a_hundred_and_b_hundred{l=~'.*[0-4]$'},steps=1000-28                                          8.679m ± 1%   8.726m ± 1%        ~ (p=0.093 n=6)
RangeQuery/expr=a_one_or_b_one{l=~'.*[0-4]$'},steps=1-28                                                      15.92µ ± 0%   16.04µ ± 1%   +0.78% (p=0.006 n=6)
RangeQuery/expr=a_one_or_b_one{l=~'.*[0-4]$'},steps=1000-28                                                   84.42µ ± 1%   86.11µ ± 1%   +2.01% (p=0.002 n=6)
RangeQuery/expr=a_hundred_or_b_hundred{l=~'.*[0-4]$'},steps=1-28                                              266.2µ ± 1%   266.9µ ± 1%        ~ (p=0.310 n=6)
RangeQuery/expr=a_hundred_or_b_hundred{l=~'.*[0-4]$'},steps=1000-28                                           10.86m ± 1%   10.91m ± 1%        ~ (p=0.394 n=6)
RangeQuery/expr=a_one_unless_b_one{l=~'.*[0-4]$'},steps=1-28                                                  15.85µ ± 1%   16.07µ ± 1%   +1.42% (p=0.004 n=6)
RangeQuery/expr=a_one_unless_b_one{l=~'.*[0-4]$'},steps=1000-28                                               83.97µ ± 1%   84.07µ ± 1%        ~ (p=0.589 n=6)
RangeQuery/expr=a_hundred_unless_b_hundred{l=~'.*[0-4]$'},steps=1-28                                          254.7µ ± 1%   252.9µ ± 1%   -0.68% (p=0.041 n=6)
RangeQuery/expr=a_hundred_unless_b_hundred{l=~'.*[0-4]$'},steps=1000-28                                       8.765m ± 1%   8.736m ± 1%        ~ (p=0.240 n=6)
RangeQuery/expr=a_one_and_b_one{l='notfound'},steps=1-28                                                      8.632µ ± 0%   8.686µ ± 1%   +0.62% (p=0.009 n=6)
RangeQuery/expr=a_one_and_b_one{l='notfound'},steps=1000-28                                                   59.97µ ± 1%   61.69µ ± 1%   +2.86% (p=0.002 n=6)
RangeQuery/expr=a_hundred_and_b_hundred{l='notfound'},steps=1-28                                              149.2µ ± 1%   149.9µ ± 0%        ~ (p=0.240 n=6)
RangeQuery/expr=a_hundred_and_b_hundred{l='notfound'},steps=1000-28                                           3.187m ± 1%   3.235m ± 1%   +1.50% (p=0.002 n=6)
RangeQuery/expr=abs(a_one),steps=1-28                                                                         6.818µ ± 1%   6.819µ ± 0%        ~ (p=0.818 n=6)
RangeQuery/expr=abs(a_one),steps=1000-28                                                                      77.02µ ± 1%   76.57µ ± 1%   -0.58% (p=0.026 n=6)
RangeQuery/expr=abs(a_hundred),steps=1-28                                                                     165.9µ ± 0%   165.7µ ± 1%        ~ (p=0.818 n=6)
RangeQuery/expr=abs(a_hundred),steps=1000-28                                                                  5.853m ± 1%   5.903m ± 2%        ~ (p=0.093 n=6)
RangeQuery/expr=label_replace(a_one,_'l2',_'$1',_'l',_'(.*)'),steps=1-28                                      10.22µ ± 0%   10.25µ ± 1%        ~ (p=0.310 n=6)
RangeQuery/expr=label_replace(a_one,_'l2',_'$1',_'l',_'(.*)'),steps=1000-28                                   33.54µ ± 0%   33.68µ ± 0%        ~ (p=0.065 n=6)
RangeQuery/expr=label_replace(a_hundred,_'l2',_'$1',_'l',_'(.*)'),steps=1-28                                  170.5µ ± 1%   169.8µ ± 0%        ~ (p=0.240 n=6)
RangeQuery/expr=label_replace(a_hundred,_'l2',_'$1',_'l',_'(.*)'),steps=1000-28                               2.469m ± 1%   2.473m ± 1%        ~ (p=1.000 n=6)
RangeQuery/expr=label_join(a_one,_'l2',_'-',_'l',_'l'),steps=1-28                                             8.591µ ± 1%   8.557µ ± 0%   -0.40% (p=0.026 n=6)
RangeQuery/expr=label_join(a_one,_'l2',_'-',_'l',_'l'),steps=1000-28                                          32.07µ ± 1%   31.96µ ± 0%        ~ (p=0.093 n=6)
RangeQuery/expr=label_join(a_hundred,_'l2',_'-',_'l',_'l'),steps=1-28                                         159.7µ ± 1%   160.3µ ± 2%   +0.35% (p=0.026 n=6)
RangeQuery/expr=label_join(a_hundred,_'l2',_'-',_'l',_'l'),steps=1000-28                                      2.456m ± 1%   2.465m ± 1%        ~ (p=0.132 n=6)
RangeQuery/expr=sum(a_one),steps=1-28                                                                         6.709µ ± 0%   6.659µ ± 0%   -0.75% (p=0.002 n=6)
RangeQuery/expr=sum(a_one),steps=1000-28                                                                      60.23µ ± 1%   59.15µ ± 1%   -1.79% (p=0.002 n=6)
RangeQuery/expr=sum(a_hundred),steps=1-28                                                                     141.1µ ± 1%   140.7µ ± 0%        ~ (p=0.394 n=6)
RangeQuery/expr=sum(a_hundred),steps=1000-28                                                                  2.857m ± 1%   2.843m ± 0%        ~ (p=0.065 n=6)
RangeQuery/expr=avg(a_one),steps=1-28                                                                         6.636µ ± 1%   6.615µ ± 0%        ~ (p=0.197 n=6)
RangeQuery/expr=avg(a_one),steps=1000-28                                                                      60.60µ ± 0%   59.48µ ± 0%   -1.85% (p=0.002 n=6)
RangeQuery/expr=avg(a_hundred),steps=1-28                                                                     140.0µ ± 1%   140.7µ ± 1%   +0.53% (p=0.041 n=6)
RangeQuery/expr=avg(a_hundred),steps=1000-28                                                                  2.883m ± 0%   2.888m ± 0%        ~ (p=0.132 n=6)
RangeQuery/expr=sum_without_(l)(h_one),steps=1-28                                                             23.58µ ± 1%   23.62µ ± 1%        ~ (p=0.589 n=6)
RangeQuery/expr=sum_without_(l)(h_one),steps=1000-28                                                          429.8µ ± 1%   412.0µ ± 1%   -4.15% (p=0.002 n=6)
RangeQuery/expr=sum_without_(l)(h_hundred),steps=1-28                                                         1.633m ± 0%   1.622m ± 1%   -0.70% (p=0.002 n=6)
RangeQuery/expr=sum_without_(l)(h_hundred),steps=1000-28                                                      37.80m ± 2%   37.06m ± 2%   -1.95% (p=0.004 n=6)
RangeQuery/expr=sum_without_(le)(h_one),steps=1-28                                                            21.10µ ± 1%   21.34µ ± 0%   +1.16% (p=0.002 n=6)
RangeQuery/expr=sum_without_(le)(h_one),steps=1000-28                                                         333.1µ ± 0%   334.5µ ± 1%   +0.43% (p=0.041 n=6)
RangeQuery/expr=sum_without_(le)(h_hundred),steps=1-28                                                        1.644m ± 0%   1.643m ± 0%        ~ (p=0.818 n=6)
RangeQuery/expr=sum_without_(le)(h_hundred),steps=1000-28                                                     38.87m ± 3%   39.26m ± 2%        ~ (p=0.310 n=6)
RangeQuery/expr=sum_by_(l)(h_one),steps=1-28                                                                  21.01µ ± 0%   21.26µ ± 1%   +1.18% (p=0.002 n=6)
RangeQuery/expr=sum_by_(l)(h_one),steps=1000-28                                                               333.2µ ± 0%   334.2µ ± 0%   +0.29% (p=0.041 n=6)
RangeQuery/expr=sum_by_(l)(h_hundred),steps=1-28                                                              1.652m ± 1%   1.631m ± 1%   -1.28% (p=0.004 n=6)
RangeQuery/expr=sum_by_(l)(h_hundred),steps=1000-28                                                           40.05m ± 2%   39.09m ± 1%   -2.39% (p=0.009 n=6)
RangeQuery/expr=sum_by_(le)(h_one),steps=1-28                                                                 23.42µ ± 1%   23.67µ ± 0%   +1.07% (p=0.002 n=6)
RangeQuery/expr=sum_by_(le)(h_one),steps=1000-28                                                              426.5µ ± 0%   411.1µ ± 1%   -3.60% (p=0.002 n=6)
RangeQuery/expr=sum_by_(le)(h_hundred),steps=1-28                                                             1.620m ± 1%   1.597m ± 1%   -1.42% (p=0.002 n=6)
RangeQuery/expr=sum_by_(le)(h_hundred),steps=1000-28                                                          37.21m ± 2%   35.86m ± 1%   -3.61% (p=0.002 n=6)
RangeQuery/expr=count_values('value',_h_one),steps=100-28                                                     805.6µ ± 1%   801.5µ ± 0%        ~ (p=0.065 n=6)
RangeQuery/expr=count_values('value',_h_hundred),steps=100-28                                                 116.7m ± 3%   117.2m ± 3%        ~ (p=0.310 n=6)
RangeQuery/expr=topk(1,_a_one),steps=1-28                                                                     7.820µ ± 1%   7.831µ ± 0%        ~ (p=0.563 n=6)
RangeQuery/expr=topk(1,_a_one),steps=1000-28                                                                  154.5µ ± 1%   154.0µ ± 1%        ~ (p=0.699 n=6)
RangeQuery/expr=topk(1,_a_hundred),steps=1-28                                                                 143.4µ ± 0%   145.2µ ± 1%   +1.26% (p=0.002 n=6)
RangeQuery/expr=topk(1,_a_hundred),steps=1000-28                                                              3.269m ± 0%   3.326m ± 1%   +1.75% (p=0.002 n=6)
RangeQuery/expr=topk(5,_a_one),steps=1-28                                                                     7.844µ ± 1%   7.884µ ± 0%        ~ (p=0.071 n=6)
RangeQuery/expr=topk(5,_a_one),steps=1000-28                                                                  155.4µ ± 4%   154.6µ ± 1%        ~ (p=0.485 n=6)
RangeQuery/expr=topk(5,_a_hundred),steps=1-28                                                                 147.2µ ± 0%   148.4µ ± 1%   +0.80% (p=0.009 n=6)
RangeQuery/expr=topk(5,_a_hundred),steps=1000-28                                                              4.342m ± 1%   4.370m ± 1%   +0.66% (p=0.009 n=6)
RangeQuery/expr=limitk(1,_a_one),steps=1-28                                                                   7.892µ ± 1%   7.884µ ± 1%        ~ (p=0.818 n=6)
RangeQuery/expr=limitk(1,_a_one),steps=1000-28                                                                150.3µ ± 1%   150.7µ ± 1%        ~ (p=0.394 n=6)
RangeQuery/expr=limitk(1,_a_hundred),steps=1-28                                                               141.9µ ± 0%   142.8µ ± 1%   +0.63% (p=0.002 n=6)
RangeQuery/expr=limitk(1,_a_hundred),steps=1000-28                                                            2.675m ± 1%   2.696m ± 0%   +0.78% (p=0.026 n=6)
RangeQuery/expr=limitk(5,_a_one),steps=1-28                                                                   7.796µ ± 1%   7.864µ ± 1%   +0.88% (p=0.009 n=6)
RangeQuery/expr=limitk(5,_a_one),steps=1000-28                                                                152.6µ ± 1%   150.3µ ± 1%   -1.48% (p=0.004 n=6)
RangeQuery/expr=limitk(5,_a_hundred),steps=1-28                                                               143.0µ ± 1%   143.6µ ± 1%        ~ (p=0.180 n=6)
RangeQuery/expr=limitk(5,_a_hundred),steps=1000-28                                                            2.834m ± 1%   2.846m ± 0%        ~ (p=0.132 n=6)
RangeQuery/expr=limit_ratio(0.1,_a_one),steps=1-28                                                            7.848µ ± 1%   7.776µ ± 0%   -0.91% (p=0.002 n=6)
RangeQuery/expr=limit_ratio(0.1,_a_one),steps=1000-28                                                         129.4µ ± 1%   128.9µ ± 1%        ~ (p=0.240 n=6)
RangeQuery/expr=limit_ratio(0.1,_a_hundred),steps=1-28                                                        148.9µ ± 1%   148.8µ ± 1%        ~ (p=0.818 n=6)
RangeQuery/expr=limit_ratio(0.1,_a_hundred),steps=1000-28                                                     4.816m ± 1%   4.848m ± 1%   +0.66% (p=0.015 n=6)
RangeQuery/expr=limit_ratio(0.5,_a_one),steps=1-28                                                            7.839µ ± 0%   7.755µ ± 1%   -1.08% (p=0.002 n=6)
RangeQuery/expr=limit_ratio(0.5,_a_one),steps=1000-28                                                         128.3µ ± 2%   129.0µ ± 1%        ~ (p=0.240 n=6)
RangeQuery/expr=limit_ratio(0.5,_a_hundred),steps=1-28                                                        159.6µ ± 1%   159.6µ ± 1%        ~ (p=0.937 n=6)
RangeQuery/expr=limit_ratio(0.5,_a_hundred),steps=1000-28                                                     6.640m ± 1%   6.655m ± 1%        ~ (p=0.699 n=6)
RangeQuery/expr=limit_ratio(-0.5,_a_one),steps=1-28                                                           8.093µ ± 0%   8.056µ ± 1%   -0.45% (p=0.026 n=6)
RangeQuery/expr=limit_ratio(-0.5,_a_one),steps=1000-28                                                        167.7µ ± 1%   168.8µ ± 1%        ~ (p=0.065 n=6)
RangeQuery/expr=limit_ratio(-0.5,_a_hundred),steps=1-28                                                       160.5µ ± 0%   161.3µ ± 0%   +0.50% (p=0.015 n=6)
RangeQuery/expr=limit_ratio(-0.5,_a_hundred),steps=1000-28                                                    6.826m ± 1%   6.876m ± 1%   +0.74% (p=0.009 n=6)
RangeQuery/expr=rate(a_one[1m])_+_rate(b_one[1m]),steps=1-28                                                  14.37µ ± 1%   14.25µ ± 0%   -0.84% (p=0.002 n=6)
RangeQuery/expr=rate(a_one[1m])_+_rate(b_one[1m]),steps=1000-28                                               276.7µ ± 1%   270.3µ ± 0%   -2.32% (p=0.002 n=6)
RangeQuery/expr=rate(a_hundred[1m])_+_rate(b_hundred[1m]),steps=1-28                                          409.2µ ± 1%   408.2µ ± 1%        ~ (p=0.937 n=6)
RangeQuery/expr=rate(a_hundred[1m])_+_rate(b_hundred[1m]),steps=1000-28                                       25.42m ± 1%   25.18m ± 1%   -0.95% (p=0.015 n=6)
RangeQuery/expr=sum_without_(l)(rate(a_one[1m])),steps=1-28                                                   9.248µ ± 0%   9.316µ ± 1%   +0.74% (p=0.004 n=6)
RangeQuery/expr=sum_without_(l)(rate(a_one[1m])),steps=1000-28                                                103.9µ ± 0%   102.7µ ± 1%   -1.15% (p=0.002 n=6)
RangeQuery/expr=sum_without_(l)(rate(a_hundred[1m])),steps=1-28                                               170.8µ ± 1%   171.4µ ± 1%        ~ (p=0.485 n=6)
RangeQuery/expr=sum_without_(l)(rate(a_hundred[1m])),steps=1000-28                                            7.417m ± 1%   7.326m ± 0%   -1.22% (p=0.002 n=6)
RangeQuery/expr=sum_without_(l)(rate(a_one[1m]))_/_sum_without_(l)(rate(b_one[1m])),steps=1-28                18.08µ ± 1%   17.95µ ± 0%   -0.68% (p=0.009 n=6)
RangeQuery/expr=sum_without_(l)(rate(a_one[1m]))_/_sum_without_(l)(rate(b_one[1m])),steps=1000-28             339.3µ ± 1%   332.1µ ± 1%   -2.11% (p=0.002 n=6)
RangeQuery/expr=sum_without_(l)(rate(a_hundred[1m]))_/_sum_without_(l)(rate(b_hundred[1m])),steps=1-28        353.1µ ± 1%   353.2µ ± 1%        ~ (p=0.818 n=6)
RangeQuery/expr=sum_without_(l)(rate(a_hundred[1m]))_/_sum_without_(l)(rate(b_hundred[1m])),steps=1000-28     15.18m ± 0%   14.97m ± 1%   -1.37% (p=0.002 n=6)
RangeQuery/expr=histogram_quantile(0.9,_rate(h_one[5m])),steps=1-28                                           33.57µ ± 1%   33.54µ ± 0%        ~ (p=0.937 n=6)
RangeQuery/expr=histogram_quantile(0.9,_rate(h_one[5m])),steps=1000-28                                        1.467m ± 1%   1.467m ± 0%        ~ (p=0.699 n=6)
RangeQuery/expr=histogram_quantile(0.9,_rate(h_hundred[5m])),steps=1-28                                       2.581m ± 1%   2.544m ± 1%   -1.44% (p=0.002 n=6)
RangeQuery/expr=histogram_quantile(0.9,_rate(h_hundred[5m])),steps=1000-28                                    150.5m ± 1%   150.4m ± 1%        ~ (p=1.000 n=6)
RangeQuery/expr=a_one_+_on(l)_group_right_a_one,steps=1-28                                                    11.60µ ± 1%   11.69µ ± 1%   +0.75% (p=0.015 n=6)
RangeQuery/expr=a_one_+_on(l)_group_right_a_one,steps=1000-28                                                 260.9µ ± 0%   252.9µ ± 0%   -3.09% (p=0.002 n=6)
RangeQuery/expr=a_hundred_+_on(l)_group_right_a_one,steps=1-28                                                158.9µ ± 0%   159.0µ ± 1%        ~ (p=0.818 n=6)
RangeQuery/expr=a_hundred_+_on(l)_group_right_a_one,steps=1000-28                                             4.661m ± 1%   4.700m ± 0%        ~ (p=0.093 n=6)
RangeQuery/expr=count({__name__!=""}),steps=1-28                                                              2.109m ± 0%   2.083m ± 1%   -1.21% (p=0.002 n=6)
RangeQuery/expr=count({__name__!="",l=""}),steps=1-28                                                         77.09µ ± 0%   76.47µ ± 1%   -0.81% (p=0.004 n=6)
RangeQuery/expr=timestamp(a_one),steps=1-28                                                                   6.570µ ± 0%   6.550µ ± 0%        ~ (p=0.132 n=6)
RangeQuery/expr=timestamp(a_one),steps=1000-28                                                                99.42µ ± 1%   97.54µ ± 1%   -1.89% (p=0.002 n=6)
RangeQuery/expr=timestamp(a_hundred),steps=1-28                                                               170.0µ ± 1%   170.1µ ± 0%        ~ (p=0.093 n=6)
RangeQuery/expr=timestamp(a_hundred),steps=1000-28                                                            6.059m ± 1%   6.085m ± 1%        ~ (p=0.589 n=6)
geomean                                                                                                       447.2µ        447.6µ        +0.09%

                                                                                                          │ 11c49151b.txt  │             375727e5b.txt              │
                                                                                                          │      B/op      │      B/op       vs base                │
RangeQuery/expr=a_one,steps=1-28                                                                            5.907Ki ±   0%   5.907Ki ±   0%       ~ (p=0.238 n=6)
RangeQuery/expr=a_one,steps=1000-28                                                                         9.894Ki ±   0%   9.893Ki ±   0%       ~ (p=0.714 n=6)
RangeQuery/expr=a_hundred,steps=1-28                                                                        44.59Ki ±   0%   44.59Ki ±   0%       ~ (p=0.669 n=6)
RangeQuery/expr=a_hundred,steps=1000-28                                                                     312.4Ki ±   0%   312.4Ki ±   0%       ~ (p=1.000 n=6)
RangeQuery/expr=rate(a_one[1m]),steps=1-28                                                                  7.965Ki ±   0%   7.964Ki ±   0%       ~ (p=0.182 n=6)
RangeQuery/expr=rate(a_one[1m]),steps=1000-28                                                               11.67Ki ±   0%   11.67Ki ±   0%  -0.03% (p=0.011 n=6)
RangeQuery/expr=rate(a_hundred[1m]),steps=1-28                                                              69.08Ki ±   0%   69.08Ki ±   0%       ~ (p=1.000 n=6)
RangeQuery/expr=rate(a_hundred[1m]),steps=1000-28                                                           309.7Ki ±   0%   309.9Ki ±   0%       ~ (p=0.093 n=6)
RangeQuery/expr=rate(a_one[1m]),steps=10000-28                                                              53.08Ki ±   1%   53.09Ki ±   1%       ~ (p=0.732 n=6)
RangeQuery/expr=rate(a_hundred[1m]),steps=10000-28                                                          2.581Mi ±   1%   2.566Mi ±   2%       ~ (p=0.937 n=6)
RangeQuery/expr=rate(sparse[1m]),steps=10000-28                                                             40.94Ki ±   5%   40.95Ki ±   1%       ~ (p=0.937 n=6)
RangeQuery/expr=double_exponential_smoothing(a_one[1d],_0.3,_0.3),steps=1-28                                1.018Mi ±   0%   1.018Mi ±   0%       ~ (p=0.394 n=6)
RangeQuery/expr=double_exponential_smoothing(a_one[1d],_0.3,_0.3),steps=1000-28                             1.134Mi ±   0%   1.135Mi ±   0%  +0.02% (p=0.011 n=6)
RangeQuery/expr=double_exponential_smoothing(a_hundred[1d],_0.3,_0.3),steps=1-28                            3.137Mi ±   0%   3.138Mi ±   0%  +0.02% (p=0.026 n=6)
RangeQuery/expr=double_exponential_smoothing(a_hundred[1d],_0.3,_0.3),steps=1000-28                         12.52Mi ±  39%   12.54Mi ±  36%       ~ (p=0.937 n=6)
RangeQuery/expr=changes(a_one[1d]),steps=1-28                                                               560.4Ki ±   0%   559.1Ki ±   0%       ~ (p=0.180 n=6)
RangeQuery/expr=changes(a_one[1d]),steps=1000-28                                                            570.0Ki ±   3%   563.8Ki ±   2%       ~ (p=0.697 n=6)
RangeQuery/expr=changes(a_hundred[1d]),steps=1-28                                                           2.652Mi ±   0%   2.647Mi ±   1%       ~ (p=0.394 n=6)
RangeQuery/expr=changes(a_hundred[1d]),steps=1000-28                                                        3.339Mi ± 130%   3.331Mi ± 145%       ~ (p=0.981 n=6)
RangeQuery/expr=rate(a_one[1d]),steps=1-28                                                                  563.3Ki ±   0%   561.3Ki ±   0%       ~ (p=0.394 n=6)
RangeQuery/expr=rate(a_one[1d]),steps=1000-28                                                               564.4Ki ±   1%   565.5Ki ±   1%       ~ (p=0.818 n=6)
RangeQuery/expr=rate(a_hundred[1d]),steps=1-28                                                              2.664Mi ±   0%   2.670Mi ±   1%       ~ (p=0.394 n=6)
RangeQuery/expr=rate(a_hundred[1d]),steps=1000-28                                                           3.127Mi ±   7%   3.015Mi ±   4%       ~ (p=0.290 n=6)
RangeQuery/expr=absent_over_time(a_one[1d]),steps=1-28                                                      566.1Ki ±   0%   566.3Ki ±   0%       ~ (p=0.937 n=6)
RangeQuery/expr=absent_over_time(a_one[1d]),steps=1000-28                                                   579.6Ki ±   0%   575.9Ki ±   1%       ~ (p=0.065 n=6)
RangeQuery/expr=absent_over_time(a_hundred[1d]),steps=1-28                                                  2.647Mi ±   0%   2.643Mi ±   0%       ~ (p=0.394 n=6)
RangeQuery/expr=absent_over_time(a_hundred[1d]),steps=1000-28                                               4.515Mi ±   2%   4.516Mi ±   2%       ~ (p=0.699 n=6)
RangeQuery/expr=-a_one,steps=1-28                                                                           6.345Ki ±   0%   6.344Ki ±   0%       ~ (p=1.000 n=6)
RangeQuery/expr=-a_one,steps=1000-28                                                                        10.33Ki ±   0%   10.33Ki ±   0%       ~ (p=0.989 n=6)
RangeQuery/expr=-a_hundred,steps=1-28                                                                       47.30Ki ±   0%   47.31Ki ±   0%  +0.02% (p=0.017 n=6)
RangeQuery/expr=-a_hundred,steps=1000-28                                                                    315.1Ki ±   0%   315.1Ki ±   0%       ~ (p=0.240 n=6)
RangeQuery/expr=a_one_-_b_one,steps=1-28                                                                    12.06Ki ±   0%   12.06Ki ±   0%       ~ (p=0.242 n=6)
RangeQuery/expr=a_one_-_b_one,steps=1000-28                                                                 20.03Ki ±   0%   20.03Ki ±   0%       ~ (p=0.665 n=6)
RangeQuery/expr=a_hundred_-_b_hundred,steps=1-28                                                            184.3Ki ±   0%   184.3Ki ±   0%       ~ (p=0.970 n=6)
RangeQuery/expr=a_hundred_-_b_hundred,steps=1000-28                                                         721.8Ki ±   0%   721.4Ki ±   0%       ~ (p=0.485 n=6)
RangeQuery/expr=a_one_-_b_one,steps=10000-28                                                                102.0Ki ±   1%   102.3Ki ±   1%       ~ (p=0.180 n=6)
RangeQuery/expr=a_hundred_-_b_hundred,steps=10000-28                                                        5.234Mi ±   2%   5.231Mi ±   1%       ~ (p=0.699 n=6)
RangeQuery/expr=a_one_and_b_one{l=~'.*[0-4]$'},steps=1-28                                                   21.08Ki ±   0%   21.08Ki ±   0%       ~ (p=0.232 n=6)
RangeQuery/expr=a_one_and_b_one{l=~'.*[0-4]$'},steps=1000-28                                                25.08Ki ±   0%   25.08Ki ±   0%       ~ (p=0.554 n=6)
RangeQuery/expr=a_hundred_and_b_hundred{l=~'.*[0-4]$'},steps=1-28                                           132.0Ki ±   0%   132.0Ki ±   0%       ~ (p=0.515 n=6)
RangeQuery/expr=a_hundred_and_b_hundred{l=~'.*[0-4]$'},steps=1000-28                                        3.588Mi ±   0%   3.588Mi ±   0%       ~ (p=0.310 n=6)
RangeQuery/expr=a_one_or_b_one{l=~'.*[0-4]$'},steps=1-28                                                    21.16Ki ±   0%   21.16Ki ±   0%       ~ (p=0.394 n=6)
RangeQuery/expr=a_one_or_b_one{l=~'.*[0-4]$'},steps=1000-28                                                 25.16Ki ±   0%   25.16Ki ±   0%       ~ (p=0.390 n=6)
RangeQuery/expr=a_hundred_or_b_hundred{l=~'.*[0-4]$'},steps=1-28                                            142.8Ki ±   0%   142.9Ki ±   0%       ~ (p=0.859 n=6)
RangeQuery/expr=a_hundred_or_b_hundred{l=~'.*[0-4]$'},steps=1000-28                                         6.928Mi ±   0%   6.928Mi ±   0%       ~ (p=0.699 n=6)
RangeQuery/expr=a_one_unless_b_one{l=~'.*[0-4]$'},steps=1-28                                                21.18Ki ±   0%   21.18Ki ±   0%       ~ (p=0.167 n=6)
RangeQuery/expr=a_one_unless_b_one{l=~'.*[0-4]$'},steps=1000-28                                             25.18Ki ±   0%   25.19Ki ±   0%  +0.03% (p=0.024 n=6)
RangeQuery/expr=a_hundred_unless_b_hundred{l=~'.*[0-4]$'},steps=1-28                                        132.0Ki ±   0%   132.0Ki ±   0%       ~ (p=0.288 n=6)
RangeQuery/expr=a_hundred_unless_b_hundred{l=~'.*[0-4]$'},steps=1000-28                                     3.588Mi ±   0%   3.588Mi ±   0%       ~ (p=0.485 n=6)
RangeQuery/expr=a_one_and_b_one{l='notfound'},steps=1-28                                                    9.778Ki ±   0%   9.778Ki ±   0%       ~ (p=1.000 n=6)
RangeQuery/expr=a_one_and_b_one{l='notfound'},steps=1000-28                                                 13.76Ki ±   0%   13.76Ki ±   0%       ~ (p=0.920 n=6)
RangeQuery/expr=a_hundred_and_b_hundred{l='notfound'},steps=1-28                                            81.84Ki ±   0%   81.85Ki ±   0%       ~ (p=0.461 n=6)
RangeQuery/expr=a_hundred_and_b_hundred{l='notfound'},steps=1000-28                                         349.7Ki ±   0%   349.7Ki ±   0%       ~ (p=0.394 n=6)
RangeQuery/expr=abs(a_one),steps=1-28                                                                       6.963Ki ±   0%   6.963Ki ±   0%       ~ (p=0.455 n=6)
RangeQuery/expr=abs(a_one),steps=1000-28                                                                    10.95Ki ±   0%   10.95Ki ±   0%       ~ (p=0.152 n=6)
RangeQuery/expr=abs(a_hundred),steps=1-28                                                                   83.06Ki ±   0%   83.07Ki ±   0%       ~ (p=0.485 n=6)
RangeQuery/expr=abs(a_hundred),steps=1000-28                                                                351.2Ki ±   0%   351.1Ki ±   0%       ~ (p=0.818 n=6)
RangeQuery/expr=label_replace(a_one,_'l2',_'$1',_'l',_'(.*)'),steps=1-28                                    10.55Ki ±   0%   10.55Ki ±   0%       ~ (p=0.177 n=6)
RangeQuery/expr=label_replace(a_one,_'l2',_'$1',_'l',_'(.*)'),steps=1000-28                                 14.54Ki ±   0%   14.55Ki ±   0%       ~ (p=0.113 n=6)
RangeQuery/expr=label_replace(a_hundred,_'l2',_'$1',_'l',_'(.*)'),steps=1-28                                59.28Ki ±   0%   59.29Ki ±   0%       ~ (p=0.452 n=6)
RangeQuery/expr=label_replace(a_hundred,_'l2',_'$1',_'l',_'(.*)'),steps=1000-28                             327.1Ki ±   0%   327.2Ki ±   0%       ~ (p=0.240 n=6)
RangeQuery/expr=label_join(a_one,_'l2',_'-',_'l',_'l'),steps=1-28                                           7.775Ki ±   0%   7.775Ki ±   0%       ~ (p=1.000 n=6)
RangeQuery/expr=label_join(a_one,_'l2',_'-',_'l',_'l'),steps=1000-28                                        11.76Ki ±   0%   11.76Ki ±   0%       ~ (p=1.000 n=6)
RangeQuery/expr=label_join(a_hundred,_'l2',_'-',_'l',_'l'),steps=1-28                                       54.06Ki ±   0%   54.06Ki ±   0%       ~ (p=0.991 n=6)
RangeQuery/expr=label_join(a_hundred,_'l2',_'-',_'l',_'l'),steps=1000-28                                    321.9Ki ±   0%   321.9Ki ±   0%       ~ (p=0.589 n=6)
RangeQuery/expr=sum(a_one),steps=1-28                                                                       7.111Ki ±   0%   7.111Ki ±   0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum(a_one),steps=1000-28                                                                    11.10Ki ±   0%   11.10Ki ±   0%       ~ (p=0.740 n=6)
RangeQuery/expr=sum(a_hundred),steps=1-28                                                                   54.60Ki ±   0%   54.60Ki ±   0%       ~ (p=0.333 n=6)
RangeQuery/expr=sum(a_hundred),steps=1000-28                                                                322.3Ki ±   0%   322.4Ki ±   0%       ~ (p=0.132 n=6)
RangeQuery/expr=avg(a_one),steps=1-28                                                                       7.112Ki ±   0%   7.111Ki ±   0%  -0.01% (p=0.015 n=6)
RangeQuery/expr=avg(a_one),steps=1000-28                                                                    11.10Ki ±   0%   11.10Ki ±   0%       ~ (p=0.119 n=6)
RangeQuery/expr=avg(a_hundred),steps=1-28                                                                   54.59Ki ±   0%   54.59Ki ±   0%       ~ (p=0.223 n=6)
RangeQuery/expr=avg(a_hundred),steps=1000-28                                                                322.4Ki ±   0%   322.4Ki ±   0%       ~ (p=0.937 n=6)
RangeQuery/expr=sum_without_(l)(h_one),steps=1-28                                                           15.75Ki ±   0%   15.75Ki ±   0%  -0.01% (p=0.013 n=6)
RangeQuery/expr=sum_without_(l)(h_one),steps=1000-28                                                        47.14Ki ±   0%   47.15Ki ±   0%       ~ (p=0.385 n=6)
RangeQuery/expr=sum_without_(l)(h_hundred),steps=1-28                                                       535.2Ki ±   0%   535.9Ki ±   0%       ~ (p=0.065 n=6)
RangeQuery/expr=sum_without_(l)(h_hundred),steps=1000-28                                                    3.389Mi ±   0%   3.392Mi ±   0%       ~ (p=0.240 n=6)
RangeQuery/expr=sum_without_(le)(h_one),steps=1-28                                                          12.11Ki ±   0%   12.11Ki ±   0%       ~ (p=1.000 n=6)
RangeQuery/expr=sum_without_(le)(h_one),steps=1000-28                                                       43.49Ki ±   0%   43.50Ki ±   0%       ~ (p=0.561 n=6)
RangeQuery/expr=sum_without_(le)(h_hundred),steps=1-28                                                      567.5Ki ±   0%   567.8Ki ±   0%       ~ (p=0.310 n=6)
RangeQuery/expr=sum_without_(le)(h_hundred),steps=1000-28                                                   3.422Mi ±   0%   3.423Mi ±   0%       ~ (p=0.699 n=6)
RangeQuery/expr=sum_by_(l)(h_one),steps=1-28                                                                12.06Ki ±   0%   12.06Ki ±   0%       ~ (p=0.688 n=6)
RangeQuery/expr=sum_by_(l)(h_one),steps=1000-28                                                             43.45Ki ±   0%   43.45Ki ±   0%       ~ (p=0.554 n=6)
RangeQuery/expr=sum_by_(l)(h_hundred),steps=1-28                                                            567.3Ki ±   0%   567.9Ki ±   0%       ~ (p=0.180 n=6)
RangeQuery/expr=sum_by_(l)(h_hundred),steps=1000-28                                                         3.425Mi ±   0%   3.428Mi ±   0%       ~ (p=0.240 n=6)
RangeQuery/expr=sum_by_(le)(h_one),steps=1-28                                                               15.74Ki ±   0%   15.73Ki ±   0%  -0.01% (p=0.004 n=6)
RangeQuery/expr=sum_by_(le)(h_one),steps=1000-28                                                            47.12Ki ±   0%   47.12Ki ±   0%       ~ (p=0.515 n=6)
RangeQuery/expr=sum_by_(le)(h_hundred),steps=1-28                                                           535.3Ki ±   0%   535.3Ki ±   0%       ~ (p=0.589 n=6)
RangeQuery/expr=sum_by_(le)(h_hundred),steps=1000-28                                                        3.389Mi ±   0%   3.395Mi ±   0%       ~ (p=0.240 n=6)
RangeQuery/expr=count_values('value',_h_one),steps=100-28                                                   706.7Ki ±   0%   706.6Ki ±   0%       ~ (p=0.394 n=6)
RangeQuery/expr=count_values('value',_h_hundred),steps=100-28                                               66.36Mi ±   1%   66.33Mi ±   1%       ~ (p=0.818 n=6)
RangeQuery/expr=topk(1,_a_one),steps=1-28                                                                   7.972Ki ±   0%   7.972Ki ±   0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=topk(1,_a_one),steps=1000-28                                                                200.0Ki ±   0%   200.0Ki ±   0%       ~ (p=0.485 n=6)
RangeQuery/expr=topk(1,_a_hundred),steps=1-28                                                               66.14Ki ±   0%   66.13Ki ±   0%       ~ (p=0.288 n=6)
RangeQuery/expr=topk(1,_a_hundred),steps=1000-28                                                            522.0Ki ±   0%   522.0Ki ±   0%       ~ (p=0.699 n=6)
RangeQuery/expr=topk(5,_a_one),steps=1-28                                                                   7.973Ki ±   0%   7.972Ki ±   0%  -0.01% (p=0.015 n=6)
RangeQuery/expr=topk(5,_a_one),steps=1000-28                                                                200.0Ki ±   0%   200.0Ki ±   0%  -0.01% (p=0.017 n=6)
RangeQuery/expr=topk(5,_a_hundred),steps=1-28                                                               66.88Ki ±   0%   66.89Ki ±   0%       ~ (p=0.461 n=6)
RangeQuery/expr=topk(5,_a_hundred),steps=1000-28                                                            749.4Ki ±   0%   749.4Ki ±   0%       ~ (p=1.000 n=6)
RangeQuery/expr=limitk(1,_a_one),steps=1-28                                                                 7.979Ki ±   0%   7.979Ki ±   0%       ~ (p=1.000 n=6)
RangeQuery/expr=limitk(1,_a_one),steps=1000-28                                                              200.0Ki ±   0%   200.0Ki ±   0%       ~ (p=0.558 n=6)
RangeQuery/expr=limitk(1,_a_hundred),steps=1-28                                                             66.15Ki ±   0%   66.14Ki ±   0%  -0.02% (p=0.006 n=6)
RangeQuery/expr=limitk(1,_a_hundred),steps=1000-28                                                          521.9Ki ±   0%   521.8Ki ±   0%       ~ (p=0.240 n=6)
RangeQuery/expr=limitk(5,_a_one),steps=1-28                                                                 7.980Ki ±   0%   7.979Ki ±   0%       ~ (p=1.000 n=6)
RangeQuery/expr=limitk(5,_a_one),steps=1000-28                                                              200.0Ki ±   0%   200.0Ki ±   0%  -0.02% (p=0.015 n=6)
RangeQuery/expr=limitk(5,_a_hundred),steps=1-28                                                             66.83Ki ±   0%   66.82Ki ±   0%  -0.02% (p=0.006 n=6)
RangeQuery/expr=limitk(5,_a_hundred),steps=1000-28                                                          710.2Ki ±   0%   710.2Ki ±   0%       ~ (p=0.818 n=6)
RangeQuery/expr=limit_ratio(0.1,_a_one),steps=1-28                                                          7.886Ki ±   0%   7.885Ki ±   0%       ~ (p=0.567 n=6)
RangeQuery/expr=limit_ratio(0.1,_a_one),steps=1000-28                                                       153.0Ki ±   0%   153.0Ki ±   0%       ~ (p=0.584 n=6)
RangeQuery/expr=limit_ratio(0.1,_a_hundred),steps=1-28                                                      69.90Ki ±   0%   69.90Ki ±   0%       ~ (p=0.370 n=6)
RangeQuery/expr=limit_ratio(0.1,_a_hundred),steps=1000-28                                                   2.010Mi ±   0%   2.010Mi ±   0%       ~ (p=0.937 n=6)
RangeQuery/expr=limit_ratio(0.5,_a_one),steps=1-28                                                          7.885Ki ±   0%   7.885Ki ±   0%       ~ (p=0.455 n=6)
RangeQuery/expr=limit_ratio(0.5,_a_one),steps=1000-28                                                       153.0Ki ±   0%   153.0Ki ±   0%       ~ (p=0.667 n=6)
RangeQuery/expr=limit_ratio(0.5,_a_hundred),steps=1-28                                                      84.17Ki ±   0%   84.18Ki ±   0%       ~ (p=0.372 n=6)
RangeQuery/expr=limit_ratio(0.5,_a_hundred),steps=1000-28                                                   7.645Mi ±   0%   7.645Mi ±   0%       ~ (p=0.818 n=6)
RangeQuery/expr=limit_ratio(-0.5,_a_one),steps=1-28                                                         8.073Ki ±   0%   8.073Ki ±   0%       ~ (p=1.000 n=6)
RangeQuery/expr=limit_ratio(-0.5,_a_one),steps=1000-28                                                      200.1Ki ±   0%   200.1Ki ±   0%       ~ (p=0.667 n=6)
RangeQuery/expr=limit_ratio(-0.5,_a_hundred),steps=1-28                                                     84.80Ki ±   0%   84.82Ki ±   0%  +0.03% (p=0.009 n=6)
RangeQuery/expr=limit_ratio(-0.5,_a_hundred),steps=1000-28                                                  7.645Mi ±   0%   7.645Mi ±   0%       ~ (p=0.853 n=6)
RangeQuery/expr=rate(a_one[1m])_+_rate(b_one[1m]),steps=1-28                                                16.48Ki ±   0%   16.48Ki ±   0%       ~ (p=0.545 n=6)
RangeQuery/expr=rate(a_one[1m])_+_rate(b_one[1m]),steps=1000-28                                             23.87Ki ±   0%   23.88Ki ±   0%       ~ (p=0.165 n=6)
RangeQuery/expr=rate(a_hundred[1m])_+_rate(b_hundred[1m]),steps=1-28                                        228.5Ki ±   0%   228.5Ki ±   0%       ~ (p=0.937 n=6)
RangeQuery/expr=rate(a_hundred[1m])_+_rate(b_hundred[1m]),steps=1000-28                                     711.8Ki ±   0%   712.4Ki ±   0%       ~ (p=0.485 n=6)
RangeQuery/expr=sum_without_(l)(rate(a_one[1m])),steps=1-28                                                 9.716Ki ±   0%   9.716Ki ±   0%       ~ (p=1.000 n=6)
RangeQuery/expr=sum_without_(l)(rate(a_one[1m])),steps=1000-28                                              13.42Ki ±   0%   13.42Ki ±   0%       ~ (p=0.333 n=6)
RangeQuery/expr=sum_without_(l)(rate(a_hundred[1m])),steps=1-28                                             79.93Ki ±   0%   79.93Ki ±   0%       ~ (p=0.288 n=6)
RangeQuery/expr=sum_without_(l)(rate(a_hundred[1m])),steps=1000-28                                          320.5Ki ±   0%   320.4Ki ±   0%       ~ (p=0.589 n=6)
RangeQuery/expr=sum_without_(l)(rate(a_one[1m]))_/_sum_without_(l)(rate(b_one[1m])),steps=1-28              19.90Ki ±   0%   19.90Ki ±   0%       ~ (p=1.000 n=6)
RangeQuery/expr=sum_without_(l)(rate(a_one[1m]))_/_sum_without_(l)(rate(b_one[1m])),steps=1000-28           27.31Ki ±   0%   27.31Ki ±   0%       ~ (p=0.232 n=6)
RangeQuery/expr=sum_without_(l)(rate(a_hundred[1m]))_/_sum_without_(l)(rate(b_hundred[1m])),steps=1-28      160.1Ki ±   0%   160.1Ki ±   0%       ~ (p=0.937 n=6)
RangeQuery/expr=sum_without_(l)(rate(a_hundred[1m]))_/_sum_without_(l)(rate(b_hundred[1m])),steps=1000-28   641.3Ki ±   0%   641.4Ki ±   0%       ~ (p=0.258 n=6)
RangeQuery/expr=histogram_quantile(0.9,_rate(h_one[5m])),steps=1-28                                         21.76Ki ±   0%   22.09Ki ±   0%  +1.51% (p=0.002 n=6)
RangeQuery/expr=histogram_quantile(0.9,_rate(h_one[5m])),steps=1000-28                                      53.17Ki ±   0%   53.51Ki ±   0%  +0.63% (p=0.002 n=6)
RangeQuery/expr=histogram_quantile(0.9,_rate(h_hundred[5m])),steps=1-28                                     1.161Mi ±   0%   1.162Mi ±   0%  +0.06% (p=0.026 n=6)
RangeQuery/expr=histogram_quantile(0.9,_rate(h_hundred[5m])),steps=1000-28                                  4.054Mi ±   1%   4.045Mi ±   0%       ~ (p=0.394 n=6)
RangeQuery/expr=a_one_+_on(l)_group_right_a_one,steps=1-28                                                  12.74Ki ±   0%   12.74Ki ±   0%       ~ (p=1.000 n=6)
RangeQuery/expr=a_one_+_on(l)_group_right_a_one,steps=1000-28                                               208.3Ki ±   0%   208.3Ki ±   0%       ~ (p=0.290 n=6)
RangeQuery/expr=a_hundred_+_on(l)_group_right_a_one,steps=1-28                                              104.4Ki ±   0%   104.4Ki ±   0%       ~ (p=0.584 n=6)
RangeQuery/expr=a_hundred_+_on(l)_group_right_a_one,steps=1000-28                                           376.3Ki ±   0%   376.3Ki ±   0%       ~ (p=0.818 n=6)
RangeQuery/expr=count({__name__!=""}),steps=1-28                                                            675.6Ki ±   0%   675.9Ki ±   0%       ~ (p=0.093 n=6)
RangeQuery/expr=count({__name__!="",l=""}),steps=1-28                                                       23.26Ki ±   0%   23.26Ki ±   0%  -0.01% (p=0.032 n=6)
RangeQuery/expr=timestamp(a_one),steps=1-28                                                                 6.548Ki ±   0%   6.548Ki ±   0%       ~ (p=1.000 n=6)
RangeQuery/expr=timestamp(a_one),steps=1000-28                                                              80.90Ki ±   0%   80.90Ki ±   0%       ~ (p=0.797 n=6)
RangeQuery/expr=timestamp(a_hundred),steps=1-28                                                             133.8Ki ±   0%   133.8Ki ±   0%  -0.01% (p=0.030 n=6)
RangeQuery/expr=timestamp(a_hundred),steps=1000-28                                                          5.057Mi ±   0%   5.057Mi ±   0%       ~ (p=0.180 n=6)
geomean                                                                                                     130.8Ki          130.8Ki         -0.02%
¹ all samples are equal

                                                                                                          │ 11c49151b.txt │            375727e5b.txt            │
                                                                                                          │   allocs/op   │  allocs/op   vs base                │
RangeQuery/expr=a_one,steps=1-28                                                                               112.0 ± 0%    112.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_one,steps=1000-28                                                                            144.0 ± 0%    144.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_hundred,steps=1-28                                                                           713.0 ± 0%    713.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_hundred,steps=1000-28                                                                       3.445k ± 0%   3.445k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=rate(a_one[1m]),steps=1-28                                                                     144.0 ± 0%    144.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=rate(a_one[1m]),steps=1000-28                                                                  173.0 ± 0%    173.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=rate(a_hundred[1m]),steps=1-28                                                                1.144k ± 0%   1.144k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=rate(a_hundred[1m]),steps=1000-28                                                             3.584k ± 0%   3.585k ± 0%       ~ (p=0.182 n=6)
RangeQuery/expr=rate(a_one[1m]),steps=10000-28                                                                 465.0 ± 0%    465.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=rate(a_hundred[1m]),steps=10000-28                                                            27.52k ± 0%   27.52k ± 0%       ~ (p=0.247 n=6)
RangeQuery/expr=rate(sparse[1m]),steps=10000-28                                                                627.0 ± 0%    627.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=double_exponential_smoothing(a_one[1d],_0.3,_0.3),steps=1-28                                   437.0 ± 0%    437.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=double_exponential_smoothing(a_one[1d],_0.3,_0.3),steps=1000-28                               2.460k ± 0%   2.460k ± 0%       ~ (p=0.455 n=6)
RangeQuery/expr=double_exponential_smoothing(a_hundred[1d],_0.3,_0.3),steps=1-28                              22.64k ± 0%   22.64k ± 0%  +0.01% (p=0.039 n=6)
RangeQuery/expr=double_exponential_smoothing(a_hundred[1d],_0.3,_0.3),steps=1000-28                           224.8k ± 0%   224.8k ± 0%       ~ (p=0.937 n=6)
RangeQuery/expr=changes(a_one[1d]),steps=1-28                                                                  375.0 ± 0%    375.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=changes(a_one[1d]),steps=1000-28                                                               400.0 ± 0%    400.0 ± 0%       ~ (p=1.000 n=6)
RangeQuery/expr=changes(a_hundred[1d]),steps=1-28                                                             22.18k ± 0%   22.18k ± 0%       ~ (p=0.610 n=6)
RangeQuery/expr=changes(a_hundred[1d]),steps=1000-28                                                          24.56k ± 4%   24.57k ± 4%       ~ (p=0.515 n=6)
RangeQuery/expr=rate(a_one[1d]),steps=1-28                                                                     381.0 ± 0%    381.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=rate(a_one[1d]),steps=1000-28                                                                  405.0 ± 0%    405.5 ± 0%       ~ (p=0.545 n=6)
RangeQuery/expr=rate(a_hundred[1d]),steps=1-28                                                                22.58k ± 0%   22.58k ± 0%       ~ (p=0.374 n=6)
RangeQuery/expr=rate(a_hundred[1d]),steps=1000-28                                                             24.94k ± 0%   24.94k ± 0%       ~ (p=0.199 n=6)
RangeQuery/expr=absent_over_time(a_one[1d]),steps=1-28                                                         376.0 ± 0%    376.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=absent_over_time(a_one[1d]),steps=1000-28                                                      400.0 ± 0%    400.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=absent_over_time(a_hundred[1d]),steps=1-28                                                    22.27k ± 0%   22.27k ± 0%       ~ (p=1.000 n=6)
RangeQuery/expr=absent_over_time(a_hundred[1d]),steps=1000-28                                                 24.62k ± 0%   24.62k ± 0%       ~ (p=0.727 n=6)
RangeQuery/expr=-a_one,steps=1-28                                                                              122.0 ± 0%    122.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=-a_one,steps=1000-28                                                                           154.0 ± 0%    154.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=-a_hundred,steps=1-28                                                                          726.0 ± 0%    726.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=-a_hundred,steps=1000-28                                                                      3.458k ± 0%   3.458k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_one_-_b_one,steps=1-28                                                                       194.0 ± 0%    194.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_one_-_b_one,steps=1000-28                                                                    258.0 ± 0%    258.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_hundred_-_b_hundred,steps=1-28                                                              1.818k ± 0%   1.818k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_hundred_-_b_hundred,steps=1000-28                                                           7.284k ± 0%   7.284k ± 0%       ~ (p=1.000 n=6)
RangeQuery/expr=a_one_-_b_one,steps=10000-28                                                                   823.0 ± 0%    823.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_hundred_-_b_hundred,steps=10000-28                                                          54.56k ± 0%   54.56k ± 0%       ~ (p=0.563 n=6)
RangeQuery/expr=a_one_and_b_one{l=~'.*[0-4]$'},steps=1-28                                                      256.0 ± 0%    256.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_one_and_b_one{l=~'.*[0-4]$'},steps=1000-28                                                   288.0 ± 0%    288.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_hundred_and_b_hundred{l=~'.*[0-4]$'},steps=1-28                                             1.341k ± 0%   1.341k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_hundred_and_b_hundred{l=~'.*[0-4]$'},steps=1000-28                                          12.48k ± 0%   12.48k ± 0%       ~ (p=1.000 n=6)
RangeQuery/expr=a_one_or_b_one{l=~'.*[0-4]$'},steps=1-28                                                       257.0 ± 0%    257.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_one_or_b_one{l=~'.*[0-4]$'},steps=1000-28                                                    289.0 ± 0%    289.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_hundred_or_b_hundred{l=~'.*[0-4]$'},steps=1-28                                              1.345k ± 0%   1.345k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_hundred_or_b_hundred{l=~'.*[0-4]$'},steps=1000-28                                           14.48k ± 0%   14.48k ± 0%       ~ (p=0.636 n=6)
RangeQuery/expr=a_one_unless_b_one{l=~'.*[0-4]$'},steps=1-28                                                   257.0 ± 0%    257.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_one_unless_b_one{l=~'.*[0-4]$'},steps=1000-28                                                289.0 ± 0%    289.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_hundred_unless_b_hundred{l=~'.*[0-4]$'},steps=1-28                                          1.341k ± 0%   1.341k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_hundred_unless_b_hundred{l=~'.*[0-4]$'},steps=1000-28                                       12.48k ± 0%   12.48k ± 0%       ~ (p=1.000 n=6)
RangeQuery/expr=a_one_and_b_one{l='notfound'},steps=1-28                                                       176.0 ± 0%    176.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_one_and_b_one{l='notfound'},steps=1000-28                                                    208.0 ± 0%    208.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_hundred_and_b_hundred{l='notfound'},steps=1-28                                               880.0 ± 0%    880.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_hundred_and_b_hundred{l='notfound'},steps=1000-28                                           3.612k ± 0%   3.613k ± 0%       ~ (p=0.567 n=6)
RangeQuery/expr=abs(a_one),steps=1-28                                                                          137.0 ± 0%    137.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=abs(a_one),steps=1000-28                                                                       169.0 ± 0%    169.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=abs(a_hundred),steps=1-28                                                                      741.0 ± 0%    741.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=abs(a_hundred),steps=1000-28                                                                  3.474k ± 0%   3.474k ± 0%       ~ (p=1.000 n=6)
RangeQuery/expr=label_replace(a_one,_'l2',_'$1',_'l',_'(.*)'),steps=1-28                                       211.0 ± 0%    211.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=label_replace(a_one,_'l2',_'$1',_'l',_'(.*)'),steps=1000-28                                    243.0 ± 0%    243.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=label_replace(a_hundred,_'l2',_'$1',_'l',_'(.*)'),steps=1-28                                  1.203k ± 0%   1.203k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=label_replace(a_hundred,_'l2',_'$1',_'l',_'(.*)'),steps=1000-28                               3.935k ± 0%   3.935k ± 0%       ~ (p=1.000 n=6)
RangeQuery/expr=label_join(a_one,_'l2',_'-',_'l',_'l'),steps=1-28                                              170.0 ± 0%    170.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=label_join(a_one,_'l2',_'-',_'l',_'l'),steps=1000-28                                           202.0 ± 0%    202.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=label_join(a_hundred,_'l2',_'-',_'l',_'l'),steps=1-28                                          972.0 ± 0%    972.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=label_join(a_hundred,_'l2',_'-',_'l',_'l'),steps=1000-28                                      3.704k ± 0%   3.704k ± 0%       ~ (p=1.000 n=6)
RangeQuery/expr=sum(a_one),steps=1-28                                                                          133.0 ± 0%    133.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum(a_one),steps=1000-28                                                                       165.0 ± 0%    165.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum(a_hundred),steps=1-28                                                                      734.0 ± 0%    734.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum(a_hundred),steps=1000-28                                                                  3.466k ± 0%   3.466k ± 0%       ~ (p=1.000 n=6)
RangeQuery/expr=avg(a_one),steps=1-28                                                                          133.0 ± 0%    133.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=avg(a_one),steps=1000-28                                                                       165.0 ± 0%    165.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=avg(a_hundred),steps=1-28                                                                      734.0 ± 0%    734.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=avg(a_hundred),steps=1000-28                                                                  3.466k ± 0%   3.466k ± 0%       ~ (p=1.000 n=6)
RangeQuery/expr=sum_without_(l)(h_one),steps=1-28                                                              222.0 ± 0%    222.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum_without_(l)(h_one),steps=1000-28                                                           534.0 ± 0%    534.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum_without_(l)(h_hundred),steps=1-28                                                         6.764k ± 0%   6.765k ± 0%       ~ (p=1.000 n=6)
RangeQuery/expr=sum_without_(l)(h_hundred),steps=1000-28                                                      36.71k ± 0%   36.71k ± 0%       ~ (p=0.119 n=6)
RangeQuery/expr=sum_without_(le)(h_one),steps=1-28                                                             207.0 ± 0%    207.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum_without_(le)(h_one),steps=1000-28                                                          519.0 ± 0%    519.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum_without_(le)(h_hundred),steps=1-28                                                        6.864k ± 0%   6.864k ± 0%       ~ (p=1.000 n=6)
RangeQuery/expr=sum_without_(le)(h_hundred),steps=1000-28                                                     36.81k ± 0%   36.81k ± 0%       ~ (p=0.545 n=6)
RangeQuery/expr=sum_by_(l)(h_one),steps=1-28                                                                   205.0 ± 0%    205.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum_by_(l)(h_one),steps=1000-28                                                                517.0 ± 0%    517.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum_by_(l)(h_hundred),steps=1-28                                                              6.862k ± 0%   6.863k ± 0%       ~ (p=0.567 n=6)
RangeQuery/expr=sum_by_(l)(h_hundred),steps=1000-28                                                           36.81k ± 0%   36.81k ± 0%       ~ (p=0.297 n=6)
RangeQuery/expr=sum_by_(le)(h_one),steps=1-28                                                                  224.0 ± 0%    224.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum_by_(le)(h_one),steps=1000-28                                                               536.0 ± 0%    536.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum_by_(le)(h_hundred),steps=1-28                                                             6.766k ± 0%   6.766k ± 0%       ~ (p=1.000 n=6)
RangeQuery/expr=sum_by_(le)(h_hundred),steps=1000-28                                                          36.71k ± 0%   36.71k ± 0%       ~ (p=0.262 n=6)
RangeQuery/expr=count_values('value',_h_one),steps=100-28                                                     6.425k ± 0%   6.425k ± 0%       ~ (p=1.000 n=6)
RangeQuery/expr=count_values('value',_h_hundred),steps=100-28                                                 568.4k ± 0%   568.4k ± 0%       ~ (p=1.000 n=6)
RangeQuery/expr=topk(1,_a_one),steps=1-28                                                                      152.0 ± 0%    152.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=topk(1,_a_one),steps=1000-28                                                                  3.181k ± 0%   3.181k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=topk(1,_a_hundred),steps=1-28                                                                  756.0 ± 0%    756.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=topk(1,_a_hundred),steps=1000-28                                                              6.486k ± 0%   6.486k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=topk(5,_a_one),steps=1-28                                                                      152.0 ± 0%    152.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=topk(5,_a_one),steps=1000-28                                                                  3.181k ± 0%   3.181k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=topk(5,_a_hundred),steps=1-28                                                                  760.0 ± 0%    760.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=topk(5,_a_hundred),steps=1000-28                                                              8.488k ± 0%   8.488k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=limitk(1,_a_one),steps=1-28                                                                    152.0 ± 0%    152.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=limitk(1,_a_one),steps=1000-28                                                                3.181k ± 0%   3.181k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=limitk(1,_a_hundred),steps=1-28                                                                756.0 ± 0%    756.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=limitk(1,_a_hundred),steps=1000-28                                                            6.486k ± 0%   6.486k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=limitk(5,_a_one),steps=1-28                                                                    152.0 ± 0%    152.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=limitk(5,_a_one),steps=1000-28                                                                3.181k ± 0%   3.181k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=limitk(5,_a_hundred),steps=1-28                                                                756.0 ± 0%    756.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=limitk(5,_a_hundred),steps=1000-28                                                            6.486k ± 0%   6.486k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=limit_ratio(0.1,_a_one),steps=1-28                                                             153.0 ± 0%    153.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=limit_ratio(0.1,_a_one),steps=1000-28                                                         2.183k ± 0%   2.183k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=limit_ratio(0.1,_a_hundred),steps=1-28                                                         768.0 ± 0%    768.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=limit_ratio(0.1,_a_hundred),steps=1000-28                                                     10.50k ± 0%   10.50k ± 0%       ~ (p=1.000 n=6)
RangeQuery/expr=limit_ratio(0.5,_a_one),steps=1-28                                                             153.0 ± 0%    153.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=limit_ratio(0.5,_a_one),steps=1000-28                                                         2.183k ± 0%   2.183k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=limit_ratio(0.5,_a_hundred),steps=1-28                                                         772.0 ± 0%    772.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=limit_ratio(0.5,_a_hundred),steps=1000-28                                                     12.51k ± 0%   12.51k ± 0%       ~ (p=1.000 n=6)
RangeQuery/expr=limit_ratio(-0.5,_a_one),steps=1-28                                                            156.0 ± 0%    156.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=limit_ratio(-0.5,_a_one),steps=1000-28                                                        3.185k ± 0%   3.185k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=limit_ratio(-0.5,_a_hundred),steps=1-28                                                        772.0 ± 0%    772.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=limit_ratio(-0.5,_a_hundred),steps=1000-28                                                    12.51k ± 0%   12.51k ± 0%       ~ (p=1.000 n=6)
RangeQuery/expr=rate(a_one[1m])_+_rate(b_one[1m]),steps=1-28                                                   256.0 ± 0%    256.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=rate(a_one[1m])_+_rate(b_one[1m]),steps=1000-28                                                314.0 ± 0%    314.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=rate(a_hundred[1m])_+_rate(b_hundred[1m]),steps=1-28                                          2.686k ± 0%   2.686k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=rate(a_hundred[1m])_+_rate(b_hundred[1m]),steps=1000-28                                       7.566k ± 0%   7.566k ± 0%       ~ (p=0.589 n=6)
RangeQuery/expr=sum_without_(l)(rate(a_one[1m])),steps=1-28                                                    174.0 ± 0%    174.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum_without_(l)(rate(a_one[1m])),steps=1000-28                                                 203.0 ± 0%    203.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum_without_(l)(rate(a_hundred[1m])),steps=1-28                                               1.179k ± 0%   1.179k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum_without_(l)(rate(a_hundred[1m])),steps=1000-28                                            3.616k ± 0%   3.616k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum_without_(l)(rate(a_one[1m]))_/_sum_without_(l)(rate(b_one[1m])),steps=1-28                 314.0 ± 0%    314.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum_without_(l)(rate(a_one[1m]))_/_sum_without_(l)(rate(b_one[1m])),steps=1000-28              372.0 ± 0%    372.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum_without_(l)(rate(a_hundred[1m]))_/_sum_without_(l)(rate(b_hundred[1m])),steps=1-28        2.319k ± 0%   2.319k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=sum_without_(l)(rate(a_hundred[1m]))_/_sum_without_(l)(rate(b_hundred[1m])),steps=1000-28     7.198k ± 0%   7.199k ± 0%       ~ (p=0.545 n=6)
RangeQuery/expr=histogram_quantile(0.9,_rate(h_one[5m])),steps=1-28                                            316.0 ± 0%    318.0 ± 0%  +0.63% (p=0.002 n=6)
RangeQuery/expr=histogram_quantile(0.9,_rate(h_one[5m])),steps=1000-28                                         628.0 ± 0%    630.0 ± 0%  +0.32% (p=0.002 n=6)
RangeQuery/expr=histogram_quantile(0.9,_rate(h_hundred[5m])),steps=1-28                                       12.24k ± 0%   12.24k ± 0%  +0.02% (p=0.002 n=6)
RangeQuery/expr=histogram_quantile(0.9,_rate(h_hundred[5m])),steps=1000-28                                    42.18k ± 0%   42.18k ± 0%       ~ (p=0.714 n=6)
RangeQuery/expr=a_one_+_on(l)_group_right_a_one,steps=1-28                                                     213.0 ± 0%    213.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_one_+_on(l)_group_right_a_one,steps=1000-28                                                 2.275k ± 0%   2.275k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_hundred_+_on(l)_group_right_a_one,steps=1-28                                                 914.0 ± 0%    914.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=a_hundred_+_on(l)_group_right_a_one,steps=1000-28                                             3.679k ± 0%   3.679k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=count({__name__!=""}),steps=1-28                                                              8.813k ± 0%   8.813k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=count({__name__!="",l=""}),steps=1-28                                                          235.0 ± 0%    235.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=timestamp(a_one),steps=1-28                                                                    131.0 ± 0%    131.0 ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=timestamp(a_one),steps=1000-28                                                                2.161k ± 0%   2.161k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=timestamp(a_hundred),steps=1-28                                                               1.144k ± 0%   1.144k ± 0%       ~ (p=1.000 n=6) ¹
RangeQuery/expr=timestamp(a_hundred),steps=1000-28                                                            5.883k ± 0%   5.883k ± 0%       ~ (p=0.545 n=6)
geomean                                                                                                       1.319k        1.319k       +0.01%

@darshanime
Copy link
Contributor

I've raised #16797 extending the perf gains due to concrete types, without the code duplication of splitting rangeEval since rangeEvalBinOp = rangeEval - prepSeries

@bboreham
Copy link
Member Author

A quick scan suggests this one is faster. Did I miss something?

@darshanime
Copy link
Contributor

Can you run the full benchmark please? Since this PR only updates the binops, other operations should be unaffected. I will run mine with count=6 and see if there are any updates.

@bboreham
Copy link
Member Author

bboreham commented Jul 2, 2025

I ran the full set of benchmarks; there were some regressions like histogram_quantile(0.9,_rate(h_hundred[5m])) that I will need to look into.

Happy to accept #16797, maybe with some tweaks, but I still want to break out rangeEvalBinOp because it was so hard to figure out what was going on. Isn't the bug in #9577 some evidence for that?

bboreham pushed a commit that referenced this pull request Jul 23, 2025
Currently, the promql functions take the interface slice []parser.Value as an argument,
which is being implemented by the conrete types Vector, Matrix etc. This PR replaces
the interface with the concrete types, resulting in improved performance.
The inspiration for this PR came from #16698 which does this for binops. 
I extended the idea to all promql functions

Signed-off-by: darshanime <deathbullet@gmail.com>

* pass single Matrix

Signed-off-by: darshanime <deathbullet@gmail.com>

---------

Signed-off-by: darshanime <deathbullet@gmail.com>
tcp13equals2 pushed a commit to tcp13equals2/prometheus that referenced this pull request Aug 18, 2025
)

Currently, the promql functions take the interface slice []parser.Value as an argument,
which is being implemented by the conrete types Vector, Matrix etc. This PR replaces
the interface with the concrete types, resulting in improved performance.
The inspiration for this PR came from prometheus#16698 which does this for binops.
I extended the idea to all promql functions

Signed-off-by: darshanime <deathbullet@gmail.com>

* pass single Matrix

Signed-off-by: darshanime <deathbullet@gmail.com>

---------

Signed-off-by: darshanime <deathbullet@gmail.com>
Signed-off-by: Andrew Hall <andrew.hall@grafana.com>
@github-actions github-actions bot added the stale label Sep 2, 2025
To make subsequent changes easier.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This means we can simplify the non-binop version that doesn't need
the `prepSeries` function.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This is more efficient as it avoids converting Vector arguments to parser.Value.

Allow matching parameter to be nil to signal we don't need signatures.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
@github-actions github-actions bot removed the stale label Sep 3, 2025
@bboreham bboreham marked this pull request as draft September 4, 2025 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants