prometheus/index
Brian Brazil 296f943ec4
More efficient Merge implementation. (#486)
Avoid a tree of merge objects, which can result in
what I suspect is n^2 calls to Seek when using Without.

With 100k metrics, and a regex of ^$ in BenchmarkHeadPostingForMatchers:

Before:
BenchmarkHeadPostingForMatchers-8              1        51633185216 ns/op      29745528 B/op      200357 allocs/op

After:
BenchmarkHeadPostingForMatchers-8             10         108924996 ns/op 25715025 B/op     101748 allocs/op

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2019-01-03 16:59:52 +00:00
..
encoding_helpers.go Add license headers to missing files (#447) 2018-11-06 20:19:42 +02:00
index.go Release v0.3.0 (#464) 2018-12-04 16:50:11 +03:00
index_test.go fix statick check errors (#475) 2019-01-02 19:48:42 +03:00
postings.go More efficient Merge implementation. (#486) 2019-01-03 16:59:52 +00:00
postings_test.go More efficient Merge implementation. (#486) 2019-01-03 16:59:52 +00:00