prometheus/model/labels
Bryan Boreham 87d08abe11
labels: faster Compare function when using -tags stringlabels (#12451)
Instead of unpacking every individual string, we skip to the point
where there is a difference, going 8 bytes at a time where possible.

Add benchmark for Compare; extend tests too.

---------

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Co-authored-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-06-20 20:58:47 +01:00
..
labels.go Merge pull request #12366 from prometheus/release-2.44 2023-05-16 18:06:29 +01:00
labels_stringlabels.go labels: faster Compare function when using -tags stringlabels (#12451) 2023-06-20 20:58:47 +01:00
labels_test.go labels: faster Compare function when using -tags stringlabels (#12451) 2023-06-20 20:58:47 +01:00
matcher.go Move packages out of deprecated pkg directory 2021-11-09 08:03:10 +01:00
matcher_test.go feat: dont compile regex matcher if we know its a literal (#12434) 2023-06-07 21:54:30 +01:00
regexp.go feat: dont compile regex matcher if we know its a literal (#12434) 2023-06-07 21:54:30 +01:00
regexp_test.go Allow downstream projects to use faster regexp (#10251) 2022-02-08 11:03:20 +01:00
test_utils.go labels: use ScratchBuilder in ReadLabels 2022-12-19 15:22:09 +00:00