Re: [PATCH 1/7] reftable/record: introduce function to compare records by key

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

 



On Thu, Feb 1, 2024 at 8:31 AM Patrick Steinhardt <ps@xxxxxx> wrote:
> In some places we need to sort reftable records by their keys to
> determine their ordering. This is done by first formatting the keys into
> a `struct strbuf` and then using `strbuf_cmp()` to compare them. This
> logic is needlessly roundabout and can end up costing quite a bit fo CPU
> cycles, both due to the allocation and formatting logic.

s/fo/of/

> Introduce a new `reftable_record_cmp()` function that knows to compare
> two records with each other without requiring allocations.

perhaps: s/knows to compare/knows how to compare/

> Signed-off-by: Patrick Steinhardt <ps@xxxxxx>





[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