bugGNU Octave - Bugs: bug #53689, vectorize delaunayn for the...

 
 

bug #53689: vectorize delaunayn for the 2-dimensional case

Submitted by:  A.R. Burgers <arb>
Submitted on:  Wed 18 Apr 2018 07:32:25 AM UTC  
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Performance
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 29 Apr 2018 04:12:03 AM UTC, comment #5:

I changed the patch to use Octave coding conventions, such as parentheses around the conditional test in an if statement, and checked it in here (http://hg.savannah.gnu.org/hgweb/octave/rev/3b96348d5ccd).

The speed-up is very impressive. Thanks for the patch.

Marking as fixed and closing report.

Rik <rik5>
Project Administrator
Mon 23 Apr 2018 07:34:20 PM UTC, comment #4:

an update to make the test for the vectorized version consistent with the original test following the explanation in https://savannah.gnu.org/bugs/?53690

(file #43997)

A.R. Burgers <arb>
Wed 18 Apr 2018 05:44:20 PM UTC, comment #3:

The 4.4 release is frozen, but this looks like a very important performance boost. Changing the Releas field to be the development branch where this can be worked on.

Rik <rik5>
Project Administrator
Wed 18 Apr 2018 11:29:46 AM UTC, comment #2:

delaunay is a wrapper around delaunayn:

http://hg.savannah.gnu.org/hgweb/octave/file/4adeabc1bbfe/scripts/geometry/delaunay.m

A.R. Burgers <arb>
Wed 18 Apr 2018 08:35:38 AM UTC, comment #1:

There is already a specific function for 2d triangulations which is "delaunay" is it worth adding a special case for that in "delaunayn" as well?

Is "delaunay" vectorized? if so maybe "delaunayn" could just invoke delaunay for the2d and 3d case?

Carlo de Falco <cdf>
Project Member
Wed 18 Apr 2018 07:32:25 AM UTC, original submission:

delaunayn is currently very slow, because of a non-vectorized loop, as mentioned in a FIXME in the function.

The attached diff vectorizes only the 2-D case, but I guess the 2-D case is important enough.

For a 10000 point 2-D triangulation execution time goes down from 3.7 seconds to 0.15 seconds.

A.R. Burgers <arb>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #43997:  delaunayn_diff2.txt added by arb (2KiB - text/plain)
file #43965:  delaunayn_diff.txt added by arb (1KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by cdf (Posted a comment)
  • -email is unavailable- added by arb (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-29 rik5 StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
    2018-04-27 jwe Release4.4.0 => dev
    2018-04-23 arb Attached File- => Added delaunayn_diff2.txt, #43997
    2018-04-18 rik5 StatusNone => Patch Submitted
        Release4.3.90 => 4.4.0
    2018-04-18 arb Attached File- => Added delaunayn_diff.txt, #43965

    Back to the top


    Powered by Savane 3.4