Add efficient firstGeq overload for latestVersion

This commit is contained in:
2024-06-03 22:28:01 -07:00
parent ba11412584
commit b92f0ec227
5 changed files with 168 additions and 73 deletions

View File

@@ -158,6 +158,11 @@ struct __attribute__((__visibility__("default"))) VersionedMap {
void firstGeq(const Key *key, const int64_t *version, Iterator *iterator,
int count) const;
/** Equivalent to `firstGeq(key, version, iterator, 1)` where each element in
* `version` is the latest version, but more efficient.
*/
void firstGeq(const Key *key, Iterator *iterator, int count) const;
/** Returns an iterator to the first mutation visible in the view at
* `version`, or `end()` if none exists. Thread-safe as long as `version` is
* not concurrently invalidated by `setOldestVersion`. */