Re: [PATCH v4 12/13] pack-bitmap.c: use `ewah_or_iterator` for type bitmap iterators

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 14, 2025 at 04:18:56PM -0400, Taylor Blau wrote:

> -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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux