thanos
thanos copied to clipboard
querier: improve chunkseries iterator
Accessing the current chunk via the slice is expensive and we should generally prefer to call methods on the memoized "cur" here. Moved the AtT at the bottom - an exhausted iterator should generally still be at its last value there so this should be sound - this removes a lot of AtT function call overhead. Did same with the Err() call as thats generally only interesting if we are not the last chunk and was surprisingly hot in profiles.
- [ ] I added CHANGELOG entry for this change.
- [x] Change is not relevant to the end user.