> On Apr 22, 2026, at 15:04, Fujii Masao <masao.fujii@gmail.com> wrote:
>
> On Thu, Apr 9, 2026 at 3:13 PM wang.xiao.peng <wxp_728@163.com> wrote:
>> Just finished reviewing the v3 patches - looks good to me. The pg_leftmost_one_pos64 fix is spot on, and using
INT64_FORMATfor the error message is the right approach.
>
> Since pg_leftmost_one_pos64() can return up to 63, should the size of
> histogram[] be changed from 32 to 64? If we want to display the full
> histogram[] in the output, max_bit in output() would also need to be set to 63.
> Alternatively, it may be fine to keep max_bit = 31 and show only
> the first 32 histogram entries.
I revisited this patch and think it makes sense to extend histogram[] to 64 entries.
In practice, the higher buckets will almost always remain zero, and output() already omits trailing histogram entries
withzero counts, so this change is unlikely to affect the actual runtime output in normal cases.
Accordingly, I also adjusted the minimum width of the first column, since the maximum int64 value has 19 digits, and
updatedthe printf format accordingly.
>
> Patch 0001 looks good to me.
Cool.
PFA v4:
* 0001 unchanged from v3.
* 0002 changed size of histogram[] 64.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/