include/linux/min_heap.h | 44 +++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 21 deletions(-)
Hello, The purpose of this patch series is to enhance the existing min heap implementation. The optimization focuses on both the heap construction process and the number of comparisons made during the heapify operation. Kuan-Wei Chiu (2): min_heap: Optimize number of calls to min_heapify() min_heap: Optimize number of comparisons in min_heapify() include/linux/min_heap.h | 44 +++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 21 deletions(-) -- 2.25.1
On Wed, Dec 20, 2023 at 12:32 AM Kuan-Wei Chiu <visitorckw@gmail.com> wrote: > > Hello, > > The purpose of this patch series is to enhance the existing min heap > implementation. The optimization focuses on both the heap construction > process and the number of comparisons made during the heapify > operation. > > Kuan-Wei Chiu (2): > min_heap: Optimize number of calls to min_heapify() > min_heap: Optimize number of comparisons in min_heapify() Thanks Kuan-Wei, The patch series looks good to me. Given the extra conditions should there be some updates to: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/lib/test_min_heap.c to ensure coverage? Thanks, Ian > > include/linux/min_heap.h | 44 +++++++++++++++++++++------------------- > 1 file changed, 23 insertions(+), 21 deletions(-) > > -- > 2.25.1 >
On Wed, Jan 03, 2024 at 09:56:29AM -0800, Ian Rogers wrote: > On Wed, Dec 20, 2023 at 12:32 AM Kuan-Wei Chiu <visitorckw@gmail.com> wrote: > > > > Hello, > > > > The purpose of this patch series is to enhance the existing min heap > > implementation. The optimization focuses on both the heap construction > > process and the number of comparisons made during the heapify > > operation. > > > > Kuan-Wei Chiu (2): > > min_heap: Optimize number of calls to min_heapify() > > min_heap: Optimize number of comparisons in min_heapify() > > Thanks Kuan-Wei, > > The patch series looks good to me. Given the extra conditions should > there be some updates to: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/lib/test_min_heap.c > to ensure coverage? > Hi Ian, Thank you for your review. The current min_heap test is sufficient to cover all the code changes introduced by this patch series, even when only tested with a known set of values copied from the data. Additionally, I'm unsure if the commit message title prefix I used is correct. Perhaps I should use "lib:" instead of "min_heap:"? Best regards, Kuan-Wei Chiu
On Wed, Jan 3, 2024 at 12:08 PM Kuan-Wei Chiu <visitorckw@gmail.com> wrote: > > On Wed, Jan 03, 2024 at 09:56:29AM -0800, Ian Rogers wrote: > > On Wed, Dec 20, 2023 at 12:32 AM Kuan-Wei Chiu <visitorckw@gmail.com> wrote: > > > > > > Hello, > > > > > > The purpose of this patch series is to enhance the existing min heap > > > implementation. The optimization focuses on both the heap construction > > > process and the number of comparisons made during the heapify > > > operation. > > > > > > Kuan-Wei Chiu (2): > > > min_heap: Optimize number of calls to min_heapify() > > > min_heap: Optimize number of comparisons in min_heapify() > > > > Thanks Kuan-Wei, > > > > The patch series looks good to me. Given the extra conditions should > > there be some updates to: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/lib/test_min_heap.c > > to ensure coverage? > > > Hi Ian, > > Thank you for your review. > > The current min_heap test is sufficient to cover all the code changes > introduced by this patch series, even when only tested with a known > set of values copied from the data. > > Additionally, I'm unsure if the commit message title prefix I used is > correct. Perhaps I should use "lib:" instead of "min_heap:"? Yes, "lib:" would be most consistent or "lib min_heap:". Could you update this in a v2? Thanks, Ian
© 2016 - 2025 Red Hat, Inc.