From 99760176a6169d464caf6e13aeeaf47753478d5f Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Thu, 2 May 2024 21:24:05 -0700 Subject: [PATCH] Describe perf benefit of reusing iterator from same version --- include/VersionedMap.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/VersionedMap.h b/include/VersionedMap.h index f9a17ab..1d119e7 100644 --- a/include/VersionedMap.h +++ b/include/VersionedMap.h @@ -136,7 +136,9 @@ struct VersionedMap { /** Perform `count` "first greater than or equal to" queries. The result of * querying `key[i]` at `version[i]` is `iterator[i]`. `version[i]` must be >= * `getOldestVersion()` and <= `getVersion()`. Thread-safe as long as a - * version is not concurrently invalidated by `setOldestVersion`. */ + * version is not concurrently invalidated by `setOldestVersion`. There's a + * performance benefit if you pass iterator[i] previously obtained at + * version[i]. */ void firstGeq(const Key *key, const int64_t *version, Iterator *iterator, int count) const;