FAQ
an optimization in case heap has many duplicates:

could we replace h.Less(i, j) in up() and down() with !h.Less(j, i) ?
i.e. "break when parent <= child", instead of "break when parent < child"

thanks

Search Discussions

  • Robert Griesemer at Oct 6, 2012 at 12:53 am
    Feel free to send me a CL for review. Preferably with a small benchmark
    that shows the improvement.
    Thanks.
    - gri

    On Fri, Oct 5, 2012 at 12:56 PM, Taj Khattra wrote:

    an optimization in case heap has many duplicates:

    could we replace h.Less(i, j) in up() and down() with !h.Less(j, i) ?
    i.e. "break when parent <= child", instead of "break when parent < child"

    thanks

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedOct 5, '12 at 9:19p
activeOct 6, '12 at 12:53a
posts2
users2
websitegolang.org

2 users in discussion

Taj Khattra: 1 post Robert Griesemer: 1 post

People

Translate

site design / logo © 2022 Grokbase