Menu

todays release of clipper 2

Ignorant
2017-09-18
2017-09-18
  • Ignorant

    Ignorant - 2017-09-18

    Angus,
    You have a new method for getting the within beam intersection.!
    How much is the time diference?.

    Mahesh Naik

     
  • Angus Johnson

    Angus Johnson - 2017-09-18
    TEST1: Time (secs) to intersect COMPLEX polygons - a single random subject 
    and a single clip polygon with the following number of edges ...
    +===================+=========+=========+=======+
    |No. Edges          | New     | Old     | Perf. |
    |(each)             | Clipper | Clipper | Incr. |  
    +===================+=========+=========+=======+
    | 100               | 0.0019  | 0.0020  |   5%  |
    | 500               | 0.072   | 0.098   |  36%  |
    |1000               | 0.32    | 0.68    | 100%  |
    |2000               |   4.9   |    8.9  |  81%  |
    |2500               |  11.9   |   23.9  | 100%  |
    |3000               |  27.3   |   52.6  |  93%  |
    |3500               |  57.2   |  106.5  |  86%  |
    |4000               | 108.1   |  205.5  |  90%  |
    |4500               | 194.0   |  343.1  |  77%  |
    |5000               | 287.2   |  569.1  |  98%  |
    +===================+=========+=========+=======+
    Vertex coordinate ranges X:0-800, Y:0-600 (rounded to nearest 10).
    
    TEST2: Time (secs) to intersect multiple polygon ELLIPSES.
    +===================+=========+=========+=======+
    |No. Ellipses       | New     | Old     | Perf. |
    |(each)             | Clipper | Clipper | Incr. |
    +===================+=========+=========+=======+
    |1000               |  0.45   |  0.87   | 93%   |
    |2000               |  5.01   |  9.54   | 90%   |
    |2500               | 12.57   | 21.33   | 70%   |
    |3000               | 27.90   | 48.16   | 73%   |
    +===================+=========+=========+=======+
    Paths approximating ellipses are such that the edges deviate from their true 
    elliptical paths by <= 1/2px. Random ellipses are bounded by the range 
    X:0-800, Y:0-600 where the max. elliptical radii are 1/3 of axis bounds 
    and the min. radii is 10.
    
     
    • Ignorant

      Ignorant - 2017-09-20

      I am getting similar performace improvements(in a similar vatti clipper)
      just because of the support edges based append code.How much of the improvement can be attributed to just the intersection evaluation method?.
      sorry,The measurments got mixed up with the standard vatti method.It is much faster as compared to the bubble method for contours > 200 vertices.

       

      Last edit: Ignorant 2017-09-22
  • Timo Kähkönen

    Timo Kähkönen - 2017-09-18

    Performance increase is amazing! What is the main reason for the increase?

     
  • Angus Johnson

    Angus Johnson - 2017-09-18

    Half to two thirds of the performance increase is due to the improved sort algorithm (I changed the bubble sort code to a modified merge sort). The rest is just to cleaner code, especially in AddPath.

    Note that these performance increases are small when there are relatively few intersections in the clippping op.

     
    • Ignorant

      Ignorant - 2017-09-20

      marvelous!.
      [I will try it in Murtas vatti clipper.
      .The bubbling method was slow compared to even the old vatti method.
      The merge sort for linked list is expected to be 10+ times faster than even insertion sort
      for > 100 vertex input contours.
      Mahesh Naik
      Ps: I will do detail profiling after I get a usable delphi/cpp code for
      the new clipperEven transfering the output from the vatti process to the
      delivered output is very time consuming.!

      On Tue, Sep 19, 2017 at 3:36 AM, Angus Johnson angusj@users.sf.net wrote:

      Half to two thirds of the performance increase is due to the improved sort
      algorithm (I changed the bubble sort code to a modified merge sort). The
      rest is just to cleaner code, especially in AddPath.

      Note that these performance increases are small when there are relatively
      few intersections in the clippping op.


      todays release of clipper 2
      https://sourceforge.net/p/polyclipping/discussion/1148419/thread/4e424bd0/?limit=25#6881


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/polyclipping/discussion/1148419/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Last edit: Ignorant 2017-09-22
      • Ignorant

        Ignorant - 2017-09-20

        Also,The perormance is probably better presented as number of open
        edge(i.e. excluding horizontal edges) intersection events in a unit of time.

        On Wed, Sep 20, 2017 at 1:39 PM, Mahesh Naik maheshnaik.mumbai@gmail.com
        wrote:

        marvelous!.
        [I will try it in Murtas vatti clipper.
        Mahesh Naik
        Ps: I will do detail profiling after I get a usable delphi/cpp code for
        the new clipperEven transfering the output from the vatti process to the
        delivered output is very time consuming.!

        On Tue, Sep 19, 2017 at 3:36 AM, Angus Johnson angusj@users.sf.net
        wrote:

        Half to two thirds of the performance increase is due to the improved
        sort algorithm (I changed the bubble sort code to a modified merge sort).
        The rest is just to cleaner code, especially in AddPath.

        Note that these performance increases are small when there are relatively
        few intersections in the clippping op.


        todays release of clipper 2
        https://sourceforge.net/p/polyclipping/discussion/1148419/thread/4e424bd0/?limit=25#6881


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/polyclipping/discussion/1148419/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/

         

        Last edit: Ignorant 2017-09-23
  • Ignorant

    Ignorant - 2017-09-22

    Angus
    How about using the merge sort for the open edge intersetions in the beam.?
    I am copying the non recursie mergsesort cpp routines from the net to time the improvement.(probably yours only)

     

    Last edit: Ignorant 2017-09-22