Re: [PATCH 1/9] reftable: introduce macros to grow arrays
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 1, 2024, 16:30 UTC
- Message-ID
- <xmqqbk902llj.fsf@gitster.g>
- In-Reply-To
- <ZbtIQ3Hk6Mgvkv4j@tanuki>
Patrick Steinhardt <ps@pks.im> writes:
Show 5 quoted lines
> Very good point indeed. I don't think peak memory usage is really all > that helpful either because the problem is not that we are allocating > arrays that we keep around all the time, but many small arrays which are > short lived. So what is telling is the total number of bytes we end up > allocating:
True. sum of requested sizes to all the calls to malloc() and friends to allocate, ignoring what gets free()d in between, is what would show how much we try to consume.
> Allocating 21 times as many bytes with our default growth factor should > be a much more compelling argument why we don't actually want to use it > compared to the 2% speedup.
;-).