Add TODO about bucket search optimization

Signed-off-by: beorn7 <beorn@grafana.com>
This commit is contained in:
beorn7 2021-06-29 14:52:37 +02:00
parent 43f31c25a8
commit aa6f67a9e6
1 changed files with 6 additions and 0 deletions

View File

@ -31,6 +31,12 @@ import (
// sparseBounds for the frac of observed values. Only relevant for schema > 0. // sparseBounds for the frac of observed values. Only relevant for schema > 0.
// Position in the slice is the schema. (0 is never used, just here for // Position in the slice is the schema. (0 is never used, just here for
// convenience of using the schema directly as the index.) // convenience of using the schema directly as the index.)
//
// TODO(beorn7): Currently, we do a binary search into these slices. There are
// ways to turn it into a small number of simple array lookups. It probably only
// matters for schema 5 and beyond, but should be investigated. See this comment
// as a starting point:
// https://github.com/open-telemetry/opentelemetry-specification/issues/1776#issuecomment-870164310
var sparseBounds = [][]float64{ var sparseBounds = [][]float64{
// Schema "0": // Schema "0":
[]float64{0.5}, []float64{0.5},