On Fri, Mar 14, 2025 at 04:18:56PM -0400, Taylor Blau wrote:
quoted hunk ↗ jump to hunk
-static void init_type_iterator(struct ewah_iterator *it,
+static void init_type_iterator(struct ewah_or_iterator *it,
struct bitmap_index *bitmap_git,
enum object_type type)
{
switch (type) {
case OBJ_COMMIT:
- ewah_iterator_init(it, bitmap_git->commits);
+ ewah_or_iterator_init(it, bitmap_git->commits_all,
+ bitmap_git->base_nr + 1);
This certainly makes sense. It looks like we now use the or_iterator
unconditionally, even for non-layered queries. It's probably a little
slower in practice, just because it's an extra layer of indirection. But
I don't know if trying to micro-optimize here is worth it. In general
I'd say no, but sometimes there are surprising tight loops with bitmaps.
I dunno. I guess it would be easy enough to do a simple before/after
benchmark on a single packfile with this series. I wouldn't expect it to
find anything, but might not hurt to double check.
-Peff