C++ Speed/Efficiency: Create a Temporary or Decompose an argument for DRY mutually exclusive functions?
<p>From a speed and efficiency standpoint: which is considered best-practice, create a temporary object or decompose a (possibly temporary) argument object?</p>

<p>In this example the implementations of the functions are mutually exclusive for DRY purposes. Both WILL NOT be implemented as shown, but one will be implemented in terms of the other which will delegate the actual work.</p>

<pre><code>void SetPoints(double xA, double yA, double xB, double yB, double xC, double yC);
void SetPoints(const Point&amp; A, const Point&amp; B, const Point&amp; C);

///Option one: create temporary objects:
void SetPoints(double xA, double yA, double xB, double yB, double xC, double yC) {
    SetPoints(Point(xA, yA), Point(xB, yB), Point(xC, yC));
}

//Option two: decompose object arguments
void SetPoints(const Point&amp; A, const Point&amp; B, const Point&amp; C) {
    SetPoints(A.GetX(), A.GetY(), B.GetX(), B.GetY(), C.GetX(), C.GetY());
}
</code></pre>
