Menu

#5962 Avoid using Skyline_pair::insert.

Fixed
Enhancement
2020-05-08
2020-05-03
No

Skyline::insert(Box) creates a skyline and merges it. In this case,
the boxes are non-overlapping, so it is trivial to create a skyline
out of them.

Remove Skyline::insert(). Using it repeatedly leads to a quadratic
complexity, so it's best avoided.

Timing benchmarks are neutral

https://codereview.appspot.com/554000043

Discussion

  • Anonymous

    Anonymous - 2020-05-04
    • Description has changed:

    Diff:

    
    
    • Needs: -->
    • Patch: new --> review
     
  • Anonymous

    Anonymous - 2020-05-04

    Passes make, make check and a full make doc.

     
  • Anonymous

    Anonymous - 2020-05-04
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2020-05-04

    Patch on countdown for May 6th

     
  • Anonymous

    Anonymous - 2020-05-07
    • Patch: countdown --> push
     
  • Anonymous

    Anonymous - 2020-05-07

    Patch counted down - please push

     
  • Jonas Hahnfeld

    Jonas Hahnfeld - 2020-05-08
    • labels: --> Fixed_2_21_2
    • status: Started --> Fixed
    • Patch: push -->
     
  • Jonas Hahnfeld

    Jonas Hahnfeld - 2020-05-08
    commit b872b327c471a9538d93fba21ff0385709aae2c2
    Author:     Han-Wen Nienhuys <hanwen@lilypond.org>
    AuthorDate: Sun May 3 20:31:10 2020 +0200
    Commit:     Han-Wen Nienhuys <hanwen@lilypond.org>
    CommitDate: Fri May 8 09:14:55 2020 +0200
    
        Avoid using Skyline_pair::insert.
    
        Skyline::insert(Box) creates a skyline and merges it. In this case,
        the boxes are non-overlapping, so it is trivial to create a skyline
        out of them.
    
        Remove Skyline::insert(). Using it repeatedly leads to a quadratic
        complexity, so it's best avoided.
    
        Timing benchmarks are neutral