[Ipopt-tickets] [Ipopt] #234: Bad idea of "std::list<TripletEntry>.sort" in "IpTripletToCSRConverter"
Ipopt
coin-trac at coin-or.org
Sat May 17 10:31:57 EDT 2014
#234: Bad idea of "std::list<TripletEntry>.sort" in "IpTripletToCSRConverter"
--------------------------+--------------------------
Reporter: galago | Owner: ipopt-team
Type: enhancement | Status: new
Priority: high | Component: Ipopt
Version: 3.11 | Severity: normal
Resolution: | Keywords: CSRConverter
--------------------------+--------------------------
Changes (by stefan):
* severity: critical => normal
Comment:
Thank you for your analysis.
I agree that the sort function of a list may not be as efficient as for an
randomly accessible container.
However, I would prefer to avoid larger changes to the code, so all I
committed for now was to replace std::list by std::vector (r2487). This
should give you a similar speedup as by your changes. The sorting
algorithm will do more copying, as it will copy complete triplets instead
of single integers. On the other hand, I could avoid the extra arrays
idx_sort, ia_sorted, ja_sorted, and ia_tri.
r2488 removes the implementation of the copy constructor and assignment
operator for the !TripletEntry class, so the defaults are used. Maybe that
makes this a bit faster (?).
Maybe you can rerun your analysis with these changes.
--
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/234#comment:2>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.
More information about the Ipopt-tickets
mailing list